]> Sergey Matveev's repositories - btrtrc.git/blob - fs/test.sh
Create go.yml (#497)
[btrtrc.git] / fs / test.sh
1 set -eux
2 repopath="$(cd "$(dirname "$0")/.."; pwd)"
3 mkdir -p mnt torrents
4 GOPPROF=http godo -v "$repopath/cmd/torrentfs" -mountDir=mnt -metainfoDir=torrents &
5 trap 'set +e; sudo umount -f mnt' EXIT
6 debian_file=debian-10.8.0-amd64-netinst.iso
7 pushd torrents
8 cp "$repopath/testdata/$debian_file.torrent" .
9 echo 'magnet:?xt=urn:btih:6a9759bffd5c0af65319979fb7832189f4f3c35d&dn=sintel.mp4' > sintel.magnet
10 popd
11 file="$debian_file"
12 # file=sintel.mp4
13 while [ ! -e "mnt/$file" ]; do sleep 1; done
14 pv -f "mnt/$file" | md5sum
15 # expect e221f43f4fdd409250908fc4305727d4
16 sudo umount mnt
17 wait || echo "wait returned" $?