aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen-tests
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gen-tests')
-rwxr-xr-xscripts/gen-tests27
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/gen-tests b/scripts/gen-tests
new file mode 100755
index 0000000..934f13f
--- /dev/null
+++ b/scripts/gen-tests
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+PREFIX=JIT_TEST
+for s in ${@}
+do
+ exe="tests/test-jit-$(basename ${s%.*})"
+ dep="tests/${exe}.d"
+
+ echo "${PREFIX} += ${exe}" >> tests.mk
+ echo "${dep}:" >> tests.mk
+ echo "-include ${dep}" >> tests.mk
+ echo "${exe}: ${s} ejit.o" >> tests.mk
+ echo " \$(COMPILE_JIT_TEST) ${s} ejit.o -o ${exe}" >> tests.mk
+done
+
+PREFIX=BCODE_TESTS
+for s in ${@}
+do
+ exe="tests/test-bcode-$(basename ${s%.*})"
+ dep="tests/${exe}.d"
+
+ echo "${PREFIX} += ${exe}" >> tests.mk
+ echo "${dep}:" >> tests.mk
+ echo "-include ${dep}" >> tests.mk
+ echo "${exe}: ${s} ejit.o" >> tests.mk
+ echo " \$(COMPILE_BCODE_TEST) ${s} ejit.o -o ${exe}" >> tests.mk
+done