This commit was manufactured by cvs2svn to create branch 'mono-1-0'.
[mono.git] / mcs / btests / Makefile
1 thisdir = btests
2 SUBDIRS = 
3 TEST_RUNTIME = mono
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)
7 all: test-compiler-jit 
8
9 # removed this cause INTERNAL_MBAS now getting set in 
10 # rules.make which is conflicting with this instance of 
11 # INTERNAL_MBAS
12 #include ../build/rules.make
13
14 DISTFILES = README.tests $(wildcard *.vb)
15
16 # We don't want debugging info :-)
17 USE_MCS_FLAGS :=
18
19 # include the test cases source file
20 include Test.Sources
21
22 # A test is a 'no pass' if it fails on either windows or linux
23
24 #TEST_NOPASS = \
25
26 all-local install-local:
27
28 # compilation is part of the testing too, so we don't actually 
29 # do anything in test-local.
30
31 test-local: 
32
33
34 run-test-local: test-compiler-jit 
35
36
37 test-compiler-jit: test-compiler-jit-real test-compiler-jit-ngtive_compile \
38 test-compiler-jit-ngtive_run
39
40
41 test-compiler-jit-real:
42         @rm -f *.exe *.out ; \
43         /bin/echo "********** Positive Tests ************" > results.out; \
44         /bin/echo "********** Positive Tests ************" ; \
45         for i in $(TEST_SOURCES) ; do \
46                 /bin/echo -n -e "========================\n$$i: " >> results.out; \
47             /bin/echo -n "$$i: "; \
48             if $(INTERNAL_MBAS) $$i.vb 1>output ; then \
49             /bin/echo -n "COMPILED OK : " >> results.out; \
50                 /bin/echo -n "COMPILED OK : " ;\
51                         true ; \
52             else \
53                         /bin/echo -n -e "FAILED COMPILATION\n---\n" >> results.out; \
54                         cat output >> results.out; \
55                 /bin/echo FAILED COMPILATION ;  \
56                         continue;\
57             fi ; \
58             if $(TEST_RUNTIME) ./$$i.exe 1>output ; then \
59                         /bin/echo "EXECUTED OK" >> results.out; \
60                 /bin/echo "EXECUTED OK" ; \
61             else \
62                         /bin/echo -n -e "$$i : FAILED AT RUNTIME\n---\n" >> results.out; \
63                         cat output >> results.out; \
64                 /bin/echo "FAILED AT RUNTIME"; \
65             fi ; \
66             rm -f ./$$i.exe output; \
67         done; \
68         /bin/echo "========================" >> results.out
69
70 test-compiler-jit-ngtive_compile:
71         @rm -f *.exe ; \
72         /bin/echo "********** Negative Compilation Tests ************" >> results.out; \
73         /bin/echo "********** Negative Compilation Tests ************" ; \
74         for i in $(TEST_NGTIVE_COMPILATION_SOURCES) ; do \
75                 /bin/echo -n -e "========================\n$$i: " >> results.out; \
76                 /bin/echo -n "$$i: "; \
77             if $(INTERNAL_MBAS) $$i.vb > /dev/null ; then \
78                         /bin/echo "UNEXPECTED BEHAVIOUR" >> results.out; \
79                 /bin/echo UNEXPECTED BEHAVIOUR ; \
80             else \
81                         /bin/echo OK >> results.out; \
82                         /bin/echo OK; \
83                 continue;\
84             fi ; \
85             rm -f ./$$i.exe output; \
86         done
87
88 test-compiler-jit-ngtive_run:
89         @rm -f *.exe; \
90         /bin/echo "********** Negative Execution Tests ************" >> results.out; \
91         /bin/echo "********** Negative Execution Tests ************" ; \
92         for i in $(TEST_NGTIVE_RUNTIME_SOURCES) ; do \
93             /bin/echo -n "$$i: "; \
94             if $(INTERNAL_MBAS) $$i.vb 1>output ; then \
95                         true ; \
96             else \
97                         /bin/echo -n -e "\n$$i : FAILED COMPILATION\n " >> results.out; \
98                         cat output >> results.out; \
99                         /bin/echo -n -e "\n========================" >> results.out; \
100                 /bin/echo FAILED COMPILATION ; \
101                 continue;\
102             fi ; \
103             if $(TEST_RUNTIME) ./$$i.exe > /dev/null ; then \
104                         /bin/echo -n -e "\n$$i : UNEXPECTED BEHAVIOUR\n " >> results.out; \
105                         /bin/echo -n -e "\n========================" >> results.out; \
106                 /bin/echo UNEXPECTED BEHAVIOUR ; \
107             else \
108                         /bin/echo OK >> results.out; \
109                         /bin/echo OK; \
110             fi ; \
111             rm -f ./$$i.exe output; \
112         done