From 8353bc096117e446f08c4970b3f7f55d4aa3356c Mon Sep 17 00:00:00 2001 From: dkhandel Date: Mon, 11 Jun 2018 12:49:41 +0530 Subject: Add a command-line argument option to use specific address family This commit adds option to pass command-line argument to use any of IPv4 or IPv6 address family. Also it clean all the logs in the /tmp before running the distributed-test-runner.py fixes: bz#1586342 Change-Id: Ie55021389d454a7e3631359cbd6a1504b6661317 Signed-off-by: dkhandel --- extras/distributed-testing/distributed-test.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'extras/distributed-testing/distributed-test.sh') diff --git a/extras/distributed-testing/distributed-test.sh b/extras/distributed-testing/distributed-test.sh index 1ceff033cba..8f1e0310f33 100755 --- a/extras/distributed-testing/distributed-test.sh +++ b/extras/distributed-testing/distributed-test.sh @@ -7,6 +7,7 @@ TESTS='all' FLAKY=$KNOWN_FLAKY_TESTS BROKEN=$BROKEN_TESTS TEST_TIMEOUT_S=900 +ADDRESS_FAMILY='IPv4' FLAGS="" @@ -20,7 +21,7 @@ function print_env { } function cleanup { - rm -f /tmp/test-*.log + rm -f /tmp/test*.log } function usage { @@ -30,13 +31,14 @@ function usage { [--hosts ] [-n ] [--tests ] [--id-rsa ] + [--address_family ] " } function parse_args () { args=`getopt \ -o hvn: \ - --long help,verbose,valgrind,asan,asan-noleaks,all,\ + --long help,verbose,address_family:,valgrind,asan,asan-noleaks,all,\ smoke,flaky,broken,hosts:,tests:,id-rsa:,test-timeout: \ -n 'fb-remote-test.sh' -- "$@"` @@ -51,6 +53,7 @@ smoke,flaky,broken,hosts:,tests:,id-rsa:,test-timeout: \ case "$1" in -h | --help) usage ; exit 1 ;; -v | --verbose) FLAGS="$FLAGS -v" ; shift ;; + --address_family) ADDRESS_FAMILY=$2; shift 2 ;; --valgrind) FLAGS="$FLAGS --valgrind" ; shift ;; --asan-noleaks) FLAGS="$FLAGS --asan-noleaks"; shift ;; --asan) FLAGS="$FLAGS --asan" ; shift ;; @@ -83,7 +86,8 @@ function main { "extras/distributed-testing/distributed-test-runner.py" $FLAGS --tester \ --n "$N" --hosts "$HOSTS" --tests "$TESTS" \ - --flaky_tests "$FLAKY $BROKEN" --test-timeout "$TEST_TIMEOUT_S" + --flaky_tests "$FLAKY $BROKEN" --test-timeout "$TEST_TIMEOUT_S" \ + --address_family "$ADDRESS_FAMILY" exit $? } -- cgit