4 COMPILER_FLAGS = /libpath:../class/lib/default/ /imports:System
5 INTERNAL_MBAS = $(TEST_RUNTIME) --debug ../mbas/mbas.exe --stacktrace $(COMPILER_FLAGS)
6 #INTERNAL_MBAS = vbc $(COMPILER_FLAGS)
9 include ../build/rules.make
11 DISTFILES = README.tests $(wildcard *.vb)
13 # We don't want debugging info :-)
16 # include the test cases source file
19 # A test is a 'no pass' if it fails on either windows or linux
23 all-local install-local:
25 # compilation is part of the testing too, so we don't actually
26 # do anything in test-local.
31 run-test-local: test-compiler-jit
34 test-compiler-jit: test-compiler-jit-real test-compiler-jit-ngtive_compile \
35 test-compiler-jit-ngtive_run
38 test-compiler-jit-real:
39 @rm -f *.exe *.out ; \
40 /bin/echo "********** Positive Tests ************" > results.out; \
41 /bin/echo "********** Positive Tests ************" ; \
42 for i in $(TEST_SOURCES) ; do \
43 /bin/echo -n -e "========================\n$$i: " >> results.out; \
44 /bin/echo -n "$$i: "; \
45 if $(INTERNAL_MBAS) $$i.vb 1>output ; then \
46 /bin/echo -n "COMPILED OK : " >> results.out; \
47 /bin/echo -n "COMPILED OK : " ;\
50 /bin/echo -n -e "FAILED COMPILATION\n---\n" >> results.out; \
51 cat output >> results.out; \
52 /bin/echo FAILED COMPILATION ; \
55 if $(TEST_RUNTIME) ./$$i.exe 1>output ; then \
56 /bin/echo "EXECUTED OK" >> results.out; \
57 /bin/echo "EXECUTED OK" ; \
59 /bin/echo -n -e "$$i : FAILED AT RUNTIME\n---\n" >> results.out; \
60 cat output >> results.out; \
61 /bin/echo "FAILED AT RUNTIME"; \
63 rm -f ./$$i.exe output; \
65 /bin/echo "========================" >> results.out
67 test-compiler-jit-ngtive_compile:
69 /bin/echo "********** Negative Compilation Tests ************" >> results.out; \
70 /bin/echo "********** Negative Compilation Tests ************" ; \
71 for i in $(TEST_NGTIVE_COMPILATION_SOURCES) ; do \
72 /bin/echo -n -e "========================\n$$i: " >> results.out; \
73 /bin/echo -n "$$i: "; \
74 if $(INTERNAL_MBAS) $$i.vb > /dev/null ; then \
75 /bin/echo "UNEXPECTED BEHAVIOUR" >> results.out; \
76 /bin/echo UNEXPECTED BEHAVIOUR ; \
78 /bin/echo OK >> results.out; \
82 rm -f ./$$i.exe output; \
85 test-compiler-jit-ngtive_run:
87 /bin/echo "********** Negative Execution Tests ************" >> results.out; \
88 /bin/echo "********** Negative Execution Tests ************" ; \
89 for i in $(TEST_NGTIVE_RUNTIME_SOURCES) ; do \
90 /bin/echo -n "$$i: "; \
91 if $(INTERNAL_MBAS) $$i.vb 1>output ; then \
94 /bin/echo -n -e "\n$$i : FAILED COMPILATION\n " >> results.out; \
95 cat output >> results.out; \
96 /bin/echo -n -e "\n========================" >> results.out; \
97 /bin/echo FAILED COMPILATION ; \
100 if $(TEST_RUNTIME) ./$$i.exe > /dev/null ; then \
101 /bin/echo -n -e "\n$$i : UNEXPECTED BEHAVIOUR\n " >> results.out; \
102 /bin/echo -n -e "\n========================" >> results.out; \
103 /bin/echo UNEXPECTED BEHAVIOUR ; \
105 /bin/echo OK >> results.out; \
108 rm -f ./$$i.exe output; \