Add unit tests make target
authorMichael Neuling <mikey@neuling.org>
Sun, 24 May 2020 02:08:47 +0000 (12:08 +1000)
committerMichael Neuling <mikey@neuling.org>
Fri, 5 Jun 2020 03:21:18 +0000 (13:21 +1000)
We don't run these but we should.

The SOC tests have bit rotted. We need to fix them but leave them out
for now.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Makefile

index fb22dd464734b9dbcdd48411f739a6fc0e42e8c9..2f7ec47e0799495e170dcfde0b56c8483b4f6b51 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -189,6 +189,20 @@ test_micropython: core_tb
 test_micropython_long: core_tb
        @./scripts/test_micropython_long.py
 
+tests_core_tb = $(patsubst %_tb,%_tb_test,$(core_tbs))
+tests_soc_tb = $(patsubst %_tb,%_tb_test,$(soc_tbs))
+
+%_test: %
+       ./$< --assert-level=error > /dev/null
+
+tests_core: $(tests_core_tb)
+
+tests_soc: $(tests_soc_tb)
+
+# FIXME SOC tests have bit rotted, so disable for now
+#tests_unit: tests_core tests_soc
+tests_unit: tests_core
+
 TAGS:
        find . -name '*.vhdl' | xargs ./scripts/vhdltags