]> Sergey Matveev's repositories - btrtrc.git/blob - fs/test.sh
Revert "fs/test.sh: Use go run instead of godo"
[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 godo -v -race "$repopath/cmd/torrent" metainfo "$repopath/testdata/sintel.torrent" magnet > 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" $?