btrfs-progs: tests: split make rule for fsck and convert tests, fix prerequisities
authorDavid Sterba <dsterba@suse.cz>
Tue, 7 Apr 2015 16:29:05 +0000 (18:29 +0200)
committerDavid Sterba <dsterba@suse.cz>
Tue, 7 Apr 2015 16:36:59 +0000 (18:36 +0200)
We'd like to run each class of tests separately. There were some missing
prerequisities that should be/are verified by the tests, makefile rules
have been synced.

Signed-off-by: David Sterba <dsterba@suse.cz>
Makefile.in
tests/fsck-tests/013-extent-tree-rebuild/test.sh

index 83927e4..3c50613 100644 (file)
@@ -161,11 +161,15 @@ $(BUILDDIRS):
        @echo "Making all in $(patsubst build-%,%,$@)"
        $(Q)$(MAKE) $(MAKEOPTS) -C $(patsubst build-%,%,$@)
 
-test: btrfs btrfs-convert btrfs-image btrfs-corrupt-block
-       $(Q)for t in $(TESTS); do \
-               echo "    [TEST]   $$t"; \
-               bash tests/$$t || exit 1; \
-       done
+test-convert: btrfs btrfs-convert
+       @echo "    [TEST]   convert-tests.sh"
+       $(Q)bash tests/convert-tests.sh
+
+test-fsck: btrfs btrfs-image btrfs-corrupt-block btrfs-debug-tree mkfs.btrfs
+       @echo "    [TEST]   fsck-tests.sh"
+       $(Q)bash tests/fsck-tests.sh
+
+test: test-fsck test-convert
 
 #
 # NOTE: For static compiles, you need to have all the required libs
index e05a035..9b291dd 100755 (executable)
@@ -3,6 +3,7 @@
 source $TOP/tests/common
 
 check_prereq btrfs-debug-tree
+check_prereq mkfs.btrfs
 setup_root_helper
 
 if [ -z $TEST_DEV ]; then