2 # use make run-test PROFILE=net_2_0
7 include ..
/build
/rules.make
9 DISTFILES
= README.tests
$(wildcard dlls
/**/*.cs
)
10 DISTFILES
+= $(wildcard *.cs
) $(wildcard *.il
) $(wildcard *.xml
) $(wildcard *.inc
) $(wildcard known-issues-
*) $(wildcard *.snk
)
12 with_mono_path
= MONO_PATH
="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
14 ilasm
= $(topdir
)/class
/lib
/$(PROFILE
)/ilasm.exe
15 ILASM
= MONO_PATH
="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME
) $(RUNTIME_FLAGS
) $(ilasm
)
20 all-local
$(STD_TARGETS
:=-local
):
22 VALID_PROFILE
:= $(filter net_2_0 moonlight net_4_0
, $(PROFILE
))
25 bootstrap-cast.exe
: gen-cast-test.cs
26 $(BOOT_COMPILE
) -target
:exe
/out
:$@
$<
28 casts.cs
: bootstrap-cast.exe
29 $(with_mono_path
) $(RUNTIME
) $(RUNTIME_FLAGS
) $< >$@
31 casts-mcs.exe
: casts.cs
32 $(CSCOMPILE
) -target
:exe
/out
:$@
$<
34 casts-boot.exe
: casts.cs
35 $(BOOT_COMPILE
) -target
:exe
/out
:$@
$<
37 boot-casts.out
: casts-boot.exe
38 $(with_mono_path
) $(RUNTIME
) $(RUNTIME_FLAGS
) $< >$@
40 mcs-casts.out
: casts-mcs.exe
41 $(with_mono_path
) $(RUNTIME
) $(RUNTIME_FLAGS
) $< >$@
43 test-casts
: boot-casts.out mcs-casts.out
45 -rm -f bootstrap-cast.exe casts.cs casts-boot.exe casts-mcs.exe boot-casts.out mcs-casts.out
47 eval.exe
: eval-tests.cs
49 ifeq (net_4_0
, $(PROFILE
))
52 LOCAL_RUNTIME_FLAGS
= --verify-all
53 DEFINES
= -compiler-options
:"-d:NET_4_0"
54 #TOPTIONS += '-il:ver-il-dmcs.xml'
56 ifeq (moonlight
, $(PROFILE
))
59 LOCAL_RUNTIME_FLAGS
= --security
=temporary-smcs-hack
60 DEFINES
= -compiler-options
:"-d:MOONLIGHT"
62 ifeq (net_2_0
, $(PROFILE
))
65 LOCAL_RUNTIME_FLAGS
= --verify-all
66 TOPTIONS
+= '-il:ver-il-gmcs.xml'
69 COMPILER
= $(topdir
)/class
/lib
/$(PROFILE
)/$(COMPILER_NAME
).exe
70 TESTER
= MONO_RUNTIME
='$(RUNTIME)' $(TEST_RUNTIME
) $(RUNTIME_FLAGS
) $(LOCAL_RUNTIME_FLAGS
) $(topdir
)/class
/lib
/$(PROFILE
)/compiler-tester.exe
72 TEST_ILS
:= $(wildcard *-lib.il
)
75 $(CSCOMPILE
) eval-test.cs
-r
:Mono.CSharp.dll
76 $(with_mono_path
) $(RUNTIME
) $(RUNTIME_FLAGS
) eval-test.exe
79 cd ..
/class
/Mono.CSharp
&& $(MAKE
) NO_DIR_CHECK
=yes
81 check: build-compiler-lib eval-test
82 $(TESTER
) -mode
:pos
-files
:$(TEST_PATTERN
) -compiler
:$(COMPILER
) -issues
:known-issues-
$(COMPILER_NAME
) -log
:$(COMPILER_NAME
).log
$(TOPTIONS
) $(DEFINES
)
87 run-test-local
: $(TEST_ILS
:.il
=.dll
) setup
check
89 # Temporary testing targets
92 $(TESTER
) -mode
:pos
-files
:'test-*.cs' -compiler
:gmcs.exe
-issues
:known-issues-
$(COMPILER_NAME
) -log
:$(COMPILER_NAME
).log
-verbose
96 $(TESTER
) -mode
:pos
-files
:'*test-*.cs' -compiler
:gmcs.exe
-issues
:known-issues-
$(COMPILER_NAME
) -log
:$(COMPILER_NAME
).log
-verbose
103 -rm -f
*.exe
*.dll
*.netmodule
*.out
*.pdb
*.mdb casts.cs
*.log
106 dist-local
: dist-default
107 rm -f
$(distdir
)/casts.cs
115 $(ILASM
) /dll
/out
:$@
$<
118 $(ILASM
) /dll property-il.il
119 $(CSCOMPILE
) /r
:property-il.dll property-main.cs
/out
:property-main.exe
120 $(TEST_RUNTIME
) property-main.exe
122 $(CSCOMPILE
) -t
:library dlls
/test-679-2
/test-679-lib-2.cs
123 $(CSCOMPILE
) -t
:library dlls
/test-679-1
/test-679-lib.cs
-r
:dlls
/test-679-2
/test-679-lib-2.dll