[CRIU] [PATCH] zdtm: Ability to run tests starting from a specified one
Andrew Vagin
avagin at parallels.com
Thu Jan 29 03:11:47 PST 2015
Acked-by: Andrew Vagin <avagin at parallels.com>
On Thu, Jan 22, 2015 at 06:24:26PM +0300, Pavel Emelyanov wrote:
> Can be useful to re-run some tests in case smth failed in the middle
>
> Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
> ---
> test/zdtm.sh | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index e212ee6..d7a5c85 100755
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -338,6 +338,7 @@ COMPILE_ONLY=0
> START_ONLY=0
> BATCH_TEST=0
> SPECIFIED_NAME_USED=0
> +START_FROM="."
>
> zdtm_sep()
> { (
> @@ -906,6 +907,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.
> @@ -997,6 +999,11 @@ while :; do
> START_ONLY=1
> shift
> ;;
> + -f)
> + shift
> + START_FROM="^${1}$"
> + shift
> + ;;
> -n)
> BATCH_TEST=1
> shift
> @@ -1067,7 +1074,7 @@ else
> pattern=$1
> fi
>
> - 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
>
> --
> 1.8.4.2
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list