Files
sparsebundlefs-mirror/tests/basic.sh
Tor Arne Vestbø d7a1f72062 Add test harness and initial mount test
Tests are run using 'make check', and can be combined with the
existing Makefile targets, e.g. 'make check all' to run checks
on all available platforms.

Pass DEBUG=1 for additional test output.
2018-09-08 22:24:46 +02:00

23 lines
428 B
Bash

function setup() {
mount_dir=$(mktemp -d)
$SPARSEBUNDLEFS -s -f -D $TEST_BUNDLE $mount_dir &
for i in {0..50}; do
# FIXME: Find actual mount callback in fuse?
grep -q "bundle has" $test_output_file && break || sleep 0.1
done
pid=$!
dmg_file=$mount_dir/sparsebundle.dmg
}
function test_dmg_exists_after_mounting() {
ls -l $dmg_file
test -f $dmg_file
}
function teardown()
{
umount $mount_dir
rm -Rf $mount_dir
}