-MCS=../mcs/mcs
-CSC=csc
+CSC=csc.exe
+
+MCS=../mcs/mcs.exe
+VERIFY=../tools/verifier.exe
TEST_SOURCES = \
- test-1 test-2 test-3 test-4 test-6 test-7 test-8 test-9 test-10 \
- test-11 test-12 test-13 test-16 test-17 test-18 test-20 test-21 \
- test-23 test-24 test-25
+ test-1 test-2 test-3 test-4 test-5 test-6 test-7 test-8 test-9 test-10 \
+ test-11 test-12 test-13 test-14 test-15 test-16 test-17 test-18 test-19 test-20 \
+ test-21 test-22 test-23 test-24 test-25 test-26 test-27 test-28 test-30 \
+ test-31 test-32 test-33 test-34 test-35 test-36 test-37 test-39 test-40 \
+ test-41 test-42 test-43 test-44 test-45 test-46 test-47 test-48 test-49 test-50 \
+ test-51 test-52 test-53 test-54 test-55 test-56 test-57 test-59 \
+ test-61 test-62 test-63 test-64 test-65 test-66 test-67 test-68 test-69 test-70 \
+ test-71 test-72 test-73 test-74 test-75 test-77 test-78 test-79
+
+UNSAFE_SOURCES = \
+ unsafe-1 unsafe-2
TEST_NOPASS = \
- test-5
+ test-29 test-38 test-76
+
+all: test-compiler test-unsafe
test-compiler:
-rm *.exe
if ./$$i.exe; then \
echo $$i: ok; \
else \
- echo failed; exit; \
+ echo test $$i failed; exit; \
+ fi; \
+ else \
+ echo compiler failed on $$i; exit; \
+ fi \
+ done
+
+test-unsafe:
+ for i in $(UNSAFE_SOURCES); do \
+ if $(MCS) --unsafe $$i.cs > /dev/null; then \
+ if ./$$i.exe; then \
+ echo $$i: ok; \
+ else \
+ echo test $$i failed; exit; \
fi; \
else \
echo compiler failed on $$i; exit; \
fi \
done
+test-jit:
+ for i in $(TEST_SOURCES:.cs=.exe); do \
+ if mono ./$$i.exe; then \
+ echo $$i: ok; \
+ else \
+ echo test $$i failed; exit; \
+ fi \
+ done
+
+
+
+verify:
+ for i in $(TEST_SOURCES); do \
+ if $(MCS) -o mcs-gen-code.exe $$i.cs > /dev/null; then \
+ if $(CSC) /out:csc-gen-code.exe $$i.cs > /dev/null; then \
+ if $(VERIFY) mcs-gen-code.exe csc-gen-code.exe > /dev/null; then \
+ echo $$i: identical assemblies; \
+ else \
+ echo $$i: unidentical assemblies; exit; \
+ fi; \
+ fi \
+ fi \
+ done
+
+
casts.cs: gen-cast-test.cs
$(CSC) /out:csc-cast.exe gen-cast-test.cs
./csc-cast > casts.cs