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