2008-05-01 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / tests / verifier / Makefile
index e208f1856dc9527203f5fcbc37af2d955495a7df..fcfa0a82441368335bbc2d24c9a2758e6d34296c 100644 (file)
@@ -1,10 +1,18 @@
 
 %.exe: %.cil
-       ilasm -out:$@ $<
+       ilasm2 -out:$@ $<
 
-compile-stamp: generate-stamp
-       for i in *.il; do ilasm2 $$i; done
-       for i in *.cs; do gmcs /unsafe $$i; done
+BatchCompiler.exe: BatchCompiler.cs
+       gmcs -r:../../../../mcs/class/lib/net_2_0/ilasm.exe BatchCompiler.cs
+
+compile-stamp: generate-stamp BatchCompiler.exe
+       for i in *.cs; do \
+               EXE="`echo $$i | cut -d. -f1`.exe"; \
+               if ! [ -f $$EXE ]; then \
+                       gmcs /unsafe $$i; \
+               fi \
+       done 
+       MONO_PATH=../../../../mcs/class/lib/net_2_0/ mono BatchCompiler.exe
        touch compile-stamp
 
 clean:
@@ -20,7 +28,7 @@ generate-stamp: make_tests.sh make_bin_test.sh make_exception_branch_test.sh mak
 
 test: compile-stamp run-test
 
-run-test:
+run-test: compile-stamp
        @for i in *.exe; do \
                TEST=`echo $$i | cut -d '.' -f 1`; \
                RES=99; \
@@ -29,7 +37,7 @@ run-test:
                then \
                        RES=3; \
                fi; \
-               if [ "$$FIRST" == "unverifiable" ]; \
+               if [ "$$FIRST" == "unverifiable" ] || [ "$FIRST" == "typeunverifiable" ]; \
                then \
                        RES=2; \
                fi; \
@@ -64,7 +72,7 @@ run-test:
                        if [ $$R2 != 0 ]; then \
                                echo "$$TEST is type unverifiable but did not pass under non-strict check, got $${R2} but expected 0"; \
                        fi \
-               else \
+               elif [ $RES != 99 ]; then \
                        ../../metadata/pedump --verify error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \
                        R=$$?; \
                        if [ $$R != $$RES ]; then \