aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2018-04-05 11:53:42 +0200
committerCyril SIX <cyril.six@kalray.eu>2018-04-05 11:53:42 +0200
commitebf476c1c9bebaf9b108302ed4c1a5a8da0243a3 (patch)
treeea193458b9f3f0c96ec59acb690f4cf3493d1fa0 /test/mppa
parentbe6796ea9e15f543606191bd6a26281ba37421ab (diff)
downloadcompcert-kvx-ebf476c1c9bebaf9b108302ed4c1a5a8da0243a3.tar.gz
compcert-kvx-ebf476c1c9bebaf9b108302ed4c1a5a8da0243a3.zip
MPPA - Added regression tests
Diffstat (limited to 'test/mppa')
-rw-r--r--test/mppa/Makefile35
-rw-r--r--test/mppa/general/branch.c (renamed from test/mppa/branch.c)0
-rw-r--r--test/mppa/general/call.c (renamed from test/mppa/call.c)0
-rw-r--r--test/mppa/general/for.c (renamed from test/mppa/for.c)0
-rw-r--r--test/mppa/general/forvar.c (renamed from test/mppa/forvar.c)0
-rw-r--r--test/mppa/general/forvarl.c (renamed from test/mppa/forvarl.c)0
-rw-r--r--test/mppa/general/output/branch.bin.exp1
-rw-r--r--test/mppa/general/output/call.bin.exp1
-rw-r--r--test/mppa/general/output/for.bin.exp1
-rw-r--r--test/mppa/general/output/forvar.bin.exp1
-rw-r--r--test/mppa/general/output/forvarl.bin.exp1
-rw-r--r--test/mppa/general/output/simple.bin.exp1
-rw-r--r--test/mppa/general/simple.c (renamed from test/mppa/simple.c)0
13 files changed, 27 insertions, 14 deletions
diff --git a/test/mppa/Makefile b/test/mppa/Makefile
index 07224dc8..60433f03 100644
--- a/test/mppa/Makefile
+++ b/test/mppa/Makefile
@@ -1,5 +1,7 @@
-TESTS=simple call branch for forvar forvarl
+DIR=general
+TESTNAMES=simple call branch for forvar forvarl
+TESTS=$(addprefix $(DIR)/,$(TESTNAMES))
ELF=$(addsuffix .bin,$(TESTS))
ASM=$(addsuffix .s,$(TESTS))
DEBUG:=$(if $(DEBUG),"-dall",)
@@ -8,24 +10,29 @@ all: $(ELF)
nobin: $(ASM)
-%.bin: %.s
+$(DIR)/%.bin: $(DIR)/%.s
k1-gcc $< -o $@
.SECONDARY:
-%.s: %.c
+$(DIR)/%.s: $(DIR)/%.c
ccomp $(DEBUG) -O0 -v -S $< -o $@
.PHONY:
+check: $(ELF)
+ bash check.sh $(ELF)
+
+.PHONY:
clean:
- rm -f *.alloctrace
- rm -f *.cm
- rm -f *.compcert.c
- rm -f *.i
- rm -f *.light.c
- rm -f *.ltl
- rm -f *.mach
- rm -f *.parsed.c
- rm -f *.rtl.?
- rm -f *.s
- rm -rf profile/
+ rm -f $(DIR)/*.alloctrace
+ rm -f $(DIR)/*.cm
+ rm -f $(DIR)/*.compcert.c
+ rm -f $(DIR)/*.i
+ rm -f $(DIR)/*.light.c
+ rm -f $(DIR)/*.ltl
+ rm -f $(DIR)/*.mach
+ rm -f $(DIR)/*.parsed.c
+ rm -f $(DIR)/*.rtl.?
+ rm -f $(DIR)/*.s
+ rm -f $(DIR)/output/*.out
+ rm -rf $(DIR)/profile/
rm -f $(ELF)
diff --git a/test/mppa/branch.c b/test/mppa/general/branch.c
index dee15568..dee15568 100644
--- a/test/mppa/branch.c
+++ b/test/mppa/general/branch.c
diff --git a/test/mppa/call.c b/test/mppa/general/call.c
index 3f58b756..3f58b756 100644
--- a/test/mppa/call.c
+++ b/test/mppa/general/call.c
diff --git a/test/mppa/for.c b/test/mppa/general/for.c
index 6a3a6cc8..6a3a6cc8 100644
--- a/test/mppa/for.c
+++ b/test/mppa/general/for.c
diff --git a/test/mppa/forvar.c b/test/mppa/general/forvar.c
index 1a075734..1a075734 100644
--- a/test/mppa/forvar.c
+++ b/test/mppa/general/forvar.c
diff --git a/test/mppa/forvarl.c b/test/mppa/general/forvarl.c
index 90de7411..90de7411 100644
--- a/test/mppa/forvarl.c
+++ b/test/mppa/general/forvarl.c
diff --git a/test/mppa/general/output/branch.bin.exp b/test/mppa/general/output/branch.bin.exp
new file mode 100644
index 00000000..7ed6ff82
--- /dev/null
+++ b/test/mppa/general/output/branch.bin.exp
@@ -0,0 +1 @@
+5
diff --git a/test/mppa/general/output/call.bin.exp b/test/mppa/general/output/call.bin.exp
new file mode 100644
index 00000000..abdfb053
--- /dev/null
+++ b/test/mppa/general/output/call.bin.exp
@@ -0,0 +1 @@
+60
diff --git a/test/mppa/general/output/for.bin.exp b/test/mppa/general/output/for.bin.exp
new file mode 100644
index 00000000..b6a7d89c
--- /dev/null
+++ b/test/mppa/general/output/for.bin.exp
@@ -0,0 +1 @@
+16
diff --git a/test/mppa/general/output/forvar.bin.exp b/test/mppa/general/output/forvar.bin.exp
new file mode 100644
index 00000000..b6a7d89c
--- /dev/null
+++ b/test/mppa/general/output/forvar.bin.exp
@@ -0,0 +1 @@
+16
diff --git a/test/mppa/general/output/forvarl.bin.exp b/test/mppa/general/output/forvarl.bin.exp
new file mode 100644
index 00000000..573541ac
--- /dev/null
+++ b/test/mppa/general/output/forvarl.bin.exp
@@ -0,0 +1 @@
+0
diff --git a/test/mppa/general/output/simple.bin.exp b/test/mppa/general/output/simple.bin.exp
new file mode 100644
index 00000000..7f8f011e
--- /dev/null
+++ b/test/mppa/general/output/simple.bin.exp
@@ -0,0 +1 @@
+7
diff --git a/test/mppa/simple.c b/test/mppa/general/simple.c
index 725aff68..725aff68 100644
--- a/test/mppa/simple.c
+++ b/test/mppa/general/simple.c