aboutsummaryrefslogtreecommitdiff
path: root/tests/scripts/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/makefile')
-rw-r--r--tests/scripts/makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/scripts/makefile b/tests/scripts/makefile
new file mode 100644
index 0000000..e6ea394
--- /dev/null
+++ b/tests/scripts/makefile
@@ -0,0 +1,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."