unittest.sh.in 587 Bytes
Newer Older
1
#!/bin/sh
2
3
KYUA=@KYUA@
UNITTESTS=@UNITTESTS@
4
5
CMOCKA_MESSAGE_OUTPUT=TAP
export CMOCKA_MESSAGE_OUTPUT
6

Mark Andrews's avatar
Mark Andrews committed
7
status=0
8
if [ -n "${UNITTESTS}" ] && [ -f Kyuafile ]
Mark Andrews's avatar
Mark Andrews committed
9
then
10
	echo "S:unit:$(date)"
11
	echo "T:unit:1:A"
Mark Andrews's avatar
Mark Andrews committed
12
	echo "I: unit tests (using kyua)"
13
	${KYUA} -v parallelism="${TEST_PARALLEL_JOBS:-1}" --logfile kyua.log --loglevel debug test --results-file "${KYUA_RESULT:-NEW}"
14
15
	status=$?

16
	${KYUA} --logfile /dev/null report --results-file "${KYUA_RESULT:-LATEST}"
17

18
	if [ "${status}" -eq "0" ]
Mark Andrews's avatar
Mark Andrews committed
19
	then
Mark Andrews's avatar
Mark Andrews committed
20
		rm -f kyua.log
21
		echo "R:PASS"
Mark Andrews's avatar
Mark Andrews committed
22
	else
23
		echo "R:FAIL"
Mark Andrews's avatar
Mark Andrews committed
24
	fi
25
	echo "E:unit:$(date)"
Mark Andrews's avatar
Mark Andrews committed
26
fi
27
exit ${status}