5 BatchCompiler.exe: BatchCompiler.cs
6 gmcs -r:../../../mcs/class/lib/net_2_0/ilasm.exe BatchCompiler.cs
8 test_lib.dll: test_lib.cs
9 gmcs test_lib.cs -target:library
11 compile-stamp: generate-stamp BatchCompiler.exe test_lib.dll
13 EXE="`echo $$i | cut -d. -f1`.exe"; \
14 DLL="`echo $$i | cut -d. -f1`.dll"; \
15 if ! [ -f $$EXE ] && ! [ -f $$DLL ]; then \
19 MONO_PATH=../../../mcs/class/lib/net_2_0/ mono BatchCompiler.exe
20 #for $$I in *.il; do ilasm2 $$I; done
24 for i in *generated*; do rm $$i; done
25 for i in *.exe; do rm $$i; done
26 rm generate-stamp compile-stamp
28 generate-stamp: make_tests.sh make_bin_test.sh make_exception_branch_test.sh make_obj_store_test.sh \
29 make_stack_0_pop_test.sh make_stack_0_test.sh make_stack_1_pop_test.sh \
30 make_stack_merge_test.sh make_store_test.sh make_unary_test.sh
34 test: compile-stamp run-test
36 run-test: compile-stamp
38 TEST=`echo $$i | cut -d '.' -f 1`; \
40 FIRST=`echo $$i | cut -d '_' -f 1`; \
41 if [ "$$FIRST" == "invalid" ]; \
45 if [ "$$FIRST" == "unverifiable" ] || [ "$FIRST" == "typeunverifiable" ]; \
49 if [ "$$FIRST" == "badmd" ]; \
53 if [ "$$FIRST" == "valid" ]; \
57 if [ "$$FIRST" == "strict" ]; \
59 #in strict more it must fail under strict check and pass under non-strict check \
60 ../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \
62 ../../metadata/pedump --verify partial-md,error,warn,cls,code,non-strict $$TEST.exe >/dev/null 2>/dev/null; \
64 if [ $$R1 != 2 ] && [ $$R1 != 3 ]; then \
65 echo "$$TEST is strict but did not fail under strict check, got $${R1} but expected 2 or 3"; \
68 if [ $$R2 != 0 ]; then \
69 echo "$$TEST is strict but did not pass under non-strict check, got $${R2} but expected 0"; \
71 elif [ "$$FIRST" == "typeunverifiable" ]; then \
72 #in type unverifiable more it must fail under verifiable mode but it's ok under valid mode \
73 ../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \
75 ../../metadata/pedump --verify partial-md,error,warn,cls,code,valid-only $$TEST.exe >/dev/null 2>/dev/null; \
77 if [ $$R1 != 3 ]; then \
78 echo "$$TEST is type unverifiable but did not fail under verifiable check, got $${R1} but expected 3"; \
80 #type unverifiable result \
81 if [ $$R2 != 0 ]; then \
82 echo "$$TEST is type unverifiable but did not pass under non-strict check, got $${R2} but expected 0"; \
84 elif [ $$RES != 99 ]; then \
85 ../../metadata/pedump --verify partial-md,error,warn,cls,code $$TEST.exe >/dev/null 2>/dev/null; \
87 if [ $$R != $$RES ]; then \
88 echo "$$TEST failed expected $$RES but got $$R"; \