From d6e8e9107300ce554febd82897a61d07ef92653c Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 24 May 2019 14:13:59 -0700 Subject: [PATCH 1/3] [introspection] Adjust rules for INParameter. (#6131) --- tests/introspection/iOS/iOSApiSelectorTest.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/introspection/iOS/iOSApiSelectorTest.cs b/tests/introspection/iOS/iOSApiSelectorTest.cs index 0e03f1a1dc..65baa66ee4 100644 --- a/tests/introspection/iOS/iOSApiSelectorTest.cs +++ b/tests/introspection/iOS/iOSApiSelectorTest.cs @@ -685,6 +685,11 @@ namespace Introspection { return !TestRuntime.CheckXcodeVersion (8, 0); case "HMLocationEvent": return !TestRuntime.CheckXcodeVersion (9, 0); +#if __WATCHOS__ + case "INParameter": + // NSCopying conformance added in Xcode 10 + return !TestRuntime.CheckXcodeVersion (10, 0); +#endif } break; From fb3db66384259f03059c08712c1a0e956b849a00 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Sat, 25 May 2019 05:27:58 -0700 Subject: [PATCH 2/3] [XHarness] If no test are ran, consider it as a failed ran. (#6123) If the total test run is 0 consider it a fail. Tests that failed after the change were also fixed. Fixes: https://github.com/xamarin/xamarin-macios/issues/5767 --- tests/interdependent-binding-projects/Main.cs | 9 +++++++++ tests/xharness/AppRunner.cs | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/interdependent-binding-projects/Main.cs b/tests/interdependent-binding-projects/Main.cs index 641e109285..71b7e7861a 100644 --- a/tests/interdependent-binding-projects/Main.cs +++ b/tests/interdependent-binding-projects/Main.cs @@ -34,4 +34,13 @@ public partial class AppDelegate : UIApplicationDelegate UIApplication.Main (args, null, typeof (AppDelegate)); } } +#else +public static partial class TestLoader { + static partial void AddTestAssembliesImpl (BaseTouchRunner runner) + { + runner.Add (typeof (Xamarin.BindingTests2.BindingTest).Assembly); + runner.Add (typeof (Xamarin.BindingTests.ProtocolTest).Assembly); + } +} + #endif // !__WATCHOS__ diff --git a/tests/xharness/AppRunner.cs b/tests/xharness/AppRunner.cs index 01197971a9..cbcacd5acf 100644 --- a/tests/xharness/AppRunner.cs +++ b/tests/xharness/AppRunner.cs @@ -371,7 +371,7 @@ namespace xharness } var passed = total - errors - failed - notRun - inconclusive - ignored - skipped - invalid; var resultLine = $"Tests run: {total} Passed: {passed} Inconclusive: {inconclusive} Failed: {failed + errors} Ignored: {ignored + skipped + invalid}"; - return (resultLine, errors != 0 || failed != 0); + return (resultLine, total == 0 || errors != 0 || failed != 0); } (string resultLine, bool failed) ParseNUnitXml (StreamReader stream, StreamWriter writer) @@ -434,7 +434,7 @@ namespace xharness string resultLine = $"Tests run: {total} Passed: {passed} Inconclusive: {inconclusive} Failed: {failed + errors} Ignored: {ignored + skipped + invalid}"; writer.WriteLine (resultLine); - return (resultLine, errors != 0 || failed != 0); + return (resultLine, total == 0 | errors != 0 || failed != 0); } (string resultLine, bool failed, bool crashed) ParseResult (Log listener_log, bool timed_out, bool crashed) From 1d5fe7118ea6f2dd1cdb4d3869e42de7f2bcad9f Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 27 May 2019 09:22:00 -0700 Subject: [PATCH 3/3] [XHarness] Ignore a number of assemblies that do not have any tests. (#6132) Mono did remove all the tests in a number of assemblies on ios/tvos/watchos. With a recent change, we report test runs with no tests as a failure (correctly since it will bring up issues with the runners). In this case, the tree assemblies have to be ignored because they trully do not have tests and the runners are doing the right thing. Fixes: https://github.com/xamarin/maccore/issues/1652 --- .../BCLTestImporter/BCLTestProjectGenerator.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs b/tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs index 0d67830df1..edfd064cbd 100644 --- a/tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs +++ b/tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs @@ -141,6 +141,9 @@ namespace BCLTestImporter { "monotouch_Mono.CodeContracts_test.dll", // not supported by xamarin "monotouch_Novell.Directory.Ldap_test.dll", // not supported by xamarin "monotouch_Mono.Profiler.Log_xunit-test.dll", // special tests that need an extra app to connect as a profiler + "monotouch_System.ComponentModel.Composition_xunit-test.dll", // has no test classes, all test have been removed by mono + "monotouch_System.Net.Http.FunctionalTests_xunit-test.dll", // has no test classes, all test have been removed by mono + "monotouch_System.Runtime.Serialization_xunit-test.dll", // has no test classes, all test have been removed by mono }; // list of assemblies that are going to be ignored, any project with an assemblies that is ignored will