aboutsummaryrefslogtreecommitdiff
path: root/tests/scripts/makefile
blob: e6ea39442f4a5a421c97dc18c04935abdb2fe5fe (plain) (blame)
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
.PHONY: all
all: check

COMPILE_TEST := $(CC) -L../mod -I../include -I../lib -Wl,-rpath=../mod -O2
TEST_LIBS    := -lfwdio -lfwdmem -lfwdutil

export COMPILE_TEST
export TEST_LIBS

TESTS :=
include tests.mk

.PHONY: check
check: $(TESTS)
	@cd reports; OK=1; for d in * ; do			\
		if [ ! -f "$$d/OK" ]; then			\
			echo "BROKEN: $$d" ;			\
		elif [ "$$(tail -n1 $$d/OK)" != "OK" ]; then	\
			OK=0             ;			\
			echo "FAIL: $$d" ;			\
		fi						\
	done;							\
	if [ "$$OK" != 1 ]; then				\
		echo "There were failing tests";		\
		exit 1; \
	fi
	@echo "Done."