| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-18 16:02:57 +0200 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2017-09-18 16:02:57 +0200 |
| commit | 900db6294298c1eeb8110b73ef8dafc8175ef4a1 (patch) | |
| tree | 0bc519c4c754e5baff25c9045a313fdda5b2ec24 | |
| parent | 59d6ea1df12aa2fadcab1ec5cd22b99873721869 (diff) | |
Making progress on the automated testing...
| -rw-r--r-- | data/test/Makefile | 15 | ||||
| -rw-r--r-- | data/test/combinational_processes/valid.vhd | 42 | ||||
| -rwxr-xr-x | data/test/oracle_creator.py | 5 |
3 files changed, 28 insertions, 34 deletions
diff --git a/data/test/Makefile b/data/test/Makefile index 43e2232..de460c3 100644 --- a/data/test/Makefile +++ b/data/test/Makefile @@ -7,15 +7,16 @@ SOLUTION_DIR ?= /tmp/tabellion/sol/ ORACLE_CREATOR_SCRIPT = ${CURDIR}/oracle_creator.py ################################################################################ TEST_FILES = $(addsuffix /valid,$(TEST_DIRS)) +SOLUTION_FILES = $(addsuffix .sol,$(addprefix $(SOLUTION_DIR)/,$(TEST_DIRS))) #VHD_FILES = $(addsuffix .vhd, $(TEST_FILES)) AST_FILES = $(addsuffix .xml, $(TEST_FILES)) OCL_FILES = $(addsuffix .ocl, $(TEST_FILES)) +RSL_FILES = $(addsuffix .rsl, $(TEST_DIRS)) -all: $(AST_FILES) $(OCL_FILES) - for TD in $(TEST_DIRS) ; do \ - $(MAKE) -C $$TD PROPERTY_FILES=$$TD.pro - +export + +all: $(AST_FILES) $(OCL_FILES) $(RSL_FILES) clean: rm -f $(AST_FILES) @@ -27,4 +28,8 @@ $(AST_FILES): %.xml : %.vhd $(OCL_FILES): %.ocl : %.vhd grep -no "\$$SOL:[0-9]\+:[0-9]\+\\$$" $< | $(ORACLE_CREATOR_SCRIPT) > $@ - +$(RSL_FILES): %.rsl : %/valid.ocl %/valid.xml + $(MAKE) -C $(TABELLION_MAIN) \ + AST_FILE=${PWD}/$(patsubst %.rsl,%,$@)/valid.xml \ + PROPERTY_FILES=$(PROPERTY_DIR)/$(patsubst %.rsl,%.pro,$@) \ + TEMPLATE_DIR=${PWD}/$(patsubst %.rsl,%,$@)/ diff --git a/data/test/combinational_processes/valid.vhd b/data/test/combinational_processes/valid.vhd index 1703c6a..8b6b814 100644 --- a/data/test/combinational_processes/valid.vhd +++ b/data/test/combinational_processes/valid.vhd @@ -16,13 +16,10 @@ architecture RTL of valid is signal st0: enum_t; signal n0, n1, n2, n3: natural range 0 to 3; begin - -- $SOL:0:0$ - s0 <= s1; - -- $SOL:1:0$ - s0 <= (s1 and s2); + s0 <= s1; -- $SOL:0:0$ + s0 <= (s1 and s2); -- $SOL:1:0$ - -- $SOL:2:0$ - process (s0, s1) + process (s0, s1) -- $SOL:2:0$ begin case s1 is when '0' => @@ -32,8 +29,7 @@ begin end case; end process; - -- $SOL:3:0$ - process (s0, s1) + process (s0, s1) -- $SOL:3:0$ begin case s1 is when '0' => @@ -45,8 +41,7 @@ begin end case; end process; - -- $SOL:4:0$ - process (s0, s1) + process (s0, s1) -- $SOL:4:0$ begin op2 <= '0'; case s1 is @@ -60,8 +55,7 @@ begin end case; end process; - -- $SOL:5:0$ - process (s0, s1, s2) + process (s0, s1, s2) -- $SOL:5:0$ begin op2 <= '0'; case s1 is @@ -80,30 +74,26 @@ begin end case; end process; - -- $SOL:6:0$ - with ip0 select + with ip0 select -- $SOL:6:0$ s1 <= ip1 when '0', ip2 when '1', ip3 when others; - -- $SOL:7:0$ - with st0 select + with st0 select -- $SOL:7:0$ s2 <= ip1 when V0, ip2 when V1, ip3 when V2, s1 when V3; - -- $SOL:8:0$ - with st0 select + with st0 select -- $SOL:8:0$ s2 <= ip1 when V0, ip2 when V1, ip3 when others; - -- $SOL:9:0$ - process (s0, s1, s2, s3) + process (s0, s1, s2, s3) -- $SOL:9:0$ begin case st0 is when V3 => @@ -117,8 +107,7 @@ begin end case; end process; - -- $SOL:10:0$ - process (s0, s1, s2, s3) + process (s0, s1, s2, s3) -- $SOL:10:0$ begin case st0 is when V3 => @@ -130,8 +119,7 @@ begin end case; end process; - -- $SOL:11:0$ - process (n0, n2) + process (n0, n2) -- $SOL:11:0$ begin case n0 is when 0 => @@ -143,8 +131,7 @@ begin end case; end process; - -- $SOL:12:0$ - process (n0, n2) + process (n0, n2) -- $SOL:12:0$ begin case n0 is when 0 => @@ -158,8 +145,7 @@ begin end case; end process; - -- $SOL:13:0$ - process (n0, n2) + process (n0, n2) -- $SOL:13:0$ begin case n0 is when 0 => diff --git a/data/test/oracle_creator.py b/data/test/oracle_creator.py index 8ef5a14..15f000b 100755 --- a/data/test/oracle_creator.py +++ b/data/test/oracle_creator.py @@ -12,7 +12,10 @@ for line in sys.stdin.readlines(): if (len(solutions) <= solution_number): solutions.insert(solution_number, list()) - solutions[solution_number].insert(int(solution_item_number), line_number) + solutions[solution_number].insert( + int(solution_item_number), + ("\"" + line_number + "\"") + ) for sol in solutions: print("(" + (' '.join(sol)) + ")") |


