From f6178fcc9db4e05bddba1af16fd5ef6c56e9a515 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Mon, 16 Apr 2012 14:33:37 +1000 Subject: [PATCH] tests - add scripts/unit.sh This will be sourced by all unit tests. Signed-off-by: Martin Schwenke (This used to be ctdb commit afdaa5f032938d56ff315d9553cb285ebc413c4c) --- ctdb/tests/scripts/unit.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ctdb/tests/scripts/unit.sh diff --git a/ctdb/tests/scripts/unit.sh b/ctdb/tests/scripts/unit.sh new file mode 100644 index 00000000000..977cc9ae9c4 --- /dev/null +++ b/ctdb/tests/scripts/unit.sh @@ -0,0 +1,16 @@ +# Hey Emacs, this is a -*- shell-script -*- !!! :-) + +. "${TEST_SCRIPTS_DIR}/common.sh" + +# Common variables and functions for CTDB unit tests. + +required_result () +{ + required_rc="${1:-0}" + required_output=$(cat) +} + +local="${TEST_SUBDIR}/scripts/local.sh" +if [ -r "$local" ] ; then + . "$local" +fi