Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kyte <alexmkyte@gmail.com>2016-01-27 23:09:29 +0300
committerAlexander Kyte <alexmkyte@gmail.com>2016-01-27 23:09:29 +0300
commit1f5d985270df9390f9cb558656763ea428c14e2c (patch)
treec467d56c2bcc3661201084d4db25f76e69703b1e
parent7ee763525e82215883a57fc473f4f635672c7638 (diff)
parentc6e9e79a1701bce87a19c93c89bc03e0d0859302 (diff)
Merge pull request #2431 from alexanderkyte/tests_with_excludes
[mcs] Fix .sources/.excludes for tests, exclude corlib monotouch-excluded tests on mobile_static
-rw-r--r--mcs/build/config-default.make2
-rw-r--r--mcs/build/gensources.sh18
-rw-r--r--mcs/build/profiles/mobile_static.make5
-rw-r--r--mcs/build/rules.make10
-rw-r--r--mcs/build/tests.make43
-rw-r--r--mcs/class/System.Core/mobile_static_System.Core.dll.sources17
-rw-r--r--mcs/class/System.Core/mobile_static_System.Core_test.dll.excludes1
-rw-r--r--mcs/class/System.Core/mobile_static_System.Core_test.dll.sources1
-rw-r--r--mcs/class/System.Data/mobile_static_System.Data_test.dll.excludes18
-rw-r--r--mcs/class/System.Data/mobile_static_System.Data_test.dll.sources1
-rw-r--r--mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.excludes8
-rw-r--r--mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.sources1
-rw-r--r--mcs/class/System/mobile_static_System_test.dll.excludes190
-rw-r--r--mcs/class/System/mobile_static_System_test.dll.sources1
-rw-r--r--mcs/class/corlib/Makefile18
-rwxr-xr-xmcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs4
-rw-r--r--mcs/class/corlib/Test/System.IO/DirectoryTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs21
-rw-r--r--mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs12
-rw-r--r--mcs/class/corlib/Test/System.Reflection/ModuleTest.cs6
-rw-r--r--mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs3
-rw-r--r--mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs3
-rw-r--r--mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs3
-rw-r--r--mcs/class/corlib/Test/System/ActivatorTest.cs6
-rw-r--r--mcs/class/corlib/Test/System/AttributeTest.cs4
-rw-r--r--mcs/class/corlib/Test/System/DelegateTest.cs20
-rw-r--r--mcs/class/corlib/Test/System/TimeZoneTest.cs5
-rw-r--r--mcs/class/corlib/Test/System/TypeTest.cs20
-rw-r--r--mcs/class/corlib/corlib_test.dll.sources10
-rw-r--r--mcs/class/corlib/mobile_static_corlib_test.dll.excludes131
-rw-r--r--mcs/class/corlib/mobile_static_corlib_test.dll.sources1
40 files changed, 535 insertions, 72 deletions
diff --git a/mcs/build/config-default.make b/mcs/build/config-default.make
index 124bb2a3f81..8dcbbdc628d 100644
--- a/mcs/build/config-default.make
+++ b/mcs/build/config-default.make
@@ -23,7 +23,7 @@ mono_libdir = $(exec_prefix)/lib
sysconfdir = $(prefix)/etc
#RUNTIME = mono
RUNTIME = false
-TEST_RUNTIME = MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
+TEST_RUNTIME = MONO_PATH="./:$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
# In case you want to add MCS_FLAGS, this lets you not have to
# keep track of the default value
diff --git a/mcs/build/gensources.sh b/mcs/build/gensources.sh
index db7bf638bed..2eb4995bdd8 100644
--- a/mcs/build/gensources.sh
+++ b/mcs/build/gensources.sh
@@ -54,10 +54,22 @@ if test -n "$extexcfile"; then
fi
if test -f $outfile.exc; then
+ # So what we're doing below with uniq -u is that we take
+ # lines that have not been duplicated. This computes the
+ # symmetric difference between the files. This is not
+ # what we want. If a file is in the excludes but not in
+ # the sources, we want that file not to show up. By duplicating the
+ # excludes, we ensure that we won't end up in this failure state.
sort -u $outfile.exc > $outfile.exc_s
- rm -f $outfile.exc
- sort -m $outfile.inc_s $outfile.exc_s | uniq -u > $outfile
- rm -f $outfile.inc_s $outfile.exc_s
+
+ # Duplicate excludes
+ cat $outfile.exc_s >> $outfile.exc_s_dup
+ cat $outfile.exc_s >> $outfile.exc_s_dup
+
+ rm -f $outfile.exc $outfile.exc_s
+
+ cat $outfile.inc_s $outfile.exc_s_dup | sort | uniq -u > $outfile
+ rm -f $outfile.inc_s $outfile.exc_s_dup
else
mv $outfile.inc_s $outfile
fi
diff --git a/mcs/build/profiles/mobile_static.make b/mcs/build/profiles/mobile_static.make
index 86d5a747949..03e20ed74ad 100644
--- a/mcs/build/profiles/mobile_static.make
+++ b/mcs/build/profiles/mobile_static.make
@@ -39,3 +39,8 @@ NUNIT_LITE = yes
NO_INSTALL = yes
MOBILE_STATIC = yes
MOBILE_PROFILE = yes
+NO_VTS_TEST = yes
+
+# Note need for trailing comma. If you add, keep it
+PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,
+
diff --git a/mcs/build/rules.make b/mcs/build/rules.make
index 88170948f67..966351c446b 100644
--- a/mcs/build/rules.make
+++ b/mcs/build/rules.make
@@ -75,6 +75,7 @@ default: all
include $(topdir)/build/config-default.make
-include $(topdir)/build/pre-config.make
+-include $(topdir)/build/config.make
# Default PLATFORM and PROFILE if they're not already defined.
@@ -112,7 +113,14 @@ PROFILE = $(DEFAULT_PROFILE)
endif
include $(topdir)/build/profiles/$(PROFILE).make
--include $(topdir)/build/config.make
+
+# If the profile is using nunit-lite, use it
+ifdef NUNIT_LITE
+TEST_HARNESS=$(topdir)/class/lib/$(PROFILE)/nunit-lite-console.exe
+endif
+
+# Make sure propagates
+export TEST_HARNESS
# If the profile is using nunit-lite, use it
ifdef NUNIT_LITE
diff --git a/mcs/build/tests.make b/mcs/build/tests.make
index f44e0574c96..82fa11f0035 100644
--- a/mcs/build/tests.make
+++ b/mcs/build/tests.make
@@ -29,8 +29,15 @@ test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/%)
test_nunit_ref = $(test_nunit_dep:%=-r:%)
tests_CLEAN_FILES += TestResult*.xml
-test_lib = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test_$(PROFILE).dll)
+test_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources)
+
+ifeq ($(wildcard $(test_sourcefile)),)
test_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources)
+endif
+
+test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
+test_sourcefile_excludes = $(test_lib).excludes
+
test_pdb = $(test_lib:.dll=.pdb)
test_response = $(depsdir)/$(test_lib).response
test_makefrag = $(depsdir)/$(test_lib).makefrag
@@ -41,7 +48,9 @@ ifndef HAVE_CS_TESTS
HAVE_CS_TESTS := $(wildcard $(test_sourcefile))
endif
-endif
+HAVE_SOURCE_EXCLUDES := $(wildcard $(test_sourcefile_excludes))
+
+endif # !NO_TEST
ifndef NO_TEST
$(test_nunit_dep): $(topdir)/build/deps/nunit-$(PROFILE).stamp
@@ -72,8 +81,18 @@ test-local: $(test_assemblies)
run-test-local: run-test-lib
run-test-ondotnet-local: run-test-ondotnet-lib
-TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess
-TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)NotDotNet,CAS
+TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess
+TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PROFILE_TEST_HARNESS_EXCLUDES)NotDotNet,CAS
+
+ifdef NUNIT_LITE
+NOSHADOW_FLAG =
+NUNIT_XML_FLAG = -format:nunit2 -result:
+OUTPUT_FILE_FLAG=-out
+else
+OUTPUT_FILE_FLAG=-output
+NOSHADOW_FLAG = -noshadow
+NUNIT_XML_FLAG = -xml=
+endif
ifdef NUNIT_LITE
NOSHADOW_FLAG =
@@ -133,9 +152,21 @@ ifdef HAVE_CS_TESTS
$(test_lib): $(the_assembly) $(test_response) $(test_nunit_dep)
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
-$(test_response): $(test_sourcefile)
+test_response_preprocessed = $(test_response)_preprocessed
+
+ifdef HAVE_SOURCE_EXCLUDES
+$(test_response_preprocessed): $(test_sourcefile)
+ $(SHELL) $(topdir)/build/gensources.sh $@ '$(test_sourcefile)' '$(test_sourcefile_excludes)'
+
+else
+$(test_response_preprocessed): $(test_sourcefile)
+ cp $(test_sourcefile) $(test_response_preprocessed)
+
+endif # HAVE_SOURCE_EXCLUDES
+
+$(test_response): $(test_response_preprocessed)
# @echo Creating $@ ...
- @sed -e '/^$$/d' -e 's,^,Test/,' $(test_sourcefile) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
+ @sed -e '/^$$/d' -e 's,^,Test/,' $(test_response_preprocessed) | $(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
$(test_makefrag): $(test_response)
# @echo Creating $@ ...
diff --git a/mcs/class/System.Core/mobile_static_System.Core.dll.sources b/mcs/class/System.Core/mobile_static_System.Core.dll.sources
index 7d32d44a88b..832b60883c7 100644
--- a/mcs/class/System.Core/mobile_static_System.Core.dll.sources
+++ b/mcs/class/System.Core/mobile_static_System.Core.dll.sources
@@ -1,2 +1,19 @@
#include common_System.Core.dll.sources
#include interpreter_System.Core.dll.sources
+
+System.Security.Cryptography/AesCryptoServiceProvider.cs
+System.Security.Cryptography/AesTransform.cs
+System.Security.Cryptography/CngAlgorithm.cs
+System.Security.Cryptography/CngAlgorithmGroup.cs
+System.Security.Cryptography/MD5Cng.cs
+System.Security.Cryptography/SHA1Cng.cs
+System.Security.Cryptography/SHA256Cng.cs
+System.Security.Cryptography/SHA256CryptoServiceProvider.cs
+System.Security.Cryptography/SHA384Cng.cs
+System.Security.Cryptography/SHA384CryptoServiceProvider.cs
+System.Security.Cryptography/SHA512Cng.cs
+System.Security.Cryptography/SHA512CryptoServiceProvider.cs
+
+../../../external/referencesource/System.Core/System/Security/Cryptography/AesManaged.cs
+../../../external/referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs
+../../../external/referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs
diff --git a/mcs/class/System.Core/mobile_static_System.Core_test.dll.excludes b/mcs/class/System.Core/mobile_static_System.Core_test.dll.excludes
new file mode 100644
index 00000000000..f98bf051bef
--- /dev/null
+++ b/mcs/class/System.Core/mobile_static_System.Core_test.dll.excludes
@@ -0,0 +1 @@
+System.IO.Pipes/PipeSecurityTest.cs
diff --git a/mcs/class/System.Core/mobile_static_System.Core_test.dll.sources b/mcs/class/System.Core/mobile_static_System.Core_test.dll.sources
new file mode 100644
index 00000000000..33e2a105847
--- /dev/null
+++ b/mcs/class/System.Core/mobile_static_System.Core_test.dll.sources
@@ -0,0 +1 @@
+#include System.Core_test.dll.sources
diff --git a/mcs/class/System.Data/mobile_static_System.Data_test.dll.excludes b/mcs/class/System.Data/mobile_static_System.Data_test.dll.excludes
new file mode 100644
index 00000000000..0022a9e9f1b
--- /dev/null
+++ b/mcs/class/System.Data/mobile_static_System.Data_test.dll.excludes
@@ -0,0 +1,18 @@
+System.Data.Odbc/OdbcCommandBuilderTest.cs
+System.Data.Odbc/OdbcCommandTest.cs
+System.Data.Odbc/OdbcConnectionStringBuilderTest.cs
+System.Data.Odbc/OdbcConnectionTest.cs
+System.Data.Odbc/OdbcDataAdapterTest.cs
+System.Data.Odbc/OdbcDataReaderTest.cs
+System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs
+System.Data.Odbc/OdbcParameterCollectionTest.cs
+System.Data.Odbc/OdbcParameterTest.cs
+System.Data.Odbc/OdbcPermissionAttributeTest.cs
+System.Data.Odbc/OdbcPermissionTest.cs
+System.Data.OleDb/OleDbCommandTest.cs
+System.Data.OleDb/OleDbConnectionTest.cs
+System.Data.OleDb/OleDbDataAdapterTest.cs
+System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs
+System.Data.OleDb/OleDbParameterCollectionTest.cs
+System.Data.OleDb/OleDbPermissionAttributeTest.cs
+System.Data.OleDb/OleDbPermissionTest.cs
diff --git a/mcs/class/System.Data/mobile_static_System.Data_test.dll.sources b/mcs/class/System.Data/mobile_static_System.Data_test.dll.sources
new file mode 100644
index 00000000000..310b8c2fb3d
--- /dev/null
+++ b/mcs/class/System.Data/mobile_static_System.Data_test.dll.sources
@@ -0,0 +1 @@
+#include System.Data_test.dll.sources
diff --git a/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.excludes b/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.excludes
new file mode 100644
index 00000000000..645326dff9a
--- /dev/null
+++ b/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.excludes
@@ -0,0 +1,8 @@
+System.Web.Services/Test/System.Web.Services.Configuration/DiagnosticsElementTest.cs
+System.Web.Services/Test/System.Web.Services.Configuration/ProtocolElementTest.cs
+System.Web.Services/Test/System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs
+System.Web.Services/Test/System.Web.Services.Configuration/SoapExtensionTypeElementTest.cs
+System.Web.Services/Test/System.Web.Services.Configuration/TypeElementTest.cs
+System.Web.Services/Test/System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs
+System.Web.Services/Test/System.Web.Services.Configuration/WsiProfilesElementTest.cs
+System.Web.Services/Test/System.Web.Services.Configuration/XmlFormatExtensionAttributeTest.cs
diff --git a/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.sources b/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.sources
new file mode 100644
index 00000000000..915ba6cbbec
--- /dev/null
+++ b/mcs/class/System.Web.Services/mobile_static_System.Web.Services_test.dll.sources
@@ -0,0 +1 @@
+#include System.Web.Services_test.dll.sources
diff --git a/mcs/class/System/mobile_static_System_test.dll.excludes b/mcs/class/System/mobile_static_System_test.dll.excludes
new file mode 100644
index 00000000000..8f84347cde9
--- /dev/null
+++ b/mcs/class/System/mobile_static_System_test.dll.excludes
@@ -0,0 +1,190 @@
+Microsoft.CSharp/CodeGeneratorFromCompileUnitTest.cs
+Microsoft.CSharp/CodeGeneratorFromExpressionTest.cs
+Microsoft.CSharp/CodeGeneratorFromNamespaceTest.cs
+Microsoft.CSharp/CodeGeneratorFromStatementTest.cs
+Microsoft.CSharp/CodeGeneratorFromTypeTest.cs
+Microsoft.CSharp/CodeGeneratorIdentifierTest.cs
+Microsoft.CSharp/CodeGeneratorTestBase.cs
+Microsoft.CSharp/CodeGeneratorTypeOutputTest.cs
+Microsoft.CSharp/CSharpCodeProviderCas.cs
+Microsoft.CSharp/CSharpCodeProviderTest.cs
+Microsoft.VisualBasic/CodeGeneratorFromBinaryOperatorTest.cs
+Microsoft.VisualBasic/CodeGeneratorFromCompileUnitTest.cs
+Microsoft.VisualBasic/CodeGeneratorFromExpressionTest.cs
+Microsoft.VisualBasic/CodeGeneratorFromNamespaceTest.cs
+Microsoft.VisualBasic/CodeGeneratorFromStatementTest.cs
+Microsoft.VisualBasic/CodeGeneratorFromTypeTest.cs
+Microsoft.VisualBasic/CodeGeneratorTestBase.cs
+Microsoft.VisualBasic/VBCodeProviderCas.cs
+Microsoft.VisualBasic/VBCodeProviderTest.cs
+System.CodeDom/CodeArgumentReferenceExpressionCas.cs
+System.CodeDom/CodeArgumentReferenceExpressionTest.cs
+System.CodeDom/CodeArrayCreateExpressionCas.cs
+System.CodeDom/CodeArrayCreateExpressionTest.cs
+System.CodeDom/CodeArrayIndexerExpressionCas.cs
+System.CodeDom/CodeAssignStatementCas.cs
+System.CodeDom/CodeAttachEventStatementCas.cs
+System.CodeDom/CodeAttachEventStatementTest.cs
+System.CodeDom/CodeAttributeArgumentCas.cs
+System.CodeDom/CodeAttributeArgumentCollectionCas.cs
+System.CodeDom/CodeAttributeArgumentCollectionTest.cs
+System.CodeDom/CodeAttributeArgumentTest.cs
+System.CodeDom/CodeAttributeDeclarationCas.cs
+System.CodeDom/CodeAttributeDeclarationCollectionCas.cs
+System.CodeDom/CodeAttributeDeclarationCollectionTest.cs
+System.CodeDom/CodeAttributeDeclarationTest.cs
+System.CodeDom/CodeBaseReferenceExpressionCas.cs
+System.CodeDom/CodeBinaryOperatorExpressionCas.cs
+System.CodeDom/CodeCastExpressionCas.cs
+System.CodeDom/CodeCastExpressionTest.cs
+System.CodeDom/CodeCatchClauseCas.cs
+System.CodeDom/CodeCatchClauseCollectionCas.cs
+System.CodeDom/CodeCatchClauseCollectionTest.cs
+System.CodeDom/CodeCatchClauseTest.cs
+System.CodeDom/CodeChecksumPragmaCas.cs
+System.CodeDom/CodeChecksumPragmaTest.cs
+System.CodeDom/CodeCommentStatementCas.cs
+System.CodeDom/CodeCommentStatementCollectionCas.cs
+System.CodeDom/CodeCommentStatementCollectionTest.cs
+System.CodeDom/CodeCompileUnitCas.cs
+System.CodeDom/CodeConditionStatementCas.cs
+System.CodeDom/CodeConstructorCas.cs
+System.CodeDom/CodeConstructorTest.cs
+System.CodeDom/CodeDefaultValueExpressionCas.cs
+System.CodeDom/CodeDefaultValueExpressionTest.cs
+System.CodeDom/CodeDelegateCreateExpressionCas.cs
+System.CodeDom/CodeDelegateCreateExpressionTest.cs
+System.CodeDom/CodeDelegateInvokeExpressionCas.cs
+System.CodeDom/CodeDirectionExpressionCas.cs
+System.CodeDom/CodeDirectiveCas.cs
+System.CodeDom/CodeDirectiveCollectionCas.cs
+System.CodeDom/CodeDirectiveCollectionTest.cs
+System.CodeDom/CodeEntryPointMethodCas.cs
+System.CodeDom/CodeEventReferenceExpressionCas.cs
+System.CodeDom/CodeEventReferenceExpressionTest.cs
+System.CodeDom/CodeExpressionCas.cs
+System.CodeDom/CodeExpressionCollectionCas.cs
+System.CodeDom/CodeExpressionCollectionTest.cs
+System.CodeDom/CodeExpressionStatementCas.cs
+System.CodeDom/CodeFieldReferenceExpressionCas.cs
+System.CodeDom/CodeGotoStatementCas.cs
+System.CodeDom/CodeGotoStatementTest.cs
+System.CodeDom/CodeIndexerExpressionCas.cs
+System.CodeDom/CodeIterationStatementCas.cs
+System.CodeDom/CodeLabeledStatementTest.cs
+System.CodeDom/CodeLinePragmaCas.cs
+System.CodeDom/CodeLinePragmaTest.cs
+System.CodeDom/CodeMemberEventCas.cs
+System.CodeDom/CodeMemberFieldCas.cs
+System.CodeDom/CodeMemberFieldTest.cs
+System.CodeDom/CodeMemberMethodCas.cs
+System.CodeDom/CodeMemberMethodTest.cs
+System.CodeDom/CodeMemberPropertyCas.cs
+System.CodeDom/CodeMemberPropertyTest.cs
+System.CodeDom/CodeMethodInvokeExpressionCas.cs
+System.CodeDom/CodeMethodInvokeExpressionTest.cs
+System.CodeDom/CodeMethodReferenceExpressionCas.cs
+System.CodeDom/CodeMethodReferenceExpressionTest.cs
+System.CodeDom/CodeMethodReturnStatementCas.cs
+System.CodeDom/CodeNamespaceCas.cs
+System.CodeDom/CodeNamespaceCollectionCas.cs
+System.CodeDom/CodeNamespaceCollectionTest.cs
+System.CodeDom/CodeNamespaceImportCas.cs
+System.CodeDom/CodeNamespaceImportCollectionCas.cs
+System.CodeDom/CodeNamespaceImportCollectionTest.cs
+System.CodeDom/CodeNamespaceImportTest.cs
+System.CodeDom/CodeNamespaceTest.cs
+System.CodeDom/CodeObjectCas.cs
+System.CodeDom/CodeObjectCreateExpressionCas.cs
+System.CodeDom/CodeObjectCreateExpressionTest.cs
+System.CodeDom/CodeParameterDeclarationExpressionCas.cs
+System.CodeDom/CodeParameterDeclarationExpressionCollectionCas.cs
+System.CodeDom/CodeParameterDeclarationExpressionCollectionTest.cs
+System.CodeDom/CodeParameterDeclarationExpressionTest.cs
+System.CodeDom/CodePrimitiveExpressionCas.cs
+System.CodeDom/CodePropertyReferenceExpressionCas.cs
+System.CodeDom/CodePropertyReferenceExpressionTest.cs
+System.CodeDom/CodePropertySetValueReferenceExpressionCas.cs
+System.CodeDom/CodeRegionDirectiveCas.cs
+System.CodeDom/CodeRegionDirectiveTest.cs
+System.CodeDom/CodeRemoveEventStatementCas.cs
+System.CodeDom/CodeRemoveEventStatementTest.cs
+System.CodeDom/CodeSnippetCompileUnitCas.cs
+System.CodeDom/CodeSnippetCompileUnitTest.cs
+System.CodeDom/CodeSnippetExpressionCas.cs
+System.CodeDom/CodeSnippetExpressionTest.cs
+System.CodeDom/CodeSnippetStatementCas.cs
+System.CodeDom/CodeSnippetStatementTest.cs
+System.CodeDom/CodeSnippetTypeMemberCas.cs
+System.CodeDom/CodeSnippetTypeMemberTest.cs
+System.CodeDom/CodeStatementCas.cs
+System.CodeDom/CodeStatementCollectionCas.cs
+System.CodeDom/CodeStatementCollectionTest.cs
+System.CodeDom/CodeThisReferenceExpressionCas.cs
+System.CodeDom/CodeThrowExceptionStatementCas.cs
+System.CodeDom/CodeTryCatchFinallyStatementCas.cs
+System.CodeDom/CodeTypeConstructorCas.cs
+System.CodeDom/CodeTypeConstructorTest.cs
+System.CodeDom/CodeTypeDeclarationCas.cs
+System.CodeDom/CodeTypeDeclarationCollectionCas.cs
+System.CodeDom/CodeTypeDeclarationCollectionTest.cs
+System.CodeDom/CodeTypeDelegateCas.cs
+System.CodeDom/CodeTypeDelegateTest.cs
+System.CodeDom/CodeTypeMemberCas.cs
+System.CodeDom/CodeTypeMemberCollectionCas.cs
+System.CodeDom/CodeTypeMemberCollectionTest.cs
+System.CodeDom/CodeTypeOfExpressionCas.cs
+System.CodeDom/CodeTypeOfExpressionTest.cs
+System.CodeDom/CodeTypeParameterCas.cs
+System.CodeDom/CodeTypeParameterCollectionTest.cs
+System.CodeDom/CodeTypeParameterTest.cs
+System.CodeDom/CodeTypeReferenceCas.cs
+System.CodeDom/CodeTypeReferenceCollectionCas.cs
+System.CodeDom/CodeTypeReferenceCollectionTest.cs
+System.CodeDom/CodeTypeReferenceExpressionCas.cs
+System.CodeDom/CodeTypeReferenceExpressionTest.cs
+System.CodeDom/CodeTypeReferenceTest.cs
+System.CodeDom/CodeVariableDeclarationStatementCas.cs
+System.CodeDom/CodeVariableDeclarationStatementTest.cs
+System.CodeDom/CodeVariableReferenceExpressionCas.cs
+System.CodeDom/CodeVariableReferenceExpressionTest.cs
+System.CodeDom.Compiler/CodeCompilerCas.cs
+System.CodeDom.Compiler/CodeDomProviderCas.cs
+System.CodeDom.Compiler/CodeGeneratorCas.cs
+System.CodeDom.Compiler/CodeGeneratorFromTypeTestBase.cs
+System.CodeDom.Compiler/CodeGeneratorGenerateFromCompileUnitTest.cs
+System.CodeDom.Compiler/CodeGeneratorOptionsCas.cs
+System.CodeDom.Compiler/CodeGeneratorOptionsTest.cs
+System.CodeDom.Compiler/CodeGeneratorTest.cs
+System.CodeDom.Compiler/CodeGeneratorTestBase.cs
+System.CodeDom.Compiler/CodeParserCas.cs
+System.CodeDom.Compiler/CompilerErrorCas.cs
+System.CodeDom.Compiler/CompilerErrorCollectionCas.cs
+System.CodeDom.Compiler/CompilerInfoCas.cs
+System.CodeDom.Compiler/CompilerParametersCas.cs
+System.CodeDom.Compiler/CompilerResultsCas.cs
+System.CodeDom.Compiler/ExecutorCas.cs
+System.CodeDom.Compiler/ExecutorTest.cs
+System.CodeDom.Compiler/GeneratedCodeAttributeCas.cs
+System.CodeDom.Compiler/GeneratedCodeAttributeTest.cs
+System.CodeDom.Compiler/IndentedTextWriterCas.cs
+System.CodeDom.Compiler/IndentedTextWriterTest.cs
+System.CodeDom.Compiler/TempFileCollectionCas.cs
+System.CodeDom.Compiler/TempFileCollectionTest.cs
+System.Configuration/ApplicationSettingsBaseTest.cs
+System.Configuration/ConfigurationExceptionTest.cs
+System.Configuration/ConfigXmlDocumentTest.cs
+System.Configuration/LocalFileSettingsProviderTest.cs
+System.Configuration/SettingElementTest.cs
+System.Configuration/SettingsBaseTest.cs
+System.Configuration/SettingsPropertyCollectionTest.cs
+System.Configuration/SettingsPropertyTest.cs
+System.Configuration/SettingsPropertyValueCollectionTest.cs
+System.Configuration/SettingsPropertyValueTest.cs
+System.Configuration.Provider
+System.Configuration.Provider/ProviderBaseTest.cs
+System.IO.Ports/SerialPortTest.cs
+System.Web/AspNetHostingPermissionAttributeCas.cs
+System.Web/AspNetHostingPermissionAttributeTest.cs
+System.Web/AspNetHostingPermissionCas.cs
+System.Web/AspNetHostingPermissionTest.cs
diff --git a/mcs/class/System/mobile_static_System_test.dll.sources b/mcs/class/System/mobile_static_System_test.dll.sources
new file mode 100644
index 00000000000..3944a95be6a
--- /dev/null
+++ b/mcs/class/System/mobile_static_System_test.dll.sources
@@ -0,0 +1 @@
+#include System_test.dll.sources
diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile
index 4e557d1ee29..9fc807acc27 100644
--- a/mcs/class/corlib/Makefile
+++ b/mcs/class/corlib/Makefile
@@ -60,8 +60,14 @@ WARNING_ABOUT_DISABLED_WARNING=1635
LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS)
DEFAULT_REFERENCES =
+ifdef MOBILE_STATIC
+CORLIB_MONO_POSIX_REF =
+else
+CORLIB_MONO_POSIX_REF = -r:Mono.Posix.dll
+endif
+
# System.IO/DirectoryInfoTest.cs needs Mono.Posix
-TEST_MCS_FLAGS += -debug -nowarn:168,219,618,672 -unsafe -r:Mono.Posix.dll -r:System.Core.dll \
+TEST_MCS_FLAGS += -debug -nowarn:168,219,618,672 -unsafe $(CORLIB_MONO_POSIX_REF) -r:System.Core.dll \
-define:MONO_DATACONVERTER_STATIC_METHODS $(TEST_RESX_RESOURCES:%=-resource:%)
EXTRA_DISTFILES = \
@@ -168,9 +174,17 @@ run-test-vts: test-vts
@echo Running vts tests...
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) $(NOSHADOW_FLAG) \
$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe
-ifndef NO_TEST
+
+ifdef NO_TEST
+NO_VTS_TEST = yes
+endif
+
+ifndef NO_VTS_TEST
test: test-vts
run-test: run-test-vts
+else
+test:
+run-test:
endif
EXTRA_DISTFILES += \
diff --git a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs
index b9cc49f1464..92826796908 100755
--- a/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs
+++ b/mcs/class/corlib/System.Security.Cryptography/CryptoConfig.fullaot.cs
@@ -169,7 +169,11 @@ namespace System.Security.Cryptography {
name = "System.Security.Cryptography.X509Certificates.X509Chain, System";
break;
case "aes":
+#if MOBILE_STATIC
+ name = "System.Security.Cryptography.AesCryptoServiceProvider, System.Core";
+#else
name = "System.Security.Cryptography.AesManaged, System.Core";
+#endif
break;
}
diff --git a/mcs/class/corlib/Test/System.IO/DirectoryTest.cs b/mcs/class/corlib/Test/System.IO/DirectoryTest.cs
index 64ee5872b83..b17cfd62c55 100644
--- a/mcs/class/corlib/Test/System.IO/DirectoryTest.cs
+++ b/mcs/class/corlib/Test/System.IO/DirectoryTest.cs
@@ -17,7 +17,7 @@ using System.IO;
using System.Text;
using System.Threading;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using Mono.Unix;
#endif
using NUnit.Framework;
@@ -47,7 +47,7 @@ public class DirectoryTest
if (Directory.Exists (TempFolder))
Directory.Delete (TempFolder, true);
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test] //BXC #12461
public void EnumerateFilesListSymlinks ()
{
diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs
index b88423a68f3..77e8e6df1af 100644
--- a/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/AssemblyAlgorithmIdAttributeTest.cs
@@ -5,7 +5,7 @@
// (C) 2004 Ximian, Inc. http://www.ximian.com
//
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System;
using System.Threading;
diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
index 7d561f4f9e5..45900ac01e4 100644
--- a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
@@ -37,7 +37,7 @@ using System.Configuration.Assemblies;
using System.Globalization;
using System.IO;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Threading;
@@ -197,7 +197,7 @@ namespace MonoTests.System.Reflection
#endif
}
-#if !MONOTOUCH // Reflection.Emit is not supported.
+#if !MONOTOUCH && !MOBILE_STATIC // Reflection.Emit is not supported.
[Test]
[Category("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter
public void GetModules_MissingFile ()
@@ -249,7 +249,7 @@ namespace MonoTests.System.Reflection
public void Corlib_test ()
{
Assembly corlib_test = Assembly.GetExecutingAssembly ();
-#if MONODROID
+#if MONODROID || MOBILE_STATIC
Assert.IsNull (corlib_test.EntryPoint, "EntryPoint");
Assert.IsNull (corlib_test.Evidence, "Evidence");
#elif MOBILE
@@ -457,7 +457,18 @@ namespace MonoTests.System.Reflection
[Test]
public void LoadWithPartialName ()
{
+// FIXME?
+// So the problem here is that if we load an assembly
+// in a fully aot mode and then cannot load the
+// dylib, we will assert. This test is incompatible
+// with the semantics of aot'ed assembly loading, as
+// aot may assert when loading. This assumes that it's
+// safe to greedly load everything.
+#if MOBILE_STATIC
+ string [] names = { "corlib_test_mobile_static" };
+#else
string [] names = { "corlib_test_net_1_1", "corlib_test_net_2_0", "corlib_test_net_4_0", "corlib_test_net_4_5", "corlib_test_net_4_x", "corlib_plattest", "mscorlibtests", "BclTests" };
+#endif
foreach (string s in names)
if (Assembly.LoadWithPartialName (s) != null)
@@ -502,7 +513,7 @@ namespace MonoTests.System.Reflection
}
}
-#if !MONOTOUCH // Reflection.Emit is not supported.
+#if !MONOTOUCH && !MOBILE_STATIC // Reflection.Emit is not supported.
[Test]
public void Location_Empty() {
string assemblyFileName = Path.Combine (
@@ -1175,7 +1186,7 @@ namespace MonoTests.System.Reflection
Assert.AreEqual ("MonoModule", module.GetType ().Name, "#2");
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
Assert.AreEqual ("mscorlib.dll", module.Name, "#3");
#endif
Assert.IsFalse (module.IsResource (), "#4");
diff --git a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
index 410c4c239a0..f06debd8ebb 100644
--- a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
@@ -31,7 +31,7 @@
using System;
using System.Threading;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
index 17ddddd3e04..53617c4e70f 100644
--- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
@@ -33,7 +33,7 @@ using NUnit.Framework;
using System;
using System.Threading;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
@@ -54,7 +54,7 @@ namespace MonoTests.System.Reflection
[TestFixture]
public class MethodInfoTest
{
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
// use an existing symbol - so we can build without dlsym. It does not matter that the signature does not match for the test
[DllImport ("libc", EntryPoint="readlink", CharSet=CharSet.Unicode, ExactSpelling=false, PreserveSig=true, SetLastError=true, BestFitMapping=true, ThrowOnUnmappableChar=true)]
#else
@@ -115,7 +115,7 @@ namespace MonoTests.System.Reflection
DllImportAttribute attr = (DllImportAttribute)((t.GetMethod ("dllImportMethod").GetCustomAttributes (typeof (DllImportAttribute), true)) [0]);
Assert.AreEqual (CallingConvention.Winapi, attr.CallingConvention, "#1");
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
Assert.AreEqual ("readlink", attr.EntryPoint, "#2");
Assert.AreEqual ("libc", attr.Value, "#3");
#else
@@ -397,7 +397,7 @@ namespace MonoTests.System.Reflection
[Test]
public void GetMethodBody ()
{
-#if MONOTOUCH && !DEBUG
+#if (MONOTOUCH || MOBILE_STATIC) && !DEBUG
Assert.Ignore ("Release app (on devices) are stripped of (managed) IL so this test would fail");
#endif
MethodBody mb = typeof (MethodInfoTest).GetMethod ("locals_method").GetMethodBody ();
@@ -600,7 +600,7 @@ namespace MonoTests.System.Reflection
} catch (InvalidOperationException ex) {
}
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
public TFoo SimpleGenericMethod2<TFoo, TBar> () { return default (TFoo); }
/*Test for the uggly broken behavior of SRE.*/
[Test]
@@ -854,7 +854,7 @@ namespace MonoTests.System.Reflection
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
class GenericClass<T>
{
public void Method ()
diff --git a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
index 04c941a9526..c93fecfa422 100644
--- a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
@@ -10,7 +10,7 @@
using System;
using System.Threading;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.Serialization;
@@ -93,7 +93,7 @@ public class ModuleTest
}
// Some of these tests overlap with the tests for ModuleBuilder
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
[Category("NotDotNet")] // path length can cause suprious failures
public void TestGlobalData () {
@@ -328,7 +328,7 @@ public class ModuleTest
Module m = typeof (ModuleTest).Module;
m.GetObjectData (null, new StreamingContext (StreamingContextStates.All));
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
[Category ("AndroidNotWorking")] // Mono.CompilerServices.SymbolWriter not available for Xamarin.Android
public void GetTypes ()
diff --git a/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs b/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs
index 9db8bda20fd..d31b99fa495 100644
--- a/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/MonoGenericClassTest.cs
@@ -7,7 +7,7 @@
// Copyright 2011 Xamarin Inc (http://www.xamarin.com).
//
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System;
using System.Collections;
diff --git a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
index dd38e16b7e5..2fe870111ca 100644
--- a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs
@@ -31,7 +31,7 @@ using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.IO;
@@ -355,7 +355,7 @@ namespace MonoTests.System.Reflection
get { return 99; }
}
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
public void ConstantValue () {
/*This test looks scary because we can't generate a default value with C# */
diff --git a/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs b/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
index c1fc39a59c3..6c6cb45a406 100644
--- a/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
@@ -28,7 +28,7 @@
using System;
using System.Threading;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
diff --git a/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs b/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs
index 3dcb3ae2480..fcf64a19300 100644
--- a/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/VisibilityTest.cs
@@ -24,7 +24,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System;
using System.Linq;
diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs
index d6216f73dbe..42abe682ac8 100644
--- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/AsyncTaskMethodBuilderTest.cs
@@ -38,7 +38,7 @@ namespace MonoTests.System.Runtime.CompilerServices
[TestFixture]
public class AsyncTaskMethodBuilderTest
{
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
// For some reason MT excludes CallContext handling
[Test]
diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
index 69ba983eeac..57b1d2c2764 100644
--- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
@@ -248,6 +248,7 @@ namespace MonoTests.System.Runtime.CompilerServices
return res.Result;
}
+#if !MOBILE_STATIC
[Test]
public void FinishedTaskOnCompleted ()
{
@@ -272,6 +273,8 @@ namespace MonoTests.System.Runtime.CompilerServices
Assert.AreEqual (Thread.CurrentThread.IsBackground, mres2.WaitOne (2000), "#2");;
}
+#endif
+
[Test]
public void CompletionOnSameCustomSynchronizationContext ()
{
diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs
index 27c77f182c9..1c7cb95ad32 100644
--- a/mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/GCHandleTest.cs
@@ -128,7 +128,7 @@ namespace MonoTests.System.Runtime.InteropServices
gch.Free ();
}
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
[Category("MobileNotWorking")] // SIGSEGV, probably on AppDomain.Unload
public void WeakHandleWorksOnNonRootDomain ()
diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs
index e15cb30a839..55e95b91231 100644
--- a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs
@@ -43,7 +43,7 @@ namespace MonoTests.System.Runtime.Serialization
}
#endif
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
public void DelegateSerializationTest ()
{
diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs
index 8d20e6f091e..e93744c0fd8 100644
--- a/mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Cryptography/AesCfbTest.cs
@@ -44,6 +44,7 @@ namespace MonoTests.System.Security.Cryptography {
[Test]
[Category ("AndroidNotWorking")] // Exception is thrown: CryptographicException : Bad PKCS7 padding. Invalid length 236.
+ [Category ("MobileNotWorking")] // On mobile_static, above exception is thrown as well
public void Roundtrip ()
{
// that will return a AesCryptoServiceProvider
@@ -283,4 +284,4 @@ namespace MonoTests.System.Security.Cryptography {
{ -2130705088, "23-28-F4-38-74-11-EA-D8-8A-E6-AB-F8-FD-8C-8B-19" },
};
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs
index aefa9ab4108..87b6d3e662f 100644
--- a/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs
+++ b/mcs/class/corlib/Test/System.Threading/ThreadLocalTests.cs
@@ -193,6 +193,7 @@ namespace MonoTests.System.Threading
}
[Test]
+ [Category ("NotWorking")] // Finalizers aren't guaranteed
public void DisposeOnThreadExit ()
{
var threadLocal = new ThreadLocal<SetMreOnFinalize>();
@@ -210,7 +211,7 @@ namespace MonoTests.System.Threading
}, 500);
if (!mres.IsSet)
- Assert.Fail ();
+ Assert.Fail ("Finalizer didn't run after thread termination");
}
}
}
diff --git a/mcs/class/corlib/Test/System/ActivatorTest.cs b/mcs/class/corlib/Test/System/ActivatorTest.cs
index a2bf6ab3d32..74661fd6f7e 100644
--- a/mcs/class/corlib/Test/System/ActivatorTest.cs
+++ b/mcs/class/corlib/Test/System/ActivatorTest.cs
@@ -13,7 +13,7 @@ using System;
using System.Globalization;
using System.IO;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
@@ -311,7 +311,7 @@ namespace MonoTests.System {
Assert.AreEqual (7, objCOMTest.Id, "#A05");
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
[ExpectedException (typeof (MissingMethodException))]
public void CreateInstance_TypeBuilder ()
@@ -513,7 +513,7 @@ namespace MonoTests.System {
null, null);
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
public void CreateInstanceCustomDomain ()
{
diff --git a/mcs/class/corlib/Test/System/AttributeTest.cs b/mcs/class/corlib/Test/System/AttributeTest.cs
index 53a8af742b8..d609c188831 100644
--- a/mcs/class/corlib/Test/System/AttributeTest.cs
+++ b/mcs/class/corlib/Test/System/AttributeTest.cs
@@ -12,7 +12,7 @@
using System;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
@@ -846,7 +846,7 @@ namespace MonoTests.System
Assert.IsTrue (custom [2].GetType () == typeof (SerializableAttribute));
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
public void GetCustomAttributeOnNewSreTypes ()
{
diff --git a/mcs/class/corlib/Test/System/DelegateTest.cs b/mcs/class/corlib/Test/System/DelegateTest.cs
index 2458b9831a6..0d164f57272 100644
--- a/mcs/class/corlib/Test/System/DelegateTest.cs
+++ b/mcs/class/corlib/Test/System/DelegateTest.cs
@@ -5,7 +5,7 @@
using System;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Threading;
@@ -26,7 +26,7 @@ namespace MonoTests.System
[Test] //See bug #372406
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[Category ("NotWorking")] // #10539
#endif
public void CreateDelegate1_Method_Private_Instance ()
@@ -64,7 +64,7 @@ namespace MonoTests.System
}
[Test] // CreateDelegate (Type, MethodInfo)
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[Category ("NotWorking")] // #14163
#endif
public void CreateDelegate1_Method_Instance ()
@@ -925,7 +925,7 @@ namespace MonoTests.System
}
[Test]
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[Category ("NotWorking")] // #10539
#endif
public void Virtual ()
@@ -956,7 +956,7 @@ namespace MonoTests.System
}
[Test]
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[Category ("NotWorking")] // #14163
#endif
public void NullTarget_Instance ()
@@ -1021,7 +1021,7 @@ namespace MonoTests.System
}
[Test] // #617161
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[Category ("NotWorking")] // #10539
#endif
public void ClosedOverNullReferenceStaticMethod ()
@@ -1045,7 +1045,7 @@ namespace MonoTests.System
}
[Test] // #475962
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[Category ("NotWorking")] // #10539
#endif
public void ClosedOverNullReferenceInstanceMethod ()
@@ -1079,7 +1079,7 @@ namespace MonoTests.System
delegate int ByRefDelegate (ref FooStruct s, int a, int b, int c, int d);
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[Category ("NotWorking")]
#endif
[Test]
@@ -1279,7 +1279,7 @@ namespace MonoTests.System
{
string retarg (string s);
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
public void CreateDelegateWithLdFtnAndAbstractMethod ()
{
@@ -1388,7 +1388,7 @@ namespace MonoTests.System
Assert.IsTrue (d (0, 0));
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
public static void DynInvokeWithClosedFirstArg (object a, object b)
{
}
diff --git a/mcs/class/corlib/Test/System/TimeZoneTest.cs b/mcs/class/corlib/Test/System/TimeZoneTest.cs
index 19e2cb5c49d..358298f91e5 100644
--- a/mcs/class/corlib/Test/System/TimeZoneTest.cs
+++ b/mcs/class/corlib/Test/System/TimeZoneTest.cs
@@ -349,12 +349,15 @@ public class TimeZoneTest {
// now it fails on Snow Leopard the same way (incomplete data) with iOS5 simulator (OS update ?)
// but it *never*ever* failed on devices
incomplete_data_on_simulator_only_bug = true;
+#if XAMCORE_2_0 || MONOTOUCH
+
#if XAMCORE_2_0
if (ObjCRuntime.Runtime.Arch == ObjCRuntime.Arch.SIMULATOR)
-#else
+#elif MONOTOUCH
if (MonoTouch.ObjCRuntime.Runtime.Arch == MonoTouch.ObjCRuntime.Arch.SIMULATOR)
#endif
Assert.Ignore ("known to fail on some iOS simulator versions - see source comments");
+#endif // XAMCORE_2_0 || MONOTOUCH
}
}
#endif
diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs
index 19dbff4804c..4279cee8ec9 100644
--- a/mcs/class/corlib/Test/System/TypeTest.cs
+++ b/mcs/class/corlib/Test/System/TypeTest.cs
@@ -16,7 +16,7 @@ using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
@@ -261,7 +261,7 @@ namespace MonoTests.System
[TestFixture]
public class TypeTest
{
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
private ModuleBuilder module;
#endif
const string ASSEMBLY_NAME = "MonoTests.System.TypeTest";
@@ -272,7 +272,7 @@ namespace MonoTests.System
{
AssemblyName assemblyName = new AssemblyName ();
assemblyName.Name = ASSEMBLY_NAME;
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
var assembly = AppDomain.CurrentDomain.DefineDynamicAssembly (
assemblyName, AssemblyBuilderAccess.RunAndSave, Path.GetTempPath ());
module = assembly.DefineDynamicModule ("module1");
@@ -3091,7 +3091,7 @@ namespace MonoTests.System
}
[Test]
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[ExpectedException (typeof (NotSupportedException))]
#endif
public void MakeGenericType_UserDefinedType ()
@@ -3108,7 +3108,7 @@ namespace MonoTests.System
}
[Test]
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[ExpectedException (typeof (NotSupportedException))]
#endif
public void MakeGenericType_NestedUserDefinedType ()
@@ -3125,7 +3125,7 @@ namespace MonoTests.System
}
[Test]
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[ExpectedException (typeof (NotSupportedException))]
#endif
public void TestMakeGenericType_UserDefinedType_DotNet20SP1 ()
@@ -3138,7 +3138,7 @@ namespace MonoTests.System
}
[Test]
-#if MONOTOUCH
+#if MONOTOUCH || MOBILE_STATIC
[ExpectedException (typeof (NotSupportedException))]
#endif
public void MakeGenericType_BadUserType ()
@@ -3274,7 +3274,7 @@ namespace MonoTests.System
Assert.AreEqual (t1, t2);
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
public void SpaceAfterComma () {
string strType = "System.Collections.Generic.Dictionary`2[[System.Int32,mscorlib], [System.String,mscorlib]],mscorlib";
@@ -3282,7 +3282,7 @@ namespace MonoTests.System
}
#endif
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
public void Bug506757 ()
{
@@ -4152,7 +4152,7 @@ namespace MonoTests.System
Assert.AreEqual (Type.GetType ("MonoTests.System.Foo`1[System.Int32"), null, "#15");
}
-#if !MONOTOUCH
+#if !MONOTOUCH && !MOBILE_STATIC
[Test]
[Category ("AndroidNotWorking")] // requires symbol writer
public void FullNameGetTypeParseEscapeRoundtrip () // bug #26384
diff --git a/mcs/class/corlib/corlib_test.dll.sources b/mcs/class/corlib/corlib_test.dll.sources
index 70454d6e5ec..b7cf0d04b3a 100644
--- a/mcs/class/corlib/corlib_test.dll.sources
+++ b/mcs/class/corlib/corlib_test.dll.sources
@@ -355,17 +355,17 @@ System.Security.Policy/ApplicationSecurityManagerTest.cs
System.Security.Policy/ApplicationTrustTest.cs
System.Security.Policy/CodeGroupTest.cs
System.Security.Policy/EvidenceTest.cs
-System.Security.Policy/FileCodeGroupTest.cs
+System.Security.Policy/FileCodeGroupTest.cs
System.Security.Policy/FirstMatchCodeGroupTest.cs
System.Security.Policy/GacMembershipConditionTest.cs
System.Security.Policy/GacTest.cs
System.Security.Policy/HashMembershipConditionTest.cs
System.Security.Policy/HashTest.cs
System.Security.Policy/IBuiltInEvidenceTest.cs
-System.Security.Policy/NetCodeGroupTest.cs
-System.Security.Policy/PermissionRequestEvidenceTest.cs
-System.Security.Policy/PolicyLevelTest.cs
-System.Security.Policy/PolicyStatementTest.cs
+System.Security.Policy/NetCodeGroupTest.cs
+System.Security.Policy/PermissionRequestEvidenceTest.cs
+System.Security.Policy/PolicyLevelTest.cs
+System.Security.Policy/PolicyStatementTest.cs
System.Security.Policy/PublisherMembershipConditionTest.cs
System.Security.Policy/PublisherTest.cs
System.Security.Policy/SiteMembershipConditionTest.cs
diff --git a/mcs/class/corlib/mobile_static_corlib_test.dll.excludes b/mcs/class/corlib/mobile_static_corlib_test.dll.excludes
new file mode 100644
index 00000000000..eb17a105b75
--- /dev/null
+++ b/mcs/class/corlib/mobile_static_corlib_test.dll.excludes
@@ -0,0 +1,131 @@
+Microsoft.Win32/RegistryKeyTest.cs
+System.Diagnostics.Contracts/ContractAssertTest.cs
+System.Diagnostics.Contracts/ContractAssumeTest.cs
+System.Diagnostics.Contracts/ContractCollectionMethodsTest.cs
+System.Diagnostics.Contracts/ContractHelperTest.cs
+System.Diagnostics.Contracts/ContractMarkerMethodsTest.cs
+System.Diagnostics.Contracts/ContractMustUseRewriterTest.cs
+System.Diagnostics.Contracts/Helpers/RunAgainstReferenceAttribute.cs
+System.Diagnostics.Contracts/Helpers/TestContractBase.cs
+System.Reflection.Emit/AssemblyBuilderAccessTest.cs
+System.Reflection.Emit/AssemblyBuilderTest.cs
+System.Reflection.Emit/ConstructorBuilderTest.cs
+System.Reflection.Emit/ConstructorOnTypeBuilderInstTest.cs
+System.Reflection.Emit/CustomAttributeBuilderTest.cs
+System.Reflection.Emit/DerivedTypesTest.cs
+System.Reflection.Emit/DynamicILInfoTest.cs
+System.Reflection.Emit/DynamicMethodTest.cs
+System.Reflection.Emit/EnumBuilderTest.cs
+System.Reflection.Emit/EventBuilderTest.cs
+System.Reflection.Emit/FieldBuilderTest.cs
+System.Reflection.Emit/GenericTypeParameterBuilderTest.cs
+System.Reflection.Emit/ILGeneratorTest.cs
+System.Reflection.Emit/MethodBuilderTest.cs
+System.Reflection.Emit/MethodBuilderTestIL.cs
+System.Reflection.Emit/MethodOnTypeBuilderInstTest.cs
+System.Reflection.Emit/MethodRentalCas.cs
+System.Reflection.Emit/MethodRentalTest.cs
+System.Reflection.Emit/ModuleBuilderTest.cs
+System.Reflection.Emit/ParameterBuilderTest.cs
+System.Reflection.Emit/PropertyBuilderTest.cs
+System.Reflection.Emit/SignatureHelperTest.cs
+System.Reflection.Emit/TypeBuilderTest.cs
+System.Runtime.Remoting/ContextTest.cs
+System.Runtime.Remoting/RemotingConfigurationTest.cs
+System.Runtime.Remoting/RemotingServicesTest.cs
+System.Runtime.Remoting/SoapServicesTest.cs
+System.Runtime.Remoting/SynchronizationAttributeTest.cs
+System.Runtime.Remoting.Channels/ChannelServicesTest.cs
+System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
+System.Runtime.Remoting.Messaging/CallContextTest.cs
+System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs
+System.Security.AccessControl/AuthorizationRuleTest.cs
+System.Security.AccessControl/CommonAceTest.cs
+System.Security.AccessControl/CommonAclTest.cs
+System.Security.AccessControl/CommonObjectSecurityTest.cs
+System.Security.AccessControl/CommonSecurityDescriptorTest.cs
+System.Security.AccessControl/CryptoKeyAccessRuleTest.cs
+System.Security.AccessControl/DirectoryObjectSecurityTest.cs
+System.Security.AccessControl/DirectorySecurityTest.cs
+System.Security.AccessControl/DiscretionaryAclTest.cs
+System.Security.AccessControl/EventWaitHandleSecurityTest.cs
+System.Security.AccessControl/FileSecurityTest.cs
+System.Security.AccessControl/MutexAccessRuleTest.cs
+System.Security.AccessControl/MutexSecurityTest.cs
+System.Security.AccessControl/ObjectAceTest.cs
+System.Security.AccessControl/ObjectSecurity_TTest.cs
+System.Security.AccessControl/ObjectSecurityTest.cs
+System.Security.AccessControl/RawAclTest.cs
+System.Security.AccessControl/RawSecurityDescriptorTest.cs
+System.Security.AccessControl/RegistrySecurityTest.cs
+System.Security.AccessControl/SystemAclTest.cs
+System.Security.Permissions/CodeAccessSecurityAttributeTest.cs
+System.Security.Permissions/EnvironmentPermissionAttributeTest.cs
+System.Security.Permissions/EnvironmentPermissionTest.cs
+System.Security.Permissions/FileDialogPermissionAttributeTest.cs
+System.Security.Permissions/FileDialogPermissionTest.cs
+System.Security.Permissions/FileIOPermissionAttributeTest.cs
+System.Security.Permissions/FileIOPermissionTest.cs
+System.Security.Permissions/GacIdentityPermissionAttributeTest.cs
+System.Security.Permissions/GacIdentityPermissionTest.cs
+System.Security.Permissions/HostProtectionAttributeTest.cs
+System.Security.Permissions/IBuiltInPermissionTest.cs
+System.Security.Permissions/IsolatedStorageFilePermissionAttributeTest.cs
+System.Security.Permissions/IsolatedStorageFilePermissionTest.cs
+System.Security.Permissions/IsolatedStoragePermissionAttributeTest.cs
+System.Security.Permissions/KeyContainerPermissionAttributeTest.cs
+System.Security.Permissions/PermissionSetAttributeTest.cs
+System.Security.Permissions/PrincipalPermissionAttributeTest.cs
+System.Security.Permissions/PrincipalPermissionTest.cs
+System.Security.Permissions/PublisherIdentityPermissionAttributeTest.cs
+System.Security.Permissions/PublisherIdentityPermissionTest.cs
+System.Security.Permissions/ReflectionPermissionAttributeTest.cs
+System.Security.Permissions/ReflectionPermissionTest.cs
+System.Security.Permissions/RegistryPermissionAttributeTest.cs
+System.Security.Permissions/RegistryPermissionTest.cs
+System.Security.Permissions/SecurityAttributeTest.cs
+System.Security.Permissions/SecurityPermissionAttributeTest.cs
+System.Security.Permissions/SecurityPermissionTest.cs
+System.Security.Permissions/SiteIdentityPermissionAttributeTest.cs
+System.Security.Permissions/SiteIdentityPermissionTest.cs
+System.Security.Permissions/StrongNameIdentityPermissionAttributeTest.cs
+System.Security.Permissions/StrongNameIdentityPermissionTest.cs
+System.Security.Permissions/StrongNamePublicKeyBlobTest.cs
+System.Security.Permissions/UIPermissionAttributeTest.cs
+System.Security.Permissions/UIPermissionTest.cs
+System.Security.Permissions/UrlIdentityPermissionAttributeTest.cs
+System.Security.Permissions/UrlIdentityPermissionTest.cs
+System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs
+System.Security.Permissions/ZoneIdentityPermissionTest.cs
+System.Security.Policy/AllMembershipConditionTest.cs
+System.Security.Policy/ApplicationDirectoryMembershipConditionTest.cs
+System.Security.Policy/ApplicationDirectoryTest.cs
+System.Security.Policy/ApplicationMembershipConditionTest.cs
+System.Security.Policy/ApplicationSecurityManagerCas.cs
+System.Security.Policy/ApplicationSecurityManagerTest.cs
+System.Security.Policy/ApplicationTrustTest.cs
+System.Security.Policy/CodeGroupTest.cs
+System.Security.Policy/DomainApplicationMembershipConditionTest.cs
+System.Security.Policy/EvidenceTest.cs
+System.Security.Policy/FileCodeGroupTest.cs
+System.Security.Policy/FirstMatchCodeGroupTest.cs
+System.Security.Policy/GacMembershipConditionTest.cs
+System.Security.Policy/GacTest.cs
+System.Security.Policy/HashMembershipConditionTest.cs
+System.Security.Policy/HashTest.cs
+System.Security.Policy/IBuiltInEvidenceTest.cs
+System.Security.Policy/NetCodeGroupTest.cs
+System.Security.Policy/PermissionRequestEvidenceTest.cs
+System.Security.Policy/PolicyLevelTest.cs
+System.Security.Policy/PolicyStatementTest.cs
+System.Security.Policy/PublisherMembershipConditionTest.cs
+System.Security.Policy/PublisherTest.cs
+System.Security.Policy/SiteMembershipConditionTest.cs
+System.Security.Policy/SiteTest.cs
+System.Security.Policy/StrongNameMembershipConditionTest.cs
+System.Security.Policy/StrongNameTest.cs
+System.Security.Policy/UnionCodeGroupTest.cs
+System.Security.Policy/UrlMembershipConditionTest.cs
+System.Security.Policy/UrlTest.cs
+System.Security.Policy/ZoneMembershipConditionTest.cs
+System.Security.Policy/ZoneTest.cs
diff --git a/mcs/class/corlib/mobile_static_corlib_test.dll.sources b/mcs/class/corlib/mobile_static_corlib_test.dll.sources
new file mode 100644
index 00000000000..011effe162c
--- /dev/null
+++ b/mcs/class/corlib/mobile_static_corlib_test.dll.sources
@@ -0,0 +1 @@
+#include corlib_test.dll.sources