xref: /netbsd-src/external/bsd/unbound/dist/testdata/clang-analysis.tdir/clang-analysis.pre (revision 91f7d55fb697b5e0475da4718fa34c3a3ebeac85)
1# #-- clang-analysis.pre --#
2# source the master var file when it's there
3[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
4# use .tpkg.var.test for in test variable passing
5[ -f .tpkg.var.test ] && source .tpkg.var.test
6# common functions
7. ../common.sh
8
9PRE="../.."
10if test ! -x "`which clang 2>&1`"; then
11	skip_test "No clang in path"
12fi
13#echo "have clang"
14# test if assertions are enabled
15if grep "^#define UNBOUND_DEBUG" $PRE/config.h >/dev/null; then
16	:
17else
18	skip_test "UNBOUND_DEBUG is not enabled, skip test"
19	# no unbound debug means no assertions, and clang analyzer uses
20	# the assertions to make inferences.
21fi
22