diff options
author | Martin Schwenke <martin@meltin.net> | 2019-10-17 16:42:36 +1100 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-10-22 21:02:11 +0000 |
commit | aa37668218024aff6bb6518386d4e17a91407633 (patch) | |
tree | afee8e82d966c8a2c3c9e55cefcbacbe3263b8bd /ctdb | |
parent | fe80038d074d220487782dc837ea4bd779a6aad0 (diff) | |
download | samba-aa37668218024aff6bb6518386d4e17a91407633.tar.gz |
ctdb-tests: Add -l option to set number of local daemons
This is the only place where setting an environment variable by hand
is recommended, so remove the anomaly.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Oct 22 21:02:11 UTC 2019 on sn-devel-184
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/tests/README | 2 | ||||
-rwxr-xr-x | ctdb/tests/run_tests.sh | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/ctdb/tests/README b/ctdb/tests/README index 4d977f761a4..eaca954b758 100644 --- a/ctdb/tests/README +++ b/ctdb/tests/README @@ -23,8 +23,6 @@ By default: * INTEGRATION tests are run against 3 local daemons - Set CTDB_TEST_LOCAL_DAEMONS to a different number if desired - * When testing is complete, a summary showing a list is printed showing the tests run and their results diff --git a/ctdb/tests/run_tests.sh b/ctdb/tests/run_tests.sh index 5011a73d82c..d7c33f1865a 100755 --- a/ctdb/tests/run_tests.sh +++ b/ctdb/tests/run_tests.sh @@ -12,6 +12,7 @@ Options: -e Exit on the first test failure -H No headers - for running single test with other wrapper -I <count> Iterate tests <count> times, exiting on failure (implies -e, -N) + -l <count> Use <count> daemons for local daemon integration tests -L Print daemon logs on test failure (only some tests) -N Don't print summary of tests results after running all tests -q Quiet - don't show tests being run (still displays summary) @@ -46,11 +47,10 @@ export CTDB_TEST_COMMAND_TRACE=false export CTDB_TEST_CAT_RESULTS_OPTS="" export CTDB_TEST_DIFF_RESULTS=false export CTDB_TEST_PRINT_LOGS_ON_ERROR=false -export CTDB_TEST_LOCAL_DAEMONS -[ -n "$CTDB_TEST_LOCAL_DAEMONS" ] || CTDB_TEST_LOCAL_DAEMONS=3 +export CTDB_TEST_LOCAL_DAEMONS=3 export CTDB_TEST_SWRAP_SO_PATH="" -while getopts "AcCDehHI:LNqS:T:vV:xX?" opt ; do +while getopts "AcCDehHI:l:LNqS:T:vV:xX?" opt ; do case "$opt" in A) CTDB_TEST_CAT_RESULTS_OPTS="-A" ;; c) CTDB_TEST_LOCAL_DAEMONS="" ;; @@ -59,6 +59,7 @@ while getopts "AcCDehHI:LNqS:T:vV:xX?" opt ; do e) exit_on_fail=true ;; H) no_header=true ;; I) max_iterations="$OPTARG" ; exit_on_fail=true ; with_summary=false ;; + l) CTDB_TEST_LOCAL_DAEMONS="$OPTARG" ;; L) CTDB_TEST_PRINT_LOGS_ON_ERROR=true ;; N) with_summary=false ;; q) quiet=true ;; |