summaryrefslogtreecommitdiff
path: root/tests/fsck-tests.sh
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-12-12 15:49:26 +0100
committerDavid Sterba <dsterba@suse.cz>2014-12-12 16:21:42 +0100
commit4f9d8b1ffafd4ce1bf1c4c805a22bd089ade9861 (patch)
tree30a6e8fb3782a30d79c0dd0b60a4f496f04e223b /tests/fsck-tests.sh
parent6856b0a4cab6eae794f0fe012391fa76a8dd3b4e (diff)
btrfs-progs: tests: build prerequisities, btrfs-image and btrfs
Build required utilities from the main Makefile and just check in the test scripts. Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'tests/fsck-tests.sh')
-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