summaryrefslogtreecommitdiff
path: root/external/bsd/bind/dist/unit/unittest.sh.in
blob: f3865ceb69fc9e0d5a7eecb6c2f5825c68b99ce6 (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
#!/bin/sh

PATH="@ATFBIN@:${PATH}"
export PATH

status=0
if [ -n "@ATFBIN@" -a -f Atffile ]
then
	echo "I: unit tests"
	atf-run > atf.out
	status=$?

        # | cat is there to force non-fancy output
	atf-report < atf.out | cat

	if [ $status -eq 0 ]
	then
		rm -f atf.out
		echo R:PASS
	else
		echo R:FAIL
	fi
fi
exit $status