4 repopath="$(cd "$(dirname "$0")/.."; pwd)"
5 debian_file=debian-10.8.0-amd64-netinst.iso
7 # I think the timing can cause torrents to not get added correctly to the torrentfs client, so add
8 # them first and start the fs afterwards.
10 cp "$repopath/testdata/$debian_file.torrent" .
11 godo -v -- "$repopath/cmd/torrent" metainfo "$repopath/testdata/sintel.torrent" magnet > sintel.magnet
14 file=Sintel/Sintel.mp4
16 GOPPROF=http godo -v -- "$repopath/fs/cmd/torrentfs" -mountDir=mnt -metainfoDir=torrents &
18 trap "kill $torrentfs_pid" EXIT
21 while [ ! -e "mnt/$file" ]; do sleep 1; done
22 pv -f "mnt/$file" | md5sum -c <(cat <<-EOF
23 083e808d56aa7b146f513b3458658292 -
31 trap "kill $torrentfs_pid $check_file_pid" EXIT
36 echo "wait returned" $status