diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2015-01-22 18:24:00 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@parallels.com> | 2015-01-29 18:45:24 +0300 |
commit | 46b7f13cf219974b1d188eef29b1c8009174149c (patch) | |
tree | d11f70670ae50f595bf91b4252923802e1fd54a9 | |
parent | b0f40a2726e53478f2b714b602e42df98530f5ca (diff) |
zdtm: Ability to run tests starting from a specified one
Can be useful to re-run some tests in case smth failed in the middle
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Andrew Vagin <avagin@parallels.com>
-rwxr-xr-x | test/zdtm.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/zdtm.sh b/test/zdtm.sh index d78029a9d..e434a34e7 100755 --- a/test/zdtm.sh +++ b/test/zdtm.sh @@ -371,6 +371,7 @@ COMPILE_ONLY=0 START_ONLY=0 BATCH_TEST=0 SPECIFIED_NAME_USED=0 +START_FROM="." zdtm_sep() { ( @@ -945,6 +946,7 @@ Options: -S : Only start the test -n : Batch test -r : Run test with specified name directly without match or check + -f <name>: Run tests starting from @name -v : Verbose mode -P : Make pre-dump instead of dump on all iterations except the last one -s : Make iterative snapshots. Only the last one will be checked. @@ -1036,6 +1038,11 @@ while :; do START_ONLY=1 shift ;; + -f) + shift + START_FROM="^${1}$" + shift + ;; -n) BATCH_TEST=1 shift @@ -1103,7 +1110,7 @@ else fi generate_test_list - for t in $(echo "$TEST_LIST" | grep -x "$pattern"); do + for t in $(echo "$TEST_LIST" | sed -n -e "/${START_FROM////\/}/,\$p" | grep -x "$pattern"); do run_test $t || case_error $t done |