* Update to use EnableSGenConc instead of MtouchEnableSGenConc (either works,
the former is the new future).
* Set EnableSGenConc as a top-level property, so we make sure it's set no
matter how the project is executed.
This makes it so that this setting work for .NET projects, where we're not using project configurations.
Skip:
* Any Thumb variation (Thumb code isn't supported anymore in .NET).
* Any AssemblyBuildTarget variation (compiling assemblies to dylibs [fastdev]
or frameworks - neither is supported/implemented for .NET).
This trims down the test list a bit.
* [xharness] Add LLVM test case for Mac Catalyst.
* [tests] Add make target to build monotouch-test using LLVM on Mac Catalyst.
* [tools] Pass the right arguments to the AOT compiler for Mac Catalyst. Fixes#12484.
Mac Catalyst is just special.
Fixes https://github.com/xamarin/xamarin-macios/issues/12484.
* [dotnet] Make CoreCLR the default for macOS.
* [dotnet] Show an error if trying to use MonoVM on macOS.
Fixes https://github.com/xamarin/xamarin-macios/issues/12477.
* [xharness] Remove CoreCLR variations for macOS tests.
The default is using CoreCLR for macOS, so having a specific variation for it
doesn't make sense.
* [tests] Adjust linker tests to work on CoreCLR as well.
* [xharness] monotouch-test on CoreCLR is now green, so enable by default.
* Update tests/xharness/Jenkins/TestVariationsFactory.cs
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
The registrar removal was fixed recently but the test was still failing.
Turns out xharness modify the linker setting for this test (as the
linker is required for this optimization) but the newer dotnet csproj
did not have an entry (to modify).
Fixes https://github.com/xamarin/xamarin-macios/issues/10512
[xharness] Fix monotouch-test build when LinkSdk is used for dotnet projects
Skip failing assertion, issue filled
Also:
* Use the right arm64 runtime identifier depending on the target platform.
* Don't add CoreCLR variations of Mac Catalyst tests.
* Exclude UISearchDisplayController from tests, since it isn't available in
Mac Catalyst anymore.
Use a private property (prefixed with underscore) for now, until we can decide
on a better/general name.
Also add a variation to xharness to build monotouch-test with CoreCLR
(building works fine, but it crashes at startup, which is expected at this
point).
* [apitest] Sanitize files by adding missing eols.
* [apitest] Add #if __MACOS__ to all test files.
In preparation for the move into monotouchtest.
* [apitest] Move test files into monotouchtest.
* [tests] Remove the apitest project.
* [monotouch-test] Remove MessagingMac.cs, it's not needed.
* [xammac-tests] Add file PlatformInfo.cs to the build.
* [xammac-tests] Move files into monotouch-test.
* [monotouch-test] Rename test class to not clash with another test class of the same (Objective-C) name.
* [tests] How did this ever work?
Answer: it never did.
* [monotouch-test] Remove duplicated test code.
* [xammac-tests] Define DYNAMIC_REGISTRAR when we're using the dynamic registrar.
* [monotouch-test] Adjust the BundleTest.TestGetBundleId test to cope with having multiple apps for the same bundle id.
* [monotouch-test] Ignore a test that doesn't work with the static registrar (due to a bug in the static registrar).
Merge DotNetBuildTask into MSBuildTask to simplify creation of build tasks -
these tasks are very similar, and we instantiate MSBuildTasks in over a dozen
places, and this way we don't have to update every instantiation to check if
an MSBuildTask or a DotNetBuildTask should be created.
The end result is that code that does 'new MSBuildTask (...)' will just work
without updates for .NET projects.
The static registrar may need access to types that have been linked away, so
store unmarked types so that the static registrar can access them later.
This also makes all the monotouch-test variations green, so enable them all.
Fixes this monotouch-test when all optimizations are enabled:
MonoTouchFixtures.ObjCRuntime.RegistrarTest
[FAIL] TestProtocolRegistration : UIApplicationDelegate/17669
Expected: True
But was: False
at MonoTouchFixtures.ObjCRuntime.RegistrarTest.TestProtocolRegistration() in xamarin-macios/tests/monotouch-test/ObjCRuntime/RegistrarTest.cs:line 1350
This test variation ends up being too big (1.5 GB), so it doesn't install
properly and the app crashes at startup.
So just skip it.
Fixes https://github.com/xamarin/maccore/issues/2282.
* [xharness] Enable monotouch-test/.NET by default, but ignore all variations.
The default (Debug) configuration is green now, but the rest of the variations aren't yet.
* [tests] Ignore LocaleTest.InitRegionInfo in .NET because it needs globalization data.
Ref: https://github.com/xamarin/xamarin-macios/issues/8906
I can't reproduce locally, because it's ignored for me:
[INCONCLUSIVE] InitRegionInfo : You can construct locale without countries
at MonoTouchFixtures.Foundation.LocaleTest.InitRegionInfo() in [...]/xamarin-macios/tests/monotouch-test/Foundation/LocaleTest.cs:line 47
but this should fix this monotouch-test test failure (I'm guessing that 'IV'
stands for 'Invariant', which is all the current .NET version ships with):
MonoTouchFixtures.Foundation.LocaleTest
[FAIL] InitRegionInfo : Name
String lengths are both 2. Strings differ at index 0.
Expected: "US"
But was: "IV"
-----------^
: at MonoTouchFixtures.Foundation.LocaleTest.InitRegionInfo() in /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/monotouch-test/Foundation/LocaleTest.cs:line 49
Make it possible to make a project ignored by default from its initial definition,
and which takes precedence over any other selection criteria.
This way it's possible to make the .NET version of monotouch-test show up in the
web view, which makes it runnable locally (for testing), while at the same time it
will never be run on CI.
This requires passing the root directory around in multiple places, since ResolveAllPaths
doesn't have access to the static class where we define the root directory.
Also call ResolveAllPaths in a few more places to ensure paths everywhere are resolved.
Create some enumerables that will state the tests to run, that way, if
new tests need to be added, there will not be a need to edit the
jenkins class.
Add tests to ensure that all the tests are added. That away we will make
sure that tests are not removed by accident.
Try to make the Jenkins class do a single task. Move the generation of
the variations logic out (which is hard to test atm, but will be doable
in a second round).
Moved some useful methos also out and add tests.