summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/UNIT/shellcheck/tests.sh
blob: fe5538123cf17080bd391402a1176e878e621027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/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" \
	"${TEST_SCRIPTS_DIR}/unit.sh"

shellcheck_test -s bash \
	"${TEST_SCRIPTS_DIR}/cluster.bash" \
	"${TEST_SCRIPTS_DIR}/integration.bash" \
	"${TEST_SCRIPTS_DIR}/integration_local_daemons.bash" \
	"${TEST_SCRIPTS_DIR}/integration_real_cluster.bash"

# Test scripts and stubs
shellcheck_test -s sh \
	"${CTDB_TEST_DIR}/UNIT/eventscripts/scripts/"* \
	"${CTDB_TEST_DIR}/UNIT/eventscripts/stubs/"*