aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen-tests
blob: 47ff9c9a406ddc22c61f071331e98d136a688f8b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

PREFIX=TESTS
for s in ${@}
do
	src="${s#*/}"
	exe="tests/test-${src%.*}"
	dep="tests/${exe}.d"

	echo "${PREFIX} += ${exe}"				>> tests.mk
	echo "${dep}:"						>> tests.mk
	echo "-include ${dep}"					>> tests.mk
	echo "${exe}: ${s} libejit.a"				>> tests.mk
	echo "	\$(COMPILE_TEST) ${s} libejit.a -o ${exe} -lm"	>> tests.mk
	echo "	./${exe}  \t# bytecode"				>> tests.mk
	echo "	./${exe} 1\t# jit"				>> tests.mk
done