]> Sergey Matveev's repositories - btrtrc.git/blob - fs/test.sh
fs: Update path to torrentfs
[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/fs/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 -c <(cat <<EOF
17 083e808d56aa7b146f513b3458658292  -
18 EOF)
19 sudo umount mnt
20 wait || echo "wait returned" $?