Test suite: add -x option to ctdb_init() function.
authorMartin Schwenke <martin@meltin.net>
Tue, 20 Oct 2009 05:44:44 +0000 (16:44 +1100)
committerMartin Schwenke <martin@meltin.net>
Tue, 20 Oct 2009 05:44:44 +0000 (16:44 +1100)
This facilitates tracing of tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>
tests/scripts/ctdb_test_functions.bash

index 3da0f0effd291d3bf81365e56bd7f08da3e173cf..40d8453e5671169092a651220bfcd1cdd8819910 100644 (file)
@@ -120,6 +120,7 @@ Options:
     --category          show the test category (ACL, CTDB, Samba ...).
     -d, --description   show test case description.
     --summary           show short test case summary.
+    -x                  trace test using set -x
 EOF
 
     exit $status
@@ -141,7 +142,7 @@ ctdb_test_cmd_options()
         -v|--version)     ctdb_test_version   ;;
         --category)       echo "CTDB"         ;; 
         -d|--description) test_info           ;;
-       --summary)        test_info | head -1 ;;
+       -x)               set -x ; return 0   ;;
        *)
            echo "Error: Unknown parameter = $1"
            echo