Add testcase filter for misc-tests, so we can select to run necessary
test cases.
For example:
# ./misc-tests.sh 002
[TEST] 002-uuid-rewrite
#
# ./misc-tests.sh subvolume
[TEST] 007-subvolume-sync
#
Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
---
tests/misc-tests.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/misc-tests.sh b/tests/misc-tests.sh
index 1ed8850..f9c1152 100755
--- a/tests/misc-tests.sh
+++ b/tests/misc-tests.sh
@@ -12,6 +12,8 @@ TEST_MNT=${TEST_MNT:-$TOP/tests/mnt}
RESULTS="$TOP/tests/misc-tests-results.txt"
IMAGE="$TOP/tests/test.img"
+TEST_FILTER="$1"
+
source $TOP/tests/common
# Allow child test to use $TOP and $RESULTS
@@ -35,7 +37,7 @@ check_prereq btrfs
# The tests are driven by their custom script called 'test.sh'
for i in $(find $TOP/tests/misc-tests -maxdepth 1 -mindepth 1 -type d \
- ${TEST:+-name "$TEST"} | sort)
+ ${TEST:+-name "$TEST"} | sort | grep -e "$TEST_FILTER")
do
echo " [TEST] $(basename $i)"
cd $i
--
1.8.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html