]> Sergey Matveev's repositories - btrtrc.git/blob - fs/test.sh
Merge branch 'master' into go1.18
[btrtrc.git] / fs / test.sh
1 set -eux
2 repopath="$(cd "$(dirname "$0")/.."; pwd)"
3 debian_file=debian-10.8.0-amd64-netinst.iso
4 mkdir -p mnt torrents
5 # I think the timing can cause torrents to not get added correctly to the torrentfs client, so add
6 # them first and start the fs afterwards.
7 pushd torrents
8 cp "$repopath/testdata/$debian_file.torrent" .
9 godo -v "$repopath/cmd/torrent" metainfo "$repopath/testdata/sintel.torrent" magnet > sintel.magnet
10 popd
11 GOPPROF=http godo -v "$repopath/cmd/torrentfs" -mountDir=mnt -metainfoDir=torrents &
12 trap 'set +e; sudo umount -f mnt' EXIT
13 #file="$debian_file"
14 file=Sintel/Sintel.mp4
15 while [ ! -e "mnt/$file" ]; do sleep 1; done
16 pv -f "mnt/$file" | md5sum
17 # expect e221f43f4fdd409250908fc4305727d4
18 sudo umount mnt
19 wait || echo "wait returned" $?