summaryrefslogtreecommitdiff
path: root/digital/ucoolib/build/tools/test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'digital/ucoolib/build/tools/test/Makefile')
-rw-r--r--digital/ucoolib/build/tools/test/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/digital/ucoolib/build/tools/test/Makefile b/digital/ucoolib/build/tools/test/Makefile
new file mode 100644
index 00000000..59bd2da0
--- /dev/null
+++ b/digital/ucoolib/build/tools/test/Makefile
@@ -0,0 +1,16 @@
+CONFIG_GEN = ../config-gen
+MODULES_CONFIG = a-Config b-Config
+
+TARGETS := host:host stm32f4:stm32f4 stm32f4:arm
+
+TESTS = ok nok-unknown nok-nodefault nok-missdefault nok-toomany nok-badtarget
+
+all: $(TESTS:%=test-%)
+
+test-%: Config-% $(MODULES_CONFIG) $(CONFIG_GEN)
+ expect=$(if $(filter ok,$*),0,1); \
+ $(CONFIG_GEN) -p $< -H out-$*/%.hh -T "$(TARGETS)" $(MODULES_CONFIG); \
+ test $$expect -eq $$?
+
+clean:
+ rm -rf $(TESTS:%=out-%)