Commit 7daefd97 authored by Yicheng Qin's avatar Yicheng Qin Committed by Pavel Emelyanov

test/zdtm: add option -r to run test with specified name

The option can run test with specified name directly without check
or match.

It can be used to run experimental test that is not in TEST_LIST.
Signed-off-by: 's avatarYicheng Qin <yichengq@google.com>
Acked-by: 's avatarAndrew Vagin <avagin@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 60e6d388
...@@ -158,6 +158,7 @@ PS_PORT=12345 ...@@ -158,6 +158,7 @@ PS_PORT=12345
TCPDUMP_PID= TCPDUMP_PID=
COMPILE_ONLY=0 COMPILE_ONLY=0
BATCH_TEST=0 BATCH_TEST=0
SPECIFIED_NAME_USED=0
check_criu() check_criu()
{ {
...@@ -658,6 +659,11 @@ while :; do ...@@ -658,6 +659,11 @@ while :; do
shift shift
continue continue
fi fi
if [ "$1" = "-r" ]; then
SPECIFIED_NAME_USED=1
shift
continue
fi
break; break;
done done
...@@ -685,9 +691,16 @@ Options: ...@@ -685,9 +691,16 @@ Options:
-a <FILE>.tar.gz : save archive with dump files and logs -a <FILE>.tar.gz : save archive with dump files and logs
-g : Generate executables only -g : Generate executables only
-n : Batch test -n : Batch test
-r : Run test with specified name directly without match or check
EOF EOF
elif [ "${1:0:1}" = '-' ]; then elif [ "${1:0:1}" = '-' ]; then
echo "unrecognized option $1" echo "unrecognized option $1"
elif [ $SPECIFIED_NAME_USED -eq 1 ]; then
if [ $# -eq 0 ]; then
echo "test name should be provided"
exit 1
fi
run_test $1 || case_error $t
else else
if [ $COMPILE_ONLY -eq 0 ]; then if [ $COMPILE_ONLY -eq 0 ]; then
check_mainstream || exit 1 check_mainstream || exit 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment