From aa37668218024aff6bb6518386d4e17a91407633 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Thu, 17 Oct 2019 16:42:36 +1100 Subject: [PATCH] ctdb-tests: Add -l option to set number of local daemons MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is the only place where setting an environment variable by hand is recommended, so remove the anomaly. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Tue Oct 22 21:02:11 UTC 2019 on sn-devel-184 --- ctdb/tests/README | 2 -- 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 Iterate tests times, exiting on failure (implies -e, -N) + -l Use 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 ;; -- 2.47.3