Skip to content

Commit

Permalink
[d16-5] [Tests] Split groups so that they work on iOS 32b. (#7616)
Browse files Browse the repository at this point in the history
After this commit we will have more application but they will be the
appropiate size so that they can be built with the linker for iOS 32b.
It is important to note that the following apps WILL CONTINUE to fail
since the dlls need to be splitted in mono:

* mscorlib tests
* Mono BCL tests group 5 - Which is monotouch_System.Core_xunit-test.dll
and is too large.
  • Loading branch information
monojenkins authored and mandel-macaque committed Dec 18, 2019
1 parent c44e339 commit 8e36302
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ tests/bcl-test/Mac\ OS\ X\ BCL\ \tests*.csproj
tests/bcl-test/mscorlib-mac-full.csproj
tests/bcl-test/mscorlib-mac-modern.csproj
tests/bcl-test/mscorlib.csproj
tests/bcl-test/SystemCoreXunit.csproj
tests/bcl-test/SystemXunit.csproj
14 changes: 11 additions & 3 deletions tests/xharness/UnifiedTarget.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace xharness
{
public class UnifiedTarget : iOSTarget
{
// special cases for the BCL applications

public override string Suffix {
get {
return MonoNativeInfo != null ? MonoNativeInfo.FlavorSuffix : "-ios";
Expand Down Expand Up @@ -67,9 +69,15 @@ public override string DeviceArchitectures {

protected override void CalculateName ()
{
if (TargetDirectory.Contains ("bcl-test"))
Name = (TestProject.Name == "mscorlib")? "mscorlib" : TestProject.Name.Substring (TestProject.Name.IndexOf ("BCL", StringComparison.Ordinal));
else
if (TargetDirectory.Contains ("bcl-test")) {
if (TestProject.Name == "mscorlib")
Name = "mscorlib";
else {
var bclIndex = TestProject.Name.IndexOf ("BCL", StringComparison.Ordinal);
// most of the BCL test are grouped, but there are a number that are not, in those cases remove the "{testype} Mono " prefix
Name = (bclIndex == -1) ? TestProject.Name.Substring (TestProject.Name.IndexOf ("Mono ", StringComparison.Ordinal) + "Mono ".Length) : TestProject.Name.Substring (bclIndex);
}
} else
base.CalculateName ();
if (MonoNativeInfo != null)
Name = Name + MonoNativeInfo.FlavorSuffix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,17 @@ public class BclTestProjectInfo {

// BCL tests group 4
new BclTestProjectInfo { Name = "SystemNumericsXunit", assemblies = new [] { "monotouch_System.Numerics_xunit-test.dll" }, Group = "BCL tests group 4" },
new BclTestProjectInfo { Name = "SystemCoreXunit", assemblies = new [] { "monotouch_System.Core_xunit-test.dll" }, Group = "BCL tests group 4" },
new BclTestProjectInfo { Name = "SystemXunit", assemblies = new [] { "monotouch_System_xunit-test.dll" }, ExtraArgs = $"--xml={Path.Combine (Harness.RootDirectory, "bcl-test", "SystemXunitLinker.xml")} --optimize=-custom-attributes-removal", Group = "BCL tests group 4" },
new BclTestProjectInfo { Name = "MicrosoftCSharpXunit", assemblies = new [] { "monotouch_Microsoft.CSharp_xunit-test.dll" }, Group = "BCL tests group 4" },

// BCL tests group 5
new BclTestProjectInfo { Name = "SystemNetHttpUnitTestsXunit", assemblies = new [] { "monotouch_System.Net.Http.UnitTests_xunit-test.dll" }, Group = "BCL tests group 5" },
new BclTestProjectInfo { Name = "SystemNetHttpFunctionalTestsXunit", assemblies = new [] { "monotouch_System.Net.Http.FunctionalTests_xunit-test.dll" }, Group = "BCL tests group 5" },

// Special assemblies that are in a single application due to their size being to large for the iOS 32b.
new BclTestProjectInfo { Name = "mscorlib", assemblies = new [] { "monotouch_corlib_xunit-test.dll" }, Group = "mscorlib" }, // special testcase for the corlib which is later used in xHarness for diff config options
new BclTestProjectInfo { Name = "SystemCoreXunit", assemblies = new [] { "monotouch_System.Core_xunit-test.dll" }, Group = "SystemCoreXunit" }, // special test case, this dll is to large for the iOS 32b
new BclTestProjectInfo { Name = "SystemXunit", assemblies = new [] { "monotouch_System_xunit-test.dll" }, ExtraArgs = $"--xml={Path.Combine (Harness.RootDirectory, "bcl-test", "SystemXunitLinker.xml")} --optimize=-custom-attributes-removal", Group = "SystemXunit" }, // special case due to the need of the extra args

// BCL tests group 6
new BclTestProjectInfo { Name = "SystemNetHttpUnitTestsXunit", assemblies = new [] { "monotouch_System.Net.Http.UnitTests_xunit-test.dll" }, Group = "BCL tests group 6" },
new BclTestProjectInfo { Name = "SystemNetHttpFunctionalTestsXunit", assemblies = new [] { "monotouch_System.Net.Http.FunctionalTests_xunit-test.dll" }, Group = "BCL tests group 6" },
};

static readonly List <string> CommonIgnoredAssemblies = new List <string> {
Expand Down

3 comments on commit 8e36302

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build was (probably) aborted

🔥 Jenkins job (on internal Jenkins) failed in stage(s) 'Test run, Test run' 🔥

Build succeeded
✅ Packages:

API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
🔥 Test run failed 🔥

Test results

1 tests failed, 169 tests passed.

Failed tests

  • monotouch-test/watchOS 32-bits - simulator/Debug: Crashed

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Device tests completed (Failed) on iOS on Azure DevOps(iOS): Html Report 🔥

Test results

1 tests failed, 126 tests passed.

Failed tests

  • [xUnit] Mono SystemXunit/iOS Unified 64-bits - device/AssemblyBuildTarget: SDK framework (release): Failed

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Device tests passed on TvOS on Azure DevOps(TvOS): Html Report

🎉 All 127 tests passed 🎉

Please sign in to comment.