ctdb-tests: New function unit_test_notrace()
authorMartin Schwenke <martin@meltin.net>
Tue, 13 Dec 2016 20:18:57 +0000 (07:18 +1100)
committerAmitay Isaacs <amitay@samba.org>
Mon, 19 Dec 2016 03:07:08 +0000 (04:07 +0100)
Avoids valgrind and such, so a function can be passed.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/scripts/unit.sh

index 4e6d5d7f7c32a25d83745420eaaf45fd345c588a..7a0296e5f3763227f6f198f646b69cdf8b5d3c72 100644 (file)
@@ -209,6 +209,16 @@ script_test ()
     result_check || exit $?
 }
 
+# Simple test harness for running tests without tracing
+unit_test_notrace ()
+{
+    test_header "$@"
+
+    _out=$("$@" 2>&1)
+
+    result_check || exit $?
+}
+
 test_cleanup_hooks=""
 
 test_cleanup ()