4 COMPILER_FLAGS
= /libpath
:..
/class
/lib
/default
/ /imports
:System
5 INTERNAL_MBAS
= $(TEST_RUNTIME
) --debug ..
/mbas
/mbas.exe
--stacktrace
$(COMPILER_FLAGS
)
6 LIBRARY_OPT
= /target
:library
7 SUPPORT_DLLS
= /r
:.
/Dll1.dll
,.
/Override_dll.dll
,.
/Delegate_dll.dll
,.
/Event_dll.dll
,.
/OptionalArgu_dll.dll
8 #INTERNAL_MBAS = vbc $(COMPILER_FLAGS)
11 # removed this cause INTERNAL_MBAS now getting set in
12 # rules.make which is conflicting with this instance of
14 #include ../build/rules.make
16 DISTFILES
= README.tests
$(wildcard *.vb
)
18 # We don't want debugging info :-)
21 # include the test cases source file
24 # A test is a 'no pass' if it fails on either windows or linux
28 all-local install-local
:
30 # compilation is part of the testing too, so we don't actually
31 # do anything in test-local.
32 # echo "Inside loop" ; \
33 # echo $$i | sed -e 's/\*//' | >> $$target; \
39 run-test-local
: test-compiler-jit
42 test-compiler-jit
: test-compiler-jit-real test-compiler-jit-ngtive_compile \
43 test-compiler-jit-ngtive_run
45 TEST_TAG
= mbas-positive
48 @logpath
=.
/logs
; mkdir
-p
$$logpath ; \
49 logfile
="$$logpath/$(TEST_TAG).results"; \
50 rm -f
*.dll
$$logpath/$(TEST_TAG
).results
$$logpath/$(TEST_TAG
)-*.log
; \
51 echo
"********** Support DLLs ************" > $$logfile ; \
52 echo
"********** Support DLLs ************" ; \
53 for i in
$(TEST_DLL_SOURCES
) ; do \
54 echo
-n
-e
"========================\n$$i: " >> $$logfile; \
55 testlogfile
="$$logpath/$(TEST_TAG)-$$i.log" ; \
57 echo
"*** $(INTERNAL_MBAS) $(LIBRARY_OPT) $$i.vb" > $$testlogfile ; \
58 if
$(INTERNAL_MBAS
) $(LIBRARY_OPT
) $$i.vb
>> $$testlogfile 2>&1 ; then \
59 echo
"COMPILED OK " ; \
61 echo
"Exit code: $$?" >> $$testlogfile ; \
62 failed
="$$failed $$i" ; \
63 echo
"FAILED: $$i: COMPILATION" >> $$logfile; \
64 echo FAILED COMPILATION
; \
69 test-compiler-jit-real
: test-dlls
70 @logpath
=.
/logs
; mkdir
-p
$$logpath ; \
71 logfile
="$$logpath/$(TEST_TAG).results"; \
73 echo
"********** Positive Tests ************" >> $$logfile ; \
74 echo
"********** Positive Tests ************" ; \
75 for i in
$(TEST_SOURCES
) ; do \
76 targetexe
=`echo "$$i" |sed -e 's,\*,,'` ; \
77 echo
-n
-e
"========================\n$$i: " >> $$logfile; \
78 testlogfile
="$$logpath/$(TEST_TAG)-$$targetexe.log" ; \
80 echo
"*** $(INTERNAL_MBAS) $(SUPPORT_DLLS) $$i.vb" > $$testlogfile ; \
81 if
$(INTERNAL_MBAS
) $(SUPPORT_DLLS
) /o
:$$targetexe.exe
$$i.vb
>> $$testlogfile 2>&1 ; then \
82 echo
-n
"COMPILED OK : " ; \
84 echo
"Exit code: $$?" >> $$testlogfile ; \
85 failed
="$$failed $$i" ; \
86 echo
"FAILED: $$i: COMPILATION" >> $$logfile; \
87 echo FAILED COMPILATION
; \
90 echo
"*** $(TEST_RUNTIME) ./$$targetexe.exe" >> $$testlogfile ; \
91 if
$(TEST_RUNTIME
) .
/$$targetexe.exe
>> $$testlogfile 2>&1 ; then \
92 echo
"EXECUTED OK: $$i" >> $$logfile ; \
93 echo
"EXECUTED OK" ; rm -f
$$testlogfile ; \
95 echo
"$$i : FAILED AT RUNTIME Exit code: $$?" >> $$testlogfile ; \
96 failed
="$$failed $$i" ; \
97 echo
"FAILED AT RUNTIME"; \
99 rm -f .
/$$targetexe.exe
; \
102 test-compiler-jit-ngtive_compile
: TEST_TAG
= mbas-negative-compile
103 test-compiler-jit-ngtive_compile
:
104 @logpath
=.
/logs
; mkdir
-p
$$logpath; \
105 logfile
="$$logpath/$(TEST_TAG).results"; \
106 rm -f
*.exe
$$logpath/$(TEST_TAG
).results
$$logpath/$(TEST_TAG
)-*.log
; \
107 echo
"********** Negative Compilation Tests ************" >> $$logfile; \
108 echo
"********** Negative Compilation Tests ************" ; \
109 for i in
$(TEST_NGTIVE_COMPILATION_SOURCES
) ; do \
110 echo
-n
-e
"========================\n$$i: " >> $$logfile; \
111 testlogfile
="$$logpath/$(TEST_TAG)-$$i.log" ; \
113 echo
"*** $(INTERNAL_MBAS) $$i.vb" > $$testlogfile ; \
114 if
$(INTERNAL_MBAS
) $$i.vb
>> $$testlogfile 2>&1 ; then \
115 echo
"UNEXPECTED BEHAVIOUR" >> $$logfile ; \
116 echo UNEXPECTED BEHAVIOUR
; \
118 echo
"Exit code: $$?" >> $$testlogfile ; \
119 echo
"OK" >> $$logfile ; \
126 test-compiler-jit-ngtive_run
: TEST_TAG
= mbas-negative-runtime
127 test-compiler-jit-ngtive_run
:
128 @logpath
=.
/logs
; mkdir
-p
$$logpath; \
129 logfile
="$$logpath/$(TEST_TAG).results"; \
130 rm -f
*.exe
$$logpath/$(TEST_TAG
).results
$$logpath/$(TEST_TAG
)-*.log
; \
131 echo
"****** Negative Execution Tests ********" >> $$logfile; \
132 echo
"****** Negative Execution Tests ********" ; \
133 for i in
$(TEST_NGTIVE_RUNTIME_SOURCES
) ; do \
134 testlogfile
="$$logpath/$(TEST_TAG)-$$i.log" ; \
136 echo
"*** $(INTERNAL_MBAS) $$i.vb" > $$testlogfile ; \
137 if
$(INTERNAL_MBAS
) $$i.vb
>> $$testlogfile 2>&1 ; then \
140 echo
"Exit code: $$?" >> $$testlogfile ; \
141 failed
="$$failed $$i" ; \
142 echo
-n
-e
"\n$$i : FAILED COMPILATION\n " >> $$logfile; \
143 echo FAILED COMPILATION
; \
146 echo
"*** $(TEST_RUNTIME) ./$$i.exe" >> $$testlogfile ; \
147 if
$(TEST_RUNTIME
) .
/$$i.exe
>> $$testlogfile 2>&1 ; then \
148 echo
-n
-e
"\n$$i : UNEXPECTED BEHAVIOUR\n " >> $$logfile; \
149 echo
-n
-e
"\n========================" >> $$logfile; \
150 echo UNEXPECTED BEHAVIOUR
; rm -f
$$testlogfile ; \
152 echo
-n
-e
"\n$$i : OK\n" >> $$logfile; \