ctdb/tests/scripts: Simplify the top-level test scripts
commit318f2cf9123875acdef39d170cdbc6683a79e896
authorMartin Schwenke <martin@meltin.net>
Mon, 2 Dec 2013 04:37:18 +0000 (2 15:37 +1100)
committerMichael Adam <obnox@samba.org>
Wed, 4 Dec 2013 23:46:04 +0000 (5 00:46 +0100)
tree7fa3c5e97cc98bcd6f05f76b463c76f871e873cb
parentbbd46e8634f5db7631ce80a4b81781adf507a383
ctdb/tests/scripts: Simplify the top-level test scripts

At the moment run_tests.sh has quite fragile argument processing.  It
needs that annoying "--" between options and tests.  The random
default (mktemp -d) for TEST_VAR_DIR is wrong and is worked around in
various places.

Instead:

* Change the default behaviour to print a summary, add new option -N
  to turn off summary, and remove old -s option.

* Change the default behaviour to run integration tests with local
  daemons, add new options -c to run on a cluster, remove old -l
  option.

* Make $testdir/var the default if the tests are not installed, and
  $(mktemp -d ) the default if tests are installed.

* Move the default tests for local/cluster into scripts/run_tests.

run_tests.sh (and the run_cluster_tests.sh symlink) should behave as
before but with slightly more reasonable defaults.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/tests/run_tests.sh
ctdb/tests/scripts/run_tests