summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/fsck-tests.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh
index 285bcf65..24fb1090 100644
--- a/tests/fsck-tests.sh
+++ b/tests/fsck-tests.sh
@@ -22,10 +22,19 @@ run_check()
"$@" >> $RESULT 2>&1 || _fail "failed: $@"
}
+check_prereq()
+{
+ if ! [ -f $here/$1 ]; then
+ _fail "Failed prerequisities: $1";
+ fi
+}
+
rm -f $RESULT
# test rely on corrupting blocks tool
-run_check make btrfs-corrupt-block
+check_prereq btrfs-corrupt-block
+check_prereq btrfs-image
+check_prereq btrfs
# Some broken filesystem images are kept as .img files, created by the tool
# btrfs-image, and others are kept as .tar.xz files that contain raw filesystem