3 COMPILER_FLAGS = /libpath:../class/lib /imports:System
4 INTERNAL_MBAS = $(TEST_RUNTIME) --debug ../mbas/mbas.exe --stacktrace $(COMPILER_FLAGS)
5 #INTERNAL_MBAS = vbc $(COMPILER_FLAGS)
8 include ../build/rules.make
10 DISTFILES = README.tests $(wildcard *.vb)
12 # We don't want debugging info :-)
15 # include the test cases source file
18 # A test is a 'no pass' if it fails on either windows or linux
22 all-local install-local:
24 # compilation is part of the testing too, so we don't actually
25 # do anything in test-local.
30 run-test-local: test-compiler-jit
33 test-compiler-jit: test-compiler-jit-real test-compiler-jit-ngtive_compile \
34 test-compiler-jit-ngtive_run
37 test-compiler-jit-real:
38 @rm -f *.exe *.out ; \
39 /bin/echo "********** Positive Tests ************" > results.out; \
40 /bin/echo "********** Positive Tests ************" ; \
41 for i in $(TEST_SOURCES) ; do \
42 /bin/echo -n -e "========================\n$$i: " >> results.out; \
43 /bin/echo -n "$$i: "; \
44 if $(INTERNAL_MBAS) $$i.vb 1>output ; then \
45 /bin/echo -n "COMPILED OK : " >> results.out; \
46 /bin/echo -n "COMPILED OK : " ;\
49 /bin/echo -n -e "FAILED COMPILATION\n---\n" >> results.out; \
50 cat output >> results.out; \
51 /bin/echo FAILED COMPILATION ; \
54 if $(TEST_RUNTIME) ./$$i.exe 1>output ; then \
55 /bin/echo "EXECUTED OK" >> results.out; \
56 /bin/echo "EXECUTED OK" ; \
58 /bin/echo -n -e "$$i : FAILED AT RUNTIME\n---\n" >> results.out; \
59 cat output >> results.out; \
60 /bin/echo "FAILED AT RUNTIME"; \
62 rm -f ./$$i.exe output; \
64 /bin/echo "========================" >> results.out
66 test-compiler-jit-ngtive_compile:
68 /bin/echo "********** Negative Compilation Tests ************" >> results.out; \
69 /bin/echo "********** Negative Compilation Tests ************" ; \
70 for i in $(TEST_NGTIVE_COMPILATION_SOURCES) ; do \
71 /bin/echo -n -e "========================\n$$i: " >> results.out; \
72 /bin/echo -n "$$i: "; \
73 if $(INTERNAL_MBAS) $$i.vb > /dev/null ; then \
74 /bin/echo "UNEXPECTED BEHAVIOUR" >> results.out; \
75 /bin/echo UNEXPECTED BEHAVIOUR ; \
77 /bin/echo OK >> results.out; \
81 rm -f ./$$i.exe output; \
84 test-compiler-jit-ngtive_run:
86 /bin/echo "********** Negative Execution Tests ************" >> results.out; \
87 /bin/echo "********** Negative Execution Tests ************" ; \
88 for i in $(TEST_NGTIVE_RUNTIME_SOURCES) ; do \
89 /bin/echo -n "$$i: "; \
90 if $(INTERNAL_MBAS) $$i.vb 1>output ; then \
93 /bin/echo -n -e "\n$$i : FAILED COMPILATION\n " >> results.out; \
94 cat output >> results.out; \
95 /bin/echo -n -e "\n========================" >> results.out; \
96 /bin/echo FAILED COMPILATION ; \
99 if $(TEST_RUNTIME) ./$$i.exe > /dev/null ; then \
100 /bin/echo -n -e "\n$$i : UNEXPECTED BEHAVIOUR\n " >> results.out; \
101 /bin/echo -n -e "\n========================" >> results.out; \
102 /bin/echo UNEXPECTED BEHAVIOUR ; \
104 /bin/echo OK >> results.out; \
107 rm -f ./$$i.exe output; \