File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env testrunner.sh
22
3+ source " $(dirname " $0 " )/testhelpers.sh"
4+
35function setup () {
4- test ! -z " $TEST_BUNDLE"
5- mount_dir=$(mktemp -d)
6- sparsebundlefs -s -f -D $TEST_BUNDLE $mount_dir &
7- pid=$!
8- for i in {0 ..50 }; do
9- kill -0 $pid >/dev/null 2 >&1
10- # FIXME: Find actual mount callback in fuse?
11- grep -q " bundle has" $test_output_file && break || sleep 0.1
12- done
13- dmg_file=$mount_dir/sparsebundle.dmg
6+ mount_sparsebundle
147}
158
169function test_dmg_exists_after_mounting () {
Original file line number Diff line number Diff line change 11#!/usr/bin/env testrunner.sh
22
3+ source " $(dirname " $0 " )/testhelpers.sh"
4+
35function setup () {
4- test ! -z " $TEST_BUNDLE"
5- mount_dir=$(mktemp -d)
6- sparsebundlefs -s -f -D -o allow_other $TEST_BUNDLE $mount_dir &
7- pid=$!
8- for i in {0 ..50 }; do
9- kill -0 $pid >/dev/null 2 >&1
10- # FIXME: Find actual mount callback in fuse?
11- grep -q " bundle has" $test_output_file && break || sleep 0.1
12- done
13- dmg_file=$mount_dir/sparsebundle.dmg
6+ mount_sparsebundle -o allow_other
147}
158
169function test_dmg_has_correct_permissions () {
Original file line number Diff line number Diff line change 1+
2+ function mount_sparsebundle() {
3+ test ! -z " $TEST_BUNDLE "
4+ mount_dir=$( mktemp -d)
5+ sparsebundlefs -s -f -D $* $TEST_BUNDLE $mount_dir &
6+ pid=$!
7+ for i in {0..50}; do
8+ kill -0 $pid > /dev/null 2>&1
9+ # FIXME: Find actual mount callback in fuse?
10+ grep -q " bundle has" $test_output_file && break || sleep 0.1
11+ done
12+ dmg_file=$mount_dir /sparsebundle.dmg
13+ }
You can’t perform that action at this time.
0 commit comments