[netcore] Run CoreFX tests on CI (macOS) (mono/mono#14849)
authorEgor Bogatov <egorbo@gmail.com>
Wed, 12 Jun 2019 07:40:15 +0000 (10:40 +0300)
committerMarek Safar <marek.safar@gmail.com>
Wed, 12 Jun 2019 07:40:15 +0000 (09:40 +0200)
Commit migrated from https://github.com/mono/mono/commit/56398813ae5dd9b363888bc1d221b75035051afc

src/mono/netcore/CoreFX.issues.rsp
src/mono/netcore/Makefile
src/mono/netcore/build.sh
src/mono/netcore/sample/HelloWorld/Program.cs

index c19713c..a2c4d5a 100644 (file)
 -nomethod System.Diagnostics.Tests.ProcessTests.GetProcesses_RemoteMachinePath_ReturnsExpected
 
 ####################################################################
+##  System.Diagnostics.Debug
+####################################################################
+
+# disabled in CoreCLR too
+-nomethod System.Diagnostics.Tests.DebugTestsNoListeners.Print
+-nomethod System.Diagnostics.Tests.DebugTestsUsingListeners.Print
+
+####################################################################
 ##  System.Diagnostics.TraceSource.Tests
 ####################################################################
 
 # TODO: Hangs
 -nomethod System.Net.Sockets.Tests.CreateSocket.CtorAndAccept_SocketNotKeptAliveViaInheritance
 
+# flaky test
+-nomethod System.Net.Sockets.Tests.SocketOptionNameTest.MulticastInterface_Set_AnyInterface_Succeeds
+
 ####################################################################
 ##  System.Reflection.Emit.ILGeneration.Tests
 ####################################################################
 -nomethod System.ComponentModel.Composition.MetadataViewProviderTests.GetMetadataView_InterfaceWithIndexer_ShouldThrowNotSupportedException
 -nomethod Tests.Integration.ExportFactoryTests.ExportFactoryStandardImports_ShouldWorkProperly
 
-# flacky test - System.TypeLoadException : Could not load type '_proxy_System.ComponentModel.Composition.IStronglyTypedStructure_3b7f133d-79c7-449e-8f68-22aa093dbb8d' from assembly ''.
+# flaky test - System.TypeLoadException : Could not load type '_proxy_System.ComponentModel.Composition.IStronglyTypedStructure_3b7f133d-79c7-449e-8f68-22aa093dbb8d' from assembly ''.
 -nomethod System.ComponentModel.Composition.MetadataAttributeTests.StronglyTypedStructureTest
+-nomethod System.ComponentModel.Composition.MetadataAttributeTests.StronglyTypedStructureTestWithTransparentViews
 
 ####################################################################
 ##  System.Composition.TypedParts.Tests
 -nomethod System.Reflection.Tests.TypeTests.GetEnumUnderlyingType
 -nomethod System.Reflection.Tests.TypeTests_HiddenTestingOrder.HideDetectionHappensAfterPrivateInBaseClassChecks
 
+# flaky tests
+-nomethod System.Reflection.Tests.TypeInfoDeclaredImplementedInterfacesTests.*
+
 ####################################################################
 ##  System.Utf8String.Experimental.Tests
 ####################################################################
 
 -nomethod System.Security.Cryptography.X509Certificates.Tests.DynamicChainTests.TestInvalidAia
 
+# disabled in CoreCLR too
+-noclass System.Security.Cryptography.X509Certificates.Tests.X509Certificate2UITests
+
 ####################################################################
 ##  System.Runtime.Serialization.Json.Tests
 ####################################################################
index 5d028f0..b0de5d9 100644 (file)
@@ -21,7 +21,7 @@ UNZIPCMD = python -c "import zipfile,sys; zipfile.ZipFile(sys.argv[1], 'r').extr
 XUNIT_FLAGS =
 TESTS_PLATFORM = Windows_NT.x64
 DOTNET := $(shell powershell -ExecutionPolicy Bypass -Command "./init-tools.ps1")/dotnet.exe
-DOTNET := $(subst \,/,$(DOTNET))
+DOTNET := "$(subst \,/,$(DOTNET))"
 endif
 
 ifeq ($(HOST_PLATFORM),macos)
@@ -110,7 +110,8 @@ runtime:
 
 link-mono:
        cp ../mono/mini/.libs/libmonosgen-2.0$(PLATFORM_AOT_SUFFIX) $(SHAREDRUNTIME)/$(PLATFORM_AOT_PREFIX)coreclr$(PLATFORM_AOT_SUFFIX)
-       cp ../mcs/class/System.Private.CoreLib/bin/$(COREARCH)/System.Private.CoreLib.{dll,pdb} $(SHAREDRUNTIME)
+       cp ../mcs/class/System.Private.CoreLib/bin/$(COREARCH)/System.Private.CoreLib.dll $(SHAREDRUNTIME)
+       cp ../mcs/class/System.Private.CoreLib/bin/$(COREARCH)/System.Private.CoreLib.pdb $(SHAREDRUNTIME)
 
 prepare: $(ASPNETCORESDK_FILE) $(NETCORESDK_FILE) update-corefx update-roslyn link-mono
 
@@ -139,7 +140,7 @@ xtest-%: prepare update-corefx-tests
        sed -i -e 's/9.9.9/$(NETCOREAPP_VERSION)/g' corefx/tests/extracted/$*/*.runtimeconfig.json
        cd corefx/tests/extracted/$* && \
        COMPlus_DebugWriteToStdErr=1 $(CURDIR)/./dotnet --fx-version "$(NETCOREAPP_VERSION)" xunit.console.dll $*.dll \
-               -html ../../TestResult-$*.html -nunit ../../TestResult-$*-netcore-xunit.xml \
+               -html ../../TestResult-$*.html -xml ../../TestResult-$*-netcore-xunit.xml \
                $(XUNIT_FLAGS) @../../../../CoreFX.issues.rsp \
                $(FIXTURE) || true
 
index ac7a651..ec27805 100755 (executable)
@@ -111,5 +111,7 @@ fi
 
 # run all xunit tests
 if [ "$test" = "true" ]; then
-  make xtestall
+  for testdir in corefx/tests/extracted/*; do
+    ../scripts/ci/./run-step.sh --label=$(basename $testdir) --timeout=15m make xtest-$(basename $testdir)
+  done
 fi
\ No newline at end of file
index 534b73f..45d83b3 100644 (file)
@@ -6,8 +6,8 @@ namespace HelloWorld
     {
         static void Main(string[] args)
         {
-            Console.WriteLine("Hello World!");
-
+            bool isMono = typeof(object).Assembly.GetType("Mono.RuntimeStructs") != null;
+            Console.WriteLine("Hello World " + (isMono ? "from Mono!" : "from CoreCLR!"));
             Console.WriteLine(typeof(object).Assembly.FullName);
             Console.WriteLine(System.Reflection.Assembly.GetEntryAssembly ());
             Console.WriteLine(System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription);