summaryrefslogtreecommitdiffstats
path: root/extras/distributed-testing/distributed-test.sh
diff options
context:
space:
mode:
authordkhandel <dkhandel@localhost.localdomain>2018-06-11 12:49:41 +0530
committerAmar Tumballi <amarts@redhat.com>2018-06-18 03:47:01 +0000
commit8353bc096117e446f08c4970b3f7f55d4aa3356c (patch)
treeed25ac0b0d4fb0b92bd3a03966e5f49f5803a19f /extras/distributed-testing/distributed-test.sh
parent337f5815a4fa9a961c72b249e1d6b1c6907e961d (diff)
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 <dkhandel@redhat.com>
Diffstat (limited to 'extras/distributed-testing/distributed-test.sh')
-rwxr-xr-xextras/distributed-testing/distributed-test.sh10
1 files changed, 7 insertions, 3 deletions
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 <hosts>] [-n <parallelism>]
[--tests <tests>]
[--id-rsa <ssh private key>]
+ [--address_family <IPv4 or IPv6>]
"
}
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 $?
}