summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-18 14:36:37 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2017-09-18 14:36:37 +0200
commit80e9830758781e46a283e493a3c2f902969c0bea (patch)
treedec63641551e93189905c98de004e4c3eb4c3f65 /data/test/Makefile
parent2e15b9f8a8be3bea2b0ed1cb633c2f35582e39b8 (diff)
Starting to work on test automation.
Diffstat (limited to 'data/test/Makefile')
-rw-r--r--data/test/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/data/test/Makefile b/data/test/Makefile
new file mode 100644
index 0000000..fe2d1ff
--- /dev/null
+++ b/data/test/Makefile
@@ -0,0 +1,23 @@
+TABELLION_MAIN ?= $(shell pwd)/../../
+AST_CREATOR = ghdl --file-to-xml
+TEST_DIRS ?= $(addprefix $(shell pwd)/,$(wildcard */))
+PROPERTY_DIR ?= $(shell pwd)/../property
+SOLUTION_DIR ?= /tmp/tabellion/sol/
+ORACLE_CREATOR_SCRIPT = $(shell pwd)/oracle_creator.py
+################################################################################
+TEST_FILES = \
+ $(addsuffix /valid,$(TEST_DIRS)) \
+ $(addsuffix /invalid,$(TEST_DIRS))
+
+#VHD_FILES = $(addsuffix .vhd, $(TEST_FILES))
+AST_FILES = $(addsuffix .xml, $(TEST_FILES))
+OCL_FILES = $(addsuffix .ocl, $(TEST_FILES))
+SOL_FILES = $(addsuffix .sol, $(TEST_FILES))
+
+all: $(AST_FILES) $(OCL_FILES)
+
+$(AST_FILES): %.xml : %.vhd
+ $(AST_CREATOR) $< > $@
+
+$(OCL_FILES): %.ocl : %.vhd
+ grep -no "\$$SOL:[0-9]\+:[0-9]\+\\$$" $< | $(ORACLE_CREATOR_SCRIPT) > $@