summaryrefslogtreecommitdiff
path: root/tests/fsck-tests.sh
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2015-07-11 00:38:07 +0200
committerDavid Sterba <dsterba@suse.com>2015-08-31 19:25:09 +0200
commita5afa55a30a07f18c17527ad09420afb9bc5ff69 (patch)
tree9ab232115b7ac6db89e4e759c16720fa8943e994 /tests/fsck-tests.sh
parent9842d5769117eb46ad116b8e9fb65a5b8cf27856 (diff)
btrfs-progs: tests: support testname glob
To run a given test set the variable TEST like $ make test TEST=002-bad-transid $ make test TEST=002-* and only tests matching the value will be run. The pattern is glob and pased to 'find -name'. The convert tests do not follow the fsck and misc layout and are skipped if TEST is set. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tests/fsck-tests.sh')
-rwxr-xr-xtests/fsck-tests.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh
index 7e90f25e..73538fec 100755
--- a/tests/fsck-tests.sh
+++ b/tests/fsck-tests.sh
@@ -64,7 +64,8 @@ run_one_test() {
# This is for case btrfs-image can't dump or case needs extra
# check/verify
-for i in $(find $TOP/tests/fsck-tests -maxdepth 1 -mindepth 1 -type d | sort)
+for i in $(find $TOP/tests/fsck-tests -maxdepth 1 -mindepth 1 -type d \
+ ${TEST:+-name "$TEST"} | sort)
do
run_one_test "$i"
done