include ../../build/rules.make
export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/corlib
-# corlib is crazy to build so we skip build/library.make and do stuff
-# ourselves.
-#
-# Here, we define a bunch of variables.
-
-corlib_flags = /unsafe /nostdlib
-LOCAL_MCS_FLAGS = /nowarn:649 /nowarn:169 -d:INSIDE_CORLIB
-
LIBRARY = corlib.dll
LIBRARY_NAME = mscorlib.dll
-LIB_MCS_FLAGS = $(corlib_flags)
+LIB_MCS_FLAGS = $(RESOURCE_FILES:%=-resource:%)
LIBRARY_USE_INTERMEDIATE_FILE = yes
-# disable, until people fix their code...
-#corlib_flags = /unsafe /nostdlib /d:INSIDE_CORLIB
-
-LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
-
-CLEAN_FILES = $(cmplib) $(reslib) $(plattestlib) $(plattestlib).sources \
- $(cmp_response) $(cmp_makefrag) \
- $(res_response) $(res_makefrag) \
- $(cmppdb) $(respdb) $(plattestpdb)
-
-# If building on a non mono-native platform, default
-# to running the unit tests on its corlib, to see if
-# our tests are complaint with their (hopefully bug-free)
-# corlib. If on a mono-native platform, test our actual
-# corlib.
-#
-# You can access either one on demand with either 'make
-# run-monotest' or 'make run-plattest'.
+ifeq (basic, $(PROFILE))
-plattestlib = corlib_plattest.dll
-plattestpdb = $(patsubst %.dll,%.pdb,$(plattestlib))
-reslib = $(topdir)/class/lib/$(PROFILE)/corlib_res.dll
-cmplib = $(topdir)/class/lib/$(PROFILE)/corlib_cmp.dll
+else
-$(plattestlib).sources: corlib_test.dll.sources $(plattestlib).excludes
- sort corlib_test.dll.sources $(plattestlib).excludes | uniq -u >$@
+ifeq (2, $(FRAMEWORK_VERSION_MAJOR))
+LIB_MCS_FLAGS += --runtime:v2
+else
+ifeq (4, $(FRAMEWORK_VERSION_MAJOR))
+LIB_MCS_FLAGS += --runtime:v4
+else
+$(error Unknown framework version)
+endif
+endif
-TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168 -nowarn:219 -nowarn:0618 -nowarn:0672 -unsafe
+endif
-ifndef PLATFORM_MONO_NATIVE
-test_lib = $(plattestlib)
-test_against = $(PLATFORM_CORLIB)
-HAVE_CS_TESTS = $(plattestlib).sources
+LIBRARY_COMPILE = $(BOOT_COMPILE)
+LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
-## for now, compiling the testsuite with CSC causes CS0583. So compile with internal MCS
-TEST_COMPILE = $(INTERNAL_MCS) $(USE_MCS_FLAGS)
-endif
+RESOURCE_FILES = \
+ resources/collation.core.bin \
+ resources/collation.tailoring.bin \
+ resources/collation.cjkCHS.bin \
+ resources/collation.cjkCHT.bin \
+ resources/collation.cjkJA.bin \
+ resources/collation.cjkKO.bin \
+ resources/collation.cjkKOlv2.bin
-ifdef PLATFORM_MONO_NATIVE
-run-monotest: run-test
-else
-run-monotest:
- $(MAKE) $(reslib)
- $(MAKE) test_lib=corlib_test.dll test_against=$(reslib) run-test
+LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618 -d:INSIDE_CORLIB -d:LIBC
+DEFAULT_REFERENCES =
-run-plattest:
- $(MAKE) test_lib=$(plattestlib) test_against='$(PLATFORM_CORLIB)' run-test
-endif
+# System.IO/DirectoryInfoTest.cs needs Mono.Posix
+TEST_MCS_FLAGS = -debug+ -debug:full -nowarn:168,219,618,672 -unsafe -r:Mono.Posix.dll -r:System.Core.dll -define:MONO_DATACONVERTER_STATIC_METHODS
EXTRA_DISTFILES = \
- corlib.dll.win32-excludes corlib_cmp.dll.excludes corlib_res.dll.excludes \
- $(plattestlib).excludes \
- Test/ms_run_test.sh \
Test/resources/MyResources.resources \
+ Test/resources/MyResources.de.resources \
Test/resources/Empty.resources \
- Test/resources/AFile.txt
+ Test/resources/AFile.txt \
+ Test/resources/StreamTest.resources \
+ Test/resources/StreamTest.ja.resources \
+ Test/resources/bug81759.resources \
+ Test/resources/415628.bin \
+ Test/resources/Fergie.GED \
+ $(RESOURCE_FILES)
-LIBRARY_COMPILE = $(BOOT_COMPILE)
-
-include ../../build/library.make
+include $(topdir)/build/library.make
+ifdef FIXME_CORLIB_CMP
# corlib_cmp
-
-cmppdb = $(patsubst %.dll,%.pdb,$(cmplib))
+corlib_flags = -unsafe -nostdlib
+cmplib = $(topdir)/class/lib/$(PROFILE)/corlib_cmp.dll
+cmppdb = $(cmplib:.dll=.pdb)
cmp_response = $(depsdir)/$(PROFILE)_corlib_cmp.dll.response
cmp_makefrag = $(depsdir)/$(PROFILE)_corlib_cmp.dll.makefrag
-cmp_flags = /r:$(PLATFORM_CORLIB) $(corlib_flags)
+cmp_flags = -r:$(PLATFORM_CORLIB) $(corlib_flags)
+
+EXTRA_DISTFILES += corlib_cmp.dll.excludes
+CLEAN_FILES += $(cmplib) $(cmp_response) $(cmp_makefrag) $(cmppdb)
$(cmplib): $(cmp_makefrag) $(cmp_response)
- $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(cmp_flags) /target:library /out:$@ @$(cmp_response)
+ $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(cmp_flags) -target:library -out:$@ @$(cmp_response)
$(cmp_response): $(sourcefile) corlib_cmp.dll.excludes
@echo Creating $@ ...
#
# -include $(cmp_makefrag)
-# corlib_res
-
-respdb = $(patsubst %.dll,%.pdb,$(reslib))
-res_response = $(depsdir)/$(PROFILE)_corlib_res.dll.response
-res_makefrag = $(depsdir)/$(PROFILE)_corlib_res.dll.makefrag
-res_flags = /r:$(PLATFORM_CORLIB) $(corlib_flags)
-
-$(reslib): $(res_makefrag) $(res_response)
- $(BOOT_COMPILE) $(LIBRARY_FLAGS) $(res_flags) /target:library /out:$@ @$(res_response)
-
-$(res_response): $(sourcefile) corlib_res.dll.excludes
- @echo Creating $@ ...
- @sort $(sourcefile) corlib_res.dll.excludes | uniq -u | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
-
-# warning: embedded tab in the 'echo touch' line
-$(res_makefrag): $(res_response)
- @echo Creating $@ ...
- @sed 's,^,$(reslib): ,' $< >$@
+$(cmp_response) $(cmp_makefrag): Makefile $(depsdir)/.stamp
+endif
--include $(res_makefrag)
+vtsdir = Test/System.Runtime.Serialization.Formatters.Binary/VersionTolerantSerialization
+vtslibs = \
+ $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
+ $(vtsdir)/$(PROFILE)_TestLib/2.0/Address.dll \
+ $(vtsdir)/$(PROFILE)_TestLib/3.0/Address.dll \
+ $(vtsdir)/$(PROFILE)_TestLib/4.0/Address.dll \
+ $(vtsdir)/$(PROFILE)_TestLib/5.0/Address.dll \
+ $(vtsdir)/$(PROFILE)_TestLib/6.0/Address.dll
+
+test-vts: $(vtslibs) $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe
+
+$(vtsdir)/$(PROFILE)_TestLib/%/Address.dll: $(vtsdir)/VersionTolerantSerializationTestLib/%/Address.cs
+ @mkdir -p $(dir $@)
+ $(CSCOMPILE) -target:library -r:$(corlib) -warn:0 -out:$@ $^
+
+$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll
+ $(CSCOMPILE) $(test_nunit_ref) -warn:0 -r:$(corlib) \
+ -r:$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
+ $(vtsdir)/BinarySerializationOverVersions.cs -out:$@
+ @cp $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(vtsdir)/$(PROFILE)_TestLib
+
+# Need to define MONO_PATH to an absolute dir since the test is ran from a subdir
+run-test-vts: test-vts
+ @echo Running vts tests...
+ PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) -noshadow \
+ $(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe
+test: test-vts
+run-test: run-test-vts
+
+EXTRA_DISTFILES += \
+ $(vtsdir)/VersionTolerantSerializationTestLib/1.0/Address.cs \
+ $(vtsdir)/VersionTolerantSerializationTestLib/2.0/Address.cs \
+ $(vtsdir)/VersionTolerantSerializationTestLib/3.0/Address.cs \
+ $(vtsdir)/VersionTolerantSerializationTestLib/4.0/Address.cs \
+ $(vtsdir)/VersionTolerantSerializationTestLib/5.0/Address.cs \
+ $(vtsdir)/VersionTolerantSerializationTestLib/6.0/Address.cs \
+ $(vtsdir)/BinarySerializationOverVersions.cs