2003-12-28 Ben Maurer <bmaurer@users.sourceforge.net>
[mono.git] / mcs / btests / Makefile
1 thisdir = btests
2 SUBDIRS = 
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)
6 all: test-compiler-jit 
7
8 include ../build/rules.make
9
10 DISTFILES = README.tests $(wildcard *.vb)
11
12 # We don't want debugging info :-)
13 USE_MCS_FLAGS :=
14
15 # include the test cases source file
16 include Test.Sources
17
18 # A test is a 'no pass' if it fails on either windows or linux
19
20 #TEST_NOPASS = \
21
22 all-local install-local:
23
24 # compilation is part of the testing too, so we don't actually 
25 # do anything in test-local.
26
27 test-local: 
28
29
30 run-test-local: test-compiler-jit 
31
32
33 test-compiler-jit: test-compiler-jit-real test-compiler-jit-ngtive_compile \
34 test-compiler-jit-ngtive_run
35
36
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 : " ;\
47                         true ; \
48             else \
49                         /bin/echo -n -e "FAILED COMPILATION\n---\n" >> results.out; \
50                         cat output >> results.out; \
51                 /bin/echo FAILED COMPILATION ;  \
52                         continue;\
53             fi ; \
54             if $(TEST_RUNTIME) ./$$i.exe 1>output ; then \
55                         /bin/echo "EXECUTED OK" >> results.out; \
56                 /bin/echo "EXECUTED OK" ; \
57             else \
58                         /bin/echo -n -e "$$i : FAILED AT RUNTIME\n---\n" >> results.out; \
59                         cat output >> results.out; \
60                 /bin/echo "FAILED AT RUNTIME"; \
61             fi ; \
62             rm -f ./$$i.exe output; \
63         done; \
64         /bin/echo "========================" >> results.out
65
66 test-compiler-jit-ngtive_compile:
67         @rm -f *.exe ; \
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 ; \
76             else \
77                         /bin/echo OK >> results.out; \
78                         /bin/echo OK; \
79                 continue;\
80             fi ; \
81             rm -f ./$$i.exe output; \
82         done
83
84 test-compiler-jit-ngtive_run:
85         @rm -f *.exe; \
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 \
91                         true ; \
92             else \
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 ; \
97                 continue;\
98             fi ; \
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 ; \
103             else \
104                         /bin/echo OK >> results.out; \
105                         /bin/echo OK; \
106             fi ; \
107             rm -f ./$$i.exe output; \
108         done