From: Martin Schwenke Date: Mon, 12 Aug 2019 05:13:47 +0000 (+1000) Subject: ctdb-tests: Add shellcheck test for some test scripts and includes X-Git-Tag: tdb-1.4.2~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da33fb27ab4f858689d4e93760edadd2018b9068;p=thirdparty%2Fsamba.git ctdb-tests: Add shellcheck test for some test scripts and includes These files now pass, so we might as well keep them in good shape. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/tests/shellcheck/tests.sh b/ctdb/tests/shellcheck/tests.sh new file mode 100755 index 00000000000..c5a25aaf81a --- /dev/null +++ b/ctdb/tests/shellcheck/tests.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +. "${TEST_SCRIPTS_DIR}/unit.sh" + +define_test "tests" + +if "$CTDB_TESTS_ARE_INSTALLED" ; then + run_tests="${CTDB_SCRIPTS_TESTS_BIN_DIR}/ctdb_run_tests" + local_daemons="${CTDB_SCRIPTS_TESTS_BIN_DIR}/ctdb_local_daemons" +else + run_tests="${CTDB_TEST_DIR}/run_tests.sh" + local_daemons="${CTDB_TEST_DIR}/local_daemons.sh" +fi + +# Scripts +shellcheck_test \ + "$run_tests" \ + "$local_daemons" \ + "${TEST_SCRIPTS_DIR}/test_wrap" + +# Includes +shellcheck_test -s sh \ + "${TEST_SCRIPTS_DIR}/common.sh" \ + "${TEST_SCRIPTS_DIR}/script_install_paths.sh"