File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33source " $(dirname " $0 " )/testhelpers.sh"
44
55function setup () {
6- mount_sparsebundle
6+ read -r mount_dir dmg_file < <( mount_sparsebundle)
77}
88
99function test_dmg_has_correct_number_of_blocks () {
@@ -18,6 +18,5 @@ function test_dmg_contents_is_same_as_testdata() {
1818}
1919
2020function teardown () {
21- umount $mount_dir
22- rm -Rf $mount_dir
21+ umount $mount_dir && rm -Rf $mount_dir
2322}
Original file line number Diff line number Diff line change 33source " $(dirname " $0 " )/testhelpers.sh"
44
55function setup () {
6- mount_sparsebundle -o noreadbuf
6+ read -r mount_dir dmg_file < <( mount_sparsebundle -o noreadbuf)
77}
88
99function test_dmg_has_correct_number_of_blocks () {
@@ -18,6 +18,5 @@ function test_dmg_contents_is_same_as_testdata() {
1818}
1919
2020function teardown () {
21- umount $mount_dir
22- rm -Rf $mount_dir
21+ umount $mount_dir && rm -Rf $mount_dir
2322}
Original file line number Diff line number Diff line change 11
22function mount_sparsebundle() {
33 test ! -z " $TEST_BUNDLE "
4- mount_dir=$( mktemp -d)
5- dmg_file=" $mount_dir /sparsebundle.dmg"
4+ local mount_dir=$( mktemp -d)
5+ local dmg_file=" $mount_dir /sparsebundle.dmg"
66 sparsebundlefs -s -f -D $* $TEST_BUNDLE $mount_dir &
7- pid=$!
7+ local pid=$!
88 for i in {0..50}; do
99 kill -0 $pid > /dev/null 2>&1
1010 test -f $dmg_file && break || sleep 0.1
You can’t perform that action at this time.
0 commit comments