Граф коммитов

6693 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 138884abee
[CoreServices] Add support for Xcode 15. (#18919) 2023-09-05 10:40:50 -04:00
Manuel de la Pena 1b818059c1
[CoreTelephony] Add support for xcode 15. (#18920)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-09-05 10:39:39 -04:00
Haritha Mohan 193618591d
[MapKit] Add support for Xcode 15 beta 7 (#18877)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-09-05 08:22:13 -04:00
Rolf Bjarne Kvinge cbcde7e15d
[tests] Move the ARConfigurationTest.Subclasses test from monotouch-test to cecil-test. (#18908)
This test uses reflection to figure out if there are any ARConfiguration
subclasses that don't implement a particular method. The reflection usage is
problematic when trimming apps, and this is really what the Cecil tests are
for, so just re-implement the entire tests as a Cecil test.
2023-09-05 09:36:47 +02:00
Rolf Bjarne Kvinge da639bf576 [tests] Fix building unit tests after an MSBuild.StructuredLogger bump. 2023-09-05 09:16:20 +02:00
Rolf Bjarne Kvinge 6f586dfa45
[xharness] Use .NET to build the MSBuild test projects. (#18895)
This is one more step towards dropping Mono, and also solves a random
network failure when doing 'nuget restore' with Mono (due to a bug in Mono).
2023-09-05 08:08:25 +02:00
Manuel de la Pena 4e4b8c4c5b
[CoreImage] Add support for Xcode 15 beta 7. (#18874)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-09-04 12:17:28 -04:00
Manuel de la Pena 14f0ebd379
[CoreNFC] Add support for Xcode 15 beta 7. (#18901) 2023-09-03 11:43:17 -04:00
Manuel de la Pena 712896357c
[AuthentationServices] Add support for xcode 15 beta 6. (#18787)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-09-03 11:42:59 -04:00
Haritha Mohan d69e4632ef
[EventKit] Add support for Xcode 15 beta 7 (#18863)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@soto.dev>
2023-09-01 11:30:55 -04:00
Rolf Bjarne Kvinge bf8f54c2f2 [net8.0] Merge main into net8.0. 2023-09-01 15:00:32 +02:00
Rolf Bjarne Kvinge ddf2ad8532
[net8.0-xcode15] Merge net8.0 into net8.0-xcode15. (#18860) 2023-08-31 19:40:34 +02:00
Haritha Mohan a0da3e6e4e
[HomeKit] Add support for Xcode 15 beta 7 (#18878)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-31 09:59:16 -04:00
Rolf Bjarne Kvinge 3b36598cb8 [tests] Adjust mtouch tests to skip unrelated warnings. 2023-08-31 10:14:53 +02:00
Rolf Bjarne Kvinge 7e6ddc4bb3
Merge branch 'net8.0-xcode15' into bump-net8.0-in-net8.0-xcode15-2023-08-29 2023-08-30 19:27:32 +02:00
Rolf Bjarne Kvinge 6c06feea40
[src] Add back manual NewsstandKitLibrary constant for backwards compatibility. (#18841) 2023-08-30 19:27:13 +02:00
Manuel de la Pena 07d77bf131
[CallKit] Add support for XCode 15 beta 6. (#18789)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-30 09:46:33 -04:00
Manuel de la Pena 0e4afa6945
[CoreData] Add support for xcode 15 beta6. (#18837)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-30 09:42:43 -04:00
Manuel de la Pena 9a54c6c3a6
[CoreGraphics] Add support for xcode 15 beta 6. (#18838)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-08-30 09:42:14 -04:00
Manuel de la Pena 7f4a13331d
[CoreFoundation] Add support for Xcode 15 beta 6. (#18839) 2023-08-30 09:41:37 -04:00
Rolf Bjarne Kvinge d50f52df06
Add support for NativeAOT on macOS (#18765)
Co-authored-by: Filip Navara <navara@emclient.com>
2023-08-30 10:38:43 +02:00
Manuel de la Pena b3e2a765fd
[CoreBluetooth] Add support for xcode 15 beta 6. (#18836) 2023-08-29 15:58:05 -04:00
Alex Soto e336e11ede
Merge branch 'net8.0-xcode15' into bump-net8.0-in-net8.0-xcode15-2023-08-29 2023-08-29 08:06:37 -04:00
Alex Soto d4b6403196
[xcode15] Bump to Xcode 15 beta 7 (#18855) 2023-08-29 08:02:42 -04:00
Rolf Bjarne Kvinge 6df0d4ae6c
Bump MSBuild.StructuredLogger to latest release. (#18701) 2023-08-29 13:26:42 +02:00
Rolf Bjarne Kvinge ef408d24a9 [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-29 11:53:41 +02:00
Rolf Bjarne Kvinge 78b649c4e1 [net8.0] Merge main into net8.0. 2023-08-29 11:24:40 +02:00
Rolf Bjarne Kvinge 45225dc88d
[dotnet] Parameterize the pack names. (#18732)
We're going to change the pack names to support multi-targeting, so ahead
of the pack name change I'm changing the existing logic to use a variable
for the pack name in most places (this will make the rename much easier and
simpler).

These changes should have no effect by themselves.
2023-08-29 10:06:46 +02:00
Rolf Bjarne Kvinge 46214aee78
[net8.0-xcode15] Merge net8.0 into net8.0-xcode15. (#18798) 2023-08-29 08:23:35 +02:00
Rolf Bjarne Kvinge 0dfadd0c01
[tests] Try to make CoreServices.FSEventStreamTest behave better. (#18844)
Try to make CoreServices.FSEventStreamTest better by using shorter duration locks,
and re-checking success condition after timing out in case there’s a race condition.

Also improve exception reporting/logging a bit.

Ref: https://github.com/xamarin/maccore/issues/2630
2023-08-29 07:29:12 +02:00
Manuel de la Pena 642889a11b
[Cinematic] Add support for Xcode 15 beta 6. (#18686)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-08-28 14:59:22 -04:00
Rolf Bjarne Kvinge 645ce96798 [net8.0] Merge main into net8.0. 2023-08-28 18:16:00 +02:00
dustin-wojciechowski 1b016fa072
[MacCatalyst] Added Default Entitlements for MacCatalyst projects (#18669)
Added default entitlements for MacCatalyst templates.
For Debug, the com.apple.security.get-task-allow entitlement that allows for using developer tools when developing MAUI Blazor apps.
For release, com.apple.security.app-sandbox is required to publish MacCatalyst apps to the Mac App Store.

Also added unit test to check for entitlements when project is created.

Fixes #18344

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-08-28 09:14:25 -07:00
Manuel de la Pena 6e4ca1a3c1
[CloudKit] Add support for Xcode 15 beta 6. (#18786)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
2023-08-28 11:08:55 -04:00
Rolf Bjarne Kvinge d9405ff27c
[tests] Misc changes to make tests work/pass when .NET isn't enabled. (#18828) 2023-08-28 16:15:28 +02:00
Rolf Bjarne Kvinge e111b8701b
[tests] Add support for specifying whether build properties should be specified on the command line or in a file. (#18814)
Some time ago we added a workaround for an msbuild bug that has since
been fixed (since the initial .NET 7 release). This workaround involved
writing build properties to a file instead of passing them on the
command line.

We no longer need the workaround, but it turnes out we still need to be
able to pass build properties in a file (because we have a test that
needs this behavior). We'll also soon run into a scenario where we need
to be able to specify a build property on the command line
(`TargetFrameworks`) - the build won't work if specified in a file.

So add support for both, and make the test that needs to specify the
build property on the command line say so explicitly.
2023-08-28 14:43:35 +02:00
Rolf Bjarne Kvinge 7d5e1a4e7e [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-23 17:35:17 +02:00
Haritha Mohan a772b4df10
[PencilKit] Add support for Xcode 15 beta 6 (#18769)
---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-08-23 11:26:33 -04:00
Haritha Mohan 272b753354
[SceneKit] Add support for Xcode 15 beta 6 (#18778)
Notes:
- Beta 6 changes are targeting only visionOS
- Adding an [Abstract] to an existing protocol is a breaking change so
added a conditional XAMCORE and added xtro error to .ignore

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-23 11:24:16 -04:00
Manuel de la Pena f99645bdbc
[BackgroundAssets] Add support for Xcode 15 beta 6. (#18788)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-23 11:01:55 -04:00
Rolf Bjarne Kvinge 640ff3fa71 [net8.0] Merge main into net8.0. 2023-08-22 15:22:11 +02:00
Rolf Bjarne Kvinge 2091e09592
[net8.0] Merge main into net8.0 (#18770) 2023-08-22 15:19:06 +02:00
Rolf Bjarne Kvinge 61493dd438
[msbuild] Store the command line to sign in the stamp file. Fixes #16124. (#18750)
When figuring out whether something needs to be (re)signed or not, we must
also take into account that the signing identity may have changed (for
instance a release build will often have a different signing identity than a
debug build).

Do this by storing the command line to sign for each item we need to sign in
the stamp file, and if the stored contents don't match the new command line
to sign, then we must resign the item.

This is rather obnoxious to write unit tests for (since we'd need to have two
different signing identities available on the bots), so I've only done local
testing.

Fixes https://github.com/xamarin/xamarin-macios/issues/16124.
2023-08-22 12:34:16 +02:00
Rolf Bjarne Kvinge 9937f17f99
[tests] Disable build parallelism when setting IntermediateOutputPath as a property for the build. (#18731)
* A property set on the command line is set for all projects that are built,
  including projects referenced by the main project.
* If the main project references more than one project, those referenced
  projects may be built in parallel.
* This means multiple projects might have the same IntermediateOutputPath if
  set on the command line, and thus accessing files in the directory
  simultaneously, which is a bad idea.

Fix this by manually disabling build parallelism in tests that set
IntermediateOutputPath.

Fixes https://github.com/xamarin/maccore/issues/2567.
2023-08-18 16:50:20 +02:00
Rolf Bjarne Kvinge a03fbb70f9
Run the generator tests on Windows. (#18513)
We'll soon change the generator to execute locally on Windows, even for
remote builds. As a stepping stone towards that goal, this PR adds the
generator tests to the list of tests we run on Windows.
2023-08-18 16:04:59 +02:00
dotnet-maestro[bot] 0c18a67eb7
[net8.0] Update dependencies from dotnet/installer (#18607)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 8.0.0-rc.1.23376.5 to 8.0.0-rc.1.23414.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-rc.1.23376.5 to 8.0.0-rc.1.23414.10 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-rc.1.23376.5 to 8.0.0-rc.1.23414.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: from 8.0.0-rc.1.23368.3 to 8.0.0-rc.1.23411.2 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-rc.1.23376.5 to 8.0.0-rc.1.23414.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.DotNet.Cecil**: from 0.11.4-alpha.23360.2 to 0.11.4-alpha.23407.2 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/installer

- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230815.5
- **Date Produced**: August 15, 2023 10:04:58 AM UTC
- **Commit**: e5bfaee3514192f2a496f8b0bdd00208ac15458d
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-rc.1.23378.5 to 8.0.100-rc.1.23415.5][76]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-rc.1.23376.5 to 8.0.0-rc.1.23414.4][77]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-rc.1.23376.5 to 8.0.0-rc.1.23414.10][78]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-rc.1.23376.5 to 8.0.0-rc.1.23414.4][77]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: [from 8.0.0-rc.1.23368.3 to 8.0.0-rc.1.23411.2][79]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-rc.1.23376.5 to 8.0.0-rc.1.23414.4][77]
  - **Microsoft.DotNet.Cecil**: [from 0.11.4-alpha.23360.2 to 0.11.4-alpha.23407.2][80]

[76]: eee48b8da5...e5bfaee351
[77]: ea97babd7c...e897946596
[78]: 40dc1466a4...10bc40cf7b
[79]: 1f68fcee45...abfa03c97f
[80]: 1a6a83a8f5...2f4ef29793
2023-08-16 13:45:21 +02:00
Rolf Bjarne Kvinge 8bb54d360f [net8.0-xcode15] Merge net8.0 into net8.0-xcode15. 2023-08-16 11:21:06 +02:00
Rolf Bjarne Kvinge c8ae3dc072 [net8.0] Merge main into net8.0. 2023-08-16 11:19:56 +02:00
Filip Navara b4975e2493
Fix non-NativeAOT builds with PublishAot=true in the project file (#18727)
The gist is:
- If you enable `<PublishAot>true</PublishAot>` then the NativeAOT build targets get included.
- Unless `NativeCompilationDuringPublish` is disabled, the NativeAOT targets are chained through `BeforeTargets` attribute to some publish targets (computing the resolved publish paths). Xamarin runs those publish targets even for non-publish builds, so it brings the whole ILC compilation along. That's undesirable.
- The `RunILLink` property is set unconditionally by the NativeAOT build integration. If we don't fix it then ILLink never runs, and neither do all the custom steps to generate registrars and `main()`.

Update: Apparently, we still need to fix runtime pack resolution for iOS-like platforms with `PublishAotUsingRuntimePack=true`.

---------

Co-authored-by: Filip Navara <navara@emclient.com>
2023-08-16 11:04:33 +02:00
Rolf Bjarne Kvinge 47b5601ffc
[tests/xharness] Add support for setting test configuration using environment variables. (#18738)
Setting test configuration variables using the environment is useful
when running tests on a Windows machine (easier than having to deal with
make).

Also refactor the code a bit to not use constants, and more consistent
naming.
2023-08-16 10:34:02 +02:00
Rolf Bjarne Kvinge d6c79bffb3
[tests] Add missing check for available runtime identifiers in a few tests. (#18739) 2023-08-16 10:29:42 +02:00
Manuel de la Pena d5d14f6cd8
[Symbols] Add support for the new Xcode 15 Symbols framework. (#18642)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-15 11:53:48 -04:00
Rolf Bjarne Kvinge b7a7b4d1d2 Merge remote-tracking branch 'origin/net8.0' into bump-main-in-net8.0-2023-08-14 2023-08-15 08:27:14 +02:00
Rolf Bjarne Kvinge f8b7b5326c
[dotnet] Enable the reflection-based json serializer by default. Fixes #18057. (#18710)
Fixes https://github.com/xamarin/xamarin-macios/issues/18057.
2023-08-15 08:19:50 +02:00
Rolf Bjarne Kvinge 167d765dc8 [tests] Limit JsonSerializer tests to .NET. 2023-08-14 16:52:41 +02:00
GitHub Actions Autoformatter 2ea82619d0 Auto-format source code 2023-08-14 13:43:00 +00:00
Rolf Bjarne Kvinge ac90c511d1 [net8.0] Merge main into net8.0. 2023-08-14 15:36:54 +02:00
Rolf Bjarne Kvinge cb1ffa0da7
[monotouch-test] Fix BlocksTest to work on maccatalyst-arm64. (#18708)
We use the AOT compiler on ARM64 on Mac Catalyst, so these tests have to
be excluded on Mac Catalyst.
2023-08-14 12:05:03 +02:00
Rolf Bjarne Kvinge 7d24e6dc23
[tests] Fix computing the correct default runtime identifier for Mac Catalyst. (#18709) 2023-08-14 11:58:59 +02:00
Rolf Bjarne Kvinge 72a7f88b94
[tests] Improve assertion when a .NET test fails executing 'dotnet'. (#18700)
Improve assertion when a .NET test fails executing 'dotnet' by including
more information (any errors in particular) in the assert message.
2023-08-14 11:57:21 +02:00
Alex Soto ed6affbb50
[xcode15] Bump Xcode 15 to Beta 6 (#18668) 2023-08-12 07:10:00 -04:00
Rolf Bjarne Kvinge 2a04d3ca48
[net8.0-xcode15] Merge net8.0 into net8.0-xcode15. (#18660) 2023-08-11 18:45:57 +02:00
Manuel de la Pena a6310deb13
[Contacts] Add support for Xcode 15 beta 5. (#18697) 2023-08-11 12:06:50 -04:00
Rolf Bjarne Kvinge 24895406b2
[dotnet] Link Mono and Xamarin statically in Mac Catalyst by default. Fixes #14686. (#18619)
It's possible to create a provisioning profile for Mac Catalyst that
doesn't allow dylibs in the app. It seems a significant number of people run
into this problem when publishing their apps, so avoid it by linking Mono and
Xamarin statically by default instead.

The downside is that build time might increase a little bit.

An upside however is that the app size might decrease somewhat.

Fixes https://github.com/xamarin/xamarin-macios/issues/14686.
2023-08-11 15:08:27 +02:00
Manuel de la Pena 7108250097
[CarPlay] Add support for Xcode 15 beta5. (#18681)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-10 12:18:58 -04:00
Rolf Bjarne Kvinge 004a0aef79 Merge remote-tracking branch 'origin/net8.0' into bump-net8.0-in-net8.0-xcode15-2023-08-08 2023-08-10 16:36:57 +02:00
Manuel de la Pena fa1f0677ae
[Accessibility] Add support for xcode 15 beta 4. (#18643)
Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-10 09:26:33 -04:00
Rolf Bjarne Kvinge 8732e1cedd
[xharness] Stop hardcoding the target framework in xharness. (#18682) 2023-08-10 13:14:34 +02:00
Rolf Bjarne Kvinge a64104cf76
[tests] Filter out any warnings about out-of-support workloads. (#18679)
Our test projects may be using an earlier version of .NET (in particular
Touch.Unit and MonoTouch.Dialog often are), so ignore any warnings about
out-of-support workloads.

Fixes test failures like:

    Xamarin.Tests.BundleStructureTest.Build(MacCatalyst,"maccatalyst-x64;maccatalyst-arm64",All,"Debug"): Warnings

        Expected is <System.Collections.Generic.List`1[System.String]> with 22 elements, actual is <System.String[28]>
        Values differ at index [22]
        Extra: < "The workload 'maccatalyst' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy.", "The workload 'maccatalyst' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy.", "The workload 'maccatalyst' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy."... >
2023-08-10 10:28:34 +02:00
Rolf Bjarne Kvinge 2eddcf8eea
[tests] Parse configure.inc for build settings as well. (#18674)
Additionally parse files in reverse order, because any variables at the
end should take precedence (when parsing config files the first time
variable is found is the one we use).
2023-08-10 07:55:50 +02:00
Manuel de la Pena 4d809a4b62 [BackgroundTask] Add support for Xcode 15. 2023-08-08 17:36:15 -04:00
Rolf Bjarne Kvinge bf60e7b1a3 Merge remote-tracking branch 'origin/net8.0-xcode15' into bump-net8.0-in-net8.0-xcode15-2023-08-08 2023-08-08 17:34:01 +02:00
Rolf Bjarne Kvinge a3e2d48335 [net8.0] Merge main into net8.0. 2023-08-08 16:06:04 +02:00
Manuel de la Pena 716e8baf63
[Generator] Ensure that selectors fields do not have overlapping names. Fixes #18645 (#18646) 2023-08-08 09:25:21 -04:00
Manuel de la Pena feb500bdcc Address reviews. Add issue and remove duplicated param. 2023-08-07 17:47:53 -04:00
GitHub Actions Autoformatter d1106a27e6 Auto-format source code 2023-08-07 21:20:54 +00:00
Manuel de la Pena 93ea6f905e [Tests] Ignore test until net7 is released with a fix. 2023-08-07 16:27:18 -04:00
Rolf Bjarne Kvinge 58b5d14d8c [net8.0] Merge main into net8.0. 2023-08-07 20:21:34 +02:00
Rolf Bjarne Kvinge b17626ff1c
[msbuild] Re-aot referencing assemblies. Fixes #17708. (#18509)
If an assembly changes, then we must AOT compile that assembly again (which we already
did), in addition to any assembly that references the modified assembly (which we
didn't do).

So rework the AOTCompile target: remove the Inputs and Outputs (because the dependency
tracking is too complicated for MSBuild to resolve), and instead move the logic to
detect if an assembly must be AOT-compiled again into the AOTCompile task.

Note that this PR has a custom port to .NET 8: #18518.

Fixes https://github.com/xamarin/xamarin-macios/issues/17708.

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-07 20:19:30 +02:00
Rolf Bjarne Kvinge 64077229cb
[net8.0] [msbuild] Re-aot referencing assemblies. Fixes #17708. (#18518)
If an assembly changes, then we must AOT compile that assembly again (which we already
did), in addition to any assembly that references the modified assembly (which we
didn't do).

So rework the AOTCompile target: remove the Inputs and Outputs (because the dependency
tracking is too complicated for MSBuild to resolve), and instead move the logic to
detect if an assembly must be AOT-compiled again into the AOTCompile task.

This is a port of the [original fix for main][1] to .NET 8, where we have to
take the dedup assembly into account too: if any assembly has changed, then we
must re-aot the dedup assembly as well.

Fixes https://github.com/xamarin/xamarin-macios/issues/17708.

[1]: https://github.com/xamarin/xamarin-macios/pull/18509

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-07 20:19:08 +02:00
Rolf Bjarne Kvinge a33c80d6c7
[net8.0] Change the default RuntimeIdentifier. (#18495)
* When publishing a mobile app, choose a device architecture (as opposed
  to showing an error if none was specified by the developer)
* When building for the simulator, choose the arm64 runtime identifier
  if we're running on an arm64 machine.
* When building a Debug build for desktop, choose the arm64 runtime
  identifier if we're running on an arm64 machine.

Fixes https://github.com/xamarin/xamarin-macios/issues/18455.
Fixes https://github.com/xamarin/xamarin-macios/issues/16152.
Fixes https://github.com/xamarin/xamarin-macios/issues/17841.

Section in the release notes: https://github.com/xamarin/xamarin-macios/wiki/.NET-8-release-notes#default-runtimeidentifiers

---------

Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-08-07 17:51:37 +02:00
Rolf Bjarne Kvinge 1e7e084fd1
[tests] If listing included platforms for .NET, don't include anything if .NET isn't enabled. (#18637) 2023-08-07 15:39:42 +02:00
Manuel de la Pena c22d3907a4 [Foundation] CountryCode was deprecated and does not longer return a valid value. 2023-08-05 15:21:53 -04:00
Manuel de la Pena 59740078d6 [Monotouch] Fix issues with the Locale tests. 2023-08-04 11:49:45 -04:00
Manuel de la Pena b20766d89b Bump xharness. 2023-08-04 11:49:45 -04:00
Rolf Bjarne Kvinge 8ee6ec84c5 [mmp/tests] Set Xcode location for the aot tests. 2023-08-04 11:49:45 -04:00
Manuel de la Pena b44ac6f8df [Introspection] Fix intro skip when the properties are internal.
The issue relies in the fact that this code path was not executed when
using classic because in the classic version of the SDK we added the
availavility attrs both in the property, the getters and the setters.
With dotnet, we only add the attr in the property.

The code uses the GetProperty method which does not return
internal/private properties which means that some of those properties
are not correctly skipped when on dotnet. This was discovered while
working on xcode 15.
2023-08-04 11:49:45 -04:00
Manuel de la Pena 157efadc78 [xharness] Fix compilation. 2023-08-04 11:49:45 -04:00
Manuel de la Pena dbec6f1f38 Bump xharness. 2023-08-04 11:49:45 -04:00
GitHub Actions Autoformatter 2614590141 Auto-format source code 2023-08-04 11:49:45 -04:00
Manuel de la Pena 1d4999f11e [Tests] Use the correct nuget version on CI
Similar to PR https://github.com/xamarin/xamarin-macios/pull/18600
we need to use the same verison as the one found in the workload file in
CI and not that one from the make.config.
2023-08-04 11:49:45 -04:00
GitHub Actions Autoformatter a11a5db97d Auto-format source code 2023-08-04 11:49:45 -04:00
Manuel de la Pena 6e7e6ddbc5 [Tests] Fix intro for xcode15 and older sim. 2023-08-04 11:49:45 -04:00
Manuel de la Pena fa92ed467e [CI] Fix how we canculate the mlaunch path. 2023-08-04 11:49:42 -04:00
Manuel de la Pena 05b4ef69fb [Tests] In the dotnet tests, if using vb force the lang to latest instead of the 'preview' used by the sdk. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 101c6ef462 [Tests] Ensure cecil tests know about the new attr type. 2023-08-04 11:47:29 -04:00
GitHub Actions Autoformatter a845018772 Auto-format source code 2023-08-04 11:47:29 -04:00
Manuel de la Pena 6ccb016623 [Foundation] Fix NSCalendar and tests for Xcode 15. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 508ecf8626 [Tests] Fix LocaleTests for Xcode 15. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 814d84cf63 [Tests] Fix healthkit tests for xcode 15. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 8552ba32b6 [Tests] Fix NSUrl tests for xcode 15. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 32e14dfe07 [Test] Fix test for xcode 15 after apple changed back the behaviour. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 69b58cdf9a [Tests] Ignore the addressbook tests on Xcode 15, it has been finally fully deprecated. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 687978c2bd [Tests] Ignore test that blocks in xcode 15. 2023-08-04 11:47:29 -04:00
Alex Soto 7e4507bae4 Bump Xharness to dotnet/xharness@915e9ec 2023-08-04 11:47:29 -04:00
Manuel de la Pena 1370e842a4 [Dotnet] Fix tests that have ios/tvos hardcoded. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 558e45f9b8 [Linker] Fix regression tests for xcode 15. 2023-08-04 11:47:29 -04:00
Manuel de la Pena 44b2342e9e [WatchOS] Fix tests and code to adapt to the fact that armv7k is not longer supported. 2023-08-04 11:47:29 -04:00
Alex Soto 576cebc081 [Introspection] Fix failing tests. 2023-08-04 11:47:29 -04:00
Manuel de la Pena b0e4466190 [Mtouch] Remove tests for removed arch. 2023-08-04 11:47:29 -04:00
Manuel de la Pena b8b56bff76 [Introspection] Fix a number of failing tests. 2023-08-04 11:47:28 -04:00
Alex Soto 9c9a2beb72 [Xtro] Update ginore/todo files for Xcode 15. 2023-08-04 11:47:28 -04:00
Alex Soto 77744b0374 [introspection] Fix tests 2023-08-04 11:47:27 -04:00
Alex Soto 3cb99867d7 Bump to beta 3 2023-08-04 11:47:27 -04:00
Rolf Bjarne Kvinge 3beafbb9bb [build] Add support for skipping 32-bit watchOS device architectures by bumping the min watchOS version. 2023-08-04 11:47:27 -04:00
Rolf Bjarne Kvinge 729c403704 [net8.0] Merge main into net8.0. 2023-08-04 14:28:12 +02:00
Manuel de la Pena e4ed7e18bf
[Introspection] Fix intro skip when the properties are internal. (#18613) 2023-08-02 07:46:45 -04:00
Alexander Köplinger bfb8665d19
Convert XHarness.Tests from packages.config to PackageReference and add darc dependency (#18611)
Also needed a few tweaks to fix build errors that were introduced
recently.

---------

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-08-02 13:39:33 +02:00
Manuel de la Pena c4c95b368b
[Tests] Use the correct nuget version on CI (#18610)
Similar to PR https://github.com/xamarin/xamarin-macios/pull/18600 we
need to use the same verison as the one found in the workload file in CI
and not that one from the make.config.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-08-01 23:51:19 -04:00
Rolf Bjarne Kvinge 34667ebce6 [net8.0] Merge main into net8.0. 2023-08-01 17:10:44 +02:00
Manuel de la Pena 78f8985ac5
Update tests/xharness/Harness.cs 2023-07-28 12:50:37 -04:00
Manuel de la Pena a4972fd1bd Merge branch 'fix-mlaunch-location' of github.com:mandel-macaque/xamarin-macios into fix-mlaunch-location 2023-07-28 12:48:45 -04:00
Manuel de la Pena cc78a45eb6 Fix ompilation. 2023-07-28 12:45:21 -04:00
Manuel de la Pena 3a02f2b721
Update tests/xharness/Harness.cs
Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
2023-07-28 11:32:18 -04:00
Manuel de la Pena 290206629a [Xharness] Fix path to mlaunch when using mlaunch from a .NET SDK pack on CI.
This commit fixes the code that was added in
https://github.com/xamarin/xamarin-macios/pull/16361.

The previous change uses the version number that is part of the config
file in the current build machine. That is correct when we are working
when we are running the tests in the same machine that built them. That
IS NOT THE CASE when building on CI.

Back when the CI did the separation to accommodate the EO we noticed
that if the workload is built in a diff machine, the versions were not
to be trusted, that is why the CI sets and enviroment variable to track
the version that was built in the original step. This change check if we
are on the CI, if we are we trust the version given by the previos
machine, else we use the config one.
2023-07-28 11:13:28 -04:00
dotnet-maestro[bot] 65ea7de123
[net8.0] Update dependencies from dotnet/installer (#18548)
This pull request updates the following dependencies

[marker]: <> (Begin:Coherency Updates)
## Coherency Updates

The following updates ensure that dependencies with a
*CoherentParentDependency*
attribute were produced in a build used as input to the parent
dependency's build.
See [Dependency Description
Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

[DependencyUpdate]: <> (Begin)

- **Coherency Updates**:
- **Microsoft.NET.ILLink.Tasks**: from 8.0.0-preview.7.23359.1 to
8.0.0-rc.1.23374.9 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.AspNetCore.App.Ref**: from 8.0.0-preview.7.23359.2 to
8.0.0-rc.1.23374.14 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.7.23359.1 to
8.0.0-rc.1.23374.9 (parent: Microsoft.Dotnet.Sdk.Internal)
-
**Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**:
from 8.0.0-preview.7.23326.1 to 8.0.0-rc.1.23368.3 (parent:
Microsoft.NETCore.App.Ref)
- **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.7.23359.1 to
8.0.0-rc.1.23374.9 (parent: Microsoft.Dotnet.Sdk.Internal)
- **Microsoft.DotNet.Cecil**: from 0.11.4-alpha.23327.1 to
0.11.4-alpha.23360.2 (parent: Microsoft.NETCore.App.Ref)

[DependencyUpdate]: <> (End)

[marker]: <> (End:Coherency Updates)














[marker]: <> (Begin:f9b68d84-9c90-4bd0-5499-08db4112d57e)
## From https://github.com/dotnet/installer
- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230725.3
- **Date Produced**: July 25, 2023 10:39:06 AM UTC
- **Commit**: e1872958afdb2b42b48f213efc8a6cd509816f0c
- **Branch**: refs/heads/main

[DependencyUpdate]: <> (Begin)

- **Updates**:
- **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-preview.7.23360.1 to
8.0.100-rc.1.23375.3][60]
- **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-preview.7.23359.1 to
8.0.0-rc.1.23374.9][61]
- **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-preview.7.23359.2 to
8.0.0-rc.1.23374.14][62]
- **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.7.23359.1 to
8.0.0-rc.1.23374.9][61]
-
**Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**:
[from 8.0.0-preview.7.23326.1 to 8.0.0-rc.1.23368.3][63]
- **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.7.23359.1 to
8.0.0-rc.1.23374.9][61]
- **Microsoft.DotNet.Cecil**: [from 0.11.4-alpha.23327.1 to
0.11.4-alpha.23360.2][64]

[60]:
62ef57f114...e1872958af
[61]: 31106939ba...119667b5ef
[62]:
be566b1f4e...1bda10b33b
[63]: 60a73f97a0...1f68fcee45
[64]: 3e46711f5a...1a6a83a8f5

[DependencyUpdate]: <> (End)


[marker]: <> (End:f9b68d84-9c90-4bd0-5499-08db4112d57e)

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Alex Soto <alex@soto.dev>
Co-authored-by: Filip Navara <navara@emclient.com>
2023-07-26 05:01:39 -04:00
Alex Soto 928048d681 Merge remote-tracking branch 'xamarin/main' into net8.0-merge-main 2023-07-22 21:44:02 -04:00
JonnHard d1d3dcdf68
Add getFileProviderConnectionWithCompletionHandler signature to start… (#18533)
… supporting XPC on File Provider instance

File Provider Service can act as an standalone XPC that you can
establish the connection with.
To open up the capability this new signature has to be exposed

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-07-20 10:39:08 -04:00
Rolf Bjarne Kvinge e2c673972b [net8.0] Merge main into net8.0. 2023-06-29 17:05:54 +02:00
Rolf Bjarne Kvinge 64b4a5909a
[tests] Automatic network failure detection in tests. (#18439)
Detect if a url we use in our tests actually works, and if not, save the
results and ignore any subsequent test that tries to use that url.

---------

Co-authored-by: Haritha Mohan <harithamohan@microsoft.com>
2023-06-29 07:48:53 +02:00
Meri Khamoyan 3f6d43c756
[iOS] HybridGlobalization set flag in SDK (#18498)
Add HybridGlobalization flag in SDK and load icudt_hybrid.dat file when
HybridGlobalization is on.

Contributes to https://github.com/dotnet/runtime/issues/80689
2023-06-28 10:25:24 +02:00
Rolf Bjarne Kvinge 7f910487f5
[msbuild/dotnet] Handle dylibs that don't start with 'lib' better. Fixes #15044. (#18496)
For a given dylib named '/path/to/libMyLibrary.dylib', we pass this to the native linker:

    -L/path/to -lMyLibrary

however, that doesn't work unless the dylib's name starts with 'lib'.

So detect this, and if the dylib doesn't start with 'lib' (say it's just
'MyLibrary.dylib'), then just pass the path to the dylib as-is to the native
linker:

	/path/to/MyLibrary.dylib

Fixes https://github.com/xamarin/xamarin-macios/issues/15044.
2023-06-27 07:55:04 +02:00
Rolf Bjarne Kvinge 15b7907eab [net8.0] Merge main into net8.0. 2023-06-23 17:03:50 +02:00
Rolf Bjarne Kvinge 94cdec2f53 [xharness] Disable NativeAOT test variations for Mac Catalyst for now, we need a few upstream fixes. 2023-06-22 08:44:47 +02:00
Rolf Bjarne Kvinge e31b0a6dc4 [xharness] Disable NativeAOT test variations for macOS for now, we're waiting for a dotnet/runtime fix. 2023-06-22 08:44:47 +02:00
Rolf Bjarne Kvinge 8ac35baf44 [tests] Disable the NUnitLite and Touch.Unit references for the .NET 7 tests.
We had to bump NUnitLite and Touch.Unit's TargetFramework properties to
net8.0-* (otherwise projects using NativeAOT fails if these projects are
referenced), which means they can't be used from .NET 7 (aka our .NET 7
tests).

So just don't reference NUnitLite and Touch.Unit in this test.
2023-06-22 08:44:47 +02:00
Rolf Bjarne Kvinge c49888bee1 [tests] Adjust ConfigTest to cope with different behavior when using NativeAOT. 2023-06-22 08:44:47 +02:00
Rolf Bjarne Kvinge 7d65804e32 [dotnet/tests] Only use NativeAOT when publishing.
This matches how NativeAOT works for other platforms.
2023-06-22 08:44:47 +02:00
Rolf Bjarne Kvinge 0adbf77643 [tests] Fix computing when the dynamic registrar is used. 2023-06-22 08:44:47 +02:00
Rolf Bjarne Kvinge 890d3cadf6 [tests] Adjust asserts since some collection assert doesn't work with NativeAOT.
Rewrite a few asserts, since NUnitLite isn't actually trimmer-safe, and some collection
asserts don't work with NativeAOT.
2023-06-21 20:49:53 +02:00
Rolf Bjarne Kvinge 5b8d60bbe3 [tests] Adjust RegistrarTest to always expected the dynamic registrar to be removed for NativeAOT 2023-06-21 20:49:53 +02:00
Rolf Bjarne Kvinge 31052141e7 [tests] Detect NativeAOT correctly in the Symbols test 2023-06-21 20:49:52 +02:00
Rolf Bjarne Kvinge 7f15d8625e [xharness] Add a NativeAOT variation of monotouch-test. 2023-06-21 20:49:50 +02:00
EmilienDup 7cea2a8c3a
NSUrlSessionHandler should propagate network exceptions (#18459)
fixes #18458
2023-06-20 07:27:46 +02:00
Rolf Bjarne Kvinge a192eed02b [net8.0] Merge main into net8.0. 2023-06-19 23:23:04 +02:00
Rolf Bjarne Kvinge aab0ed1362
[AVFoundation] Fix a few issues with the AVAssetImageGenerator bindings. Partial fix for #18452. (#18460)
* The 'copyCGImageAtTime:actualTime:error:' selector is deprecated, so
replicate that.
* Bind the 'generateCGImageAsynchronouslyForTime:completionHandler:'
selector.

Fixes parts 1 and 2 of https://github.com/xamarin/xamarin-macios/issues/18452.
2023-06-19 19:16:29 +02:00
Rolf Bjarne Kvinge 959bb55d86
[tests] Fix formatting issues. (#18453) 2023-06-16 13:58:49 +02:00
Rolf Bjarne Kvinge 7df3eb1520
[dotnet] Add targets to compute mlaunch arguments for installing and launching mobile apps. Fixes #18359. (#18446)
Add public targets to compute the mlaunch command lines for installing
and launching mobile apps.

These new targets are:

* ComputeMlaunchInstallArguments
* ComputeMlaunchRunArguments

As part of this change, also create a few new public properties:

* MlaunchPath
* MlaunchRunArguments
* MlaunchInstallArguments
* MlaunchRunScript
* MlaunchInstallScript

If the *Script variables are set, the corresponding target will create a
script file with the path to mlaunch + the corresponding arguments.

Otherwise, it's also possible to get the arguments directly from the
build log.

Fixes https://github.com/xamarin/xamarin-macios/issues/18359.
2023-06-15 07:21:09 +02:00
dotnet-maestro[bot] ab01ac85ad
[net8.0] Update dependencies from dotnet/installer (#18385)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 8.0.0-preview.5.23272.14 to 8.0.0-preview.6.23307.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-preview.5.23273.2 to 8.0.0-preview.6.23307.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.5.23272.14 to 8.0.0-preview.6.23307.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: from 8.0.0-preview.5.23265.1 to 8.0.0-preview.6.23301.1 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.5.23272.14 to 8.0.0-preview.6.23307.4 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.DotNet.Cecil**: from 0.11.4-alpha.23265.2 to 0.11.4-alpha.23301.1 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/installer

- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230607.25
- **Date Produced**: June 8, 2023 2:41:52 AM UTC
- **Commit**: f98e016a226c7637e13fb75bd6dc4949df58f7da
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-preview.6.23279.5 to 8.0.100-preview.6.23307.25][35]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-preview.5.23272.14 to 8.0.0-preview.6.23307.4][36]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-preview.5.23273.2 to 8.0.0-preview.6.23307.4][37]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.5.23272.14 to 8.0.0-preview.6.23307.4][36]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: [from 8.0.0-preview.5.23265.1 to 8.0.0-preview.6.23301.1][38]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.5.23272.14 to 8.0.0-preview.6.23307.4][36]
  - **Microsoft.DotNet.Cecil**: [from 0.11.4-alpha.23265.2 to 0.11.4-alpha.23301.1][39]

[35]: 2de0392d49...f98e016a22
[36]: 8163d1643a...54dab738de
[37]: 39564d529f...8dea0b8d3b
[38]: 7a90ec9edc...63af043d58
[39]: f283c62293...ea84c8236c
2023-06-09 08:14:57 +02:00
Rolf Bjarne Kvinge 6f1c0ea534 [net8.0] Merge main into net8.0. 2023-06-08 13:32:48 +02:00
Rolf Bjarne Kvinge ea8a0c5fe7 Only print debug spew if the test fails. 2023-06-07 18:35:30 +02:00
Rolf Bjarne Kvinge 30fb5dfb42 Add some bot exclusions. 2023-06-07 15:10:34 +02:00
Rolf Bjarne Kvinge 9e2143032f
Use Enum.GetValues<T> instead of Enum.GetValues in numerous places for .NET. (#18382)
NativeAOT warns about Enum.GetValues and suggests using Enum.GetValues<T>
instead, so do just that.
2023-06-07 08:47:55 +02:00
Rolf Bjarne Kvinge 94a56f9a05 Add more debug code. 2023-06-07 08:04:47 +02:00
Haritha Mohan 4bbd7df8f5
[dotnet] Enable runtime identifiers to be overriden at build time (#18396)
Fixes #17707
The error target for when there is a conflict of interest in defining
both the runtime identifier and runtime identifiers is called during the
multi-rid builds, but not sure if the placement is the most ideal..

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
2023-06-06 13:49:29 -07:00
Rolf Bjarne Kvinge 7a1c7a82c9 Add debug code. 2023-06-06 21:54:12 +02:00
Rolf Bjarne Kvinge b59587a0cd
[tests] Rework TestRuntime.RunAsync. (#18391)
* Move all the RunAsync logic to the TestRuntime class, instead of having some
  in TestRuntime and some in AppDelegate.
* Create a unified Task-based implementation for all platforms, optionally showing
  a UI on the platforms where we can do that.
* Remove all the overloads that took a DateTime timeout, and instead only use a
  TimeSpan timeout. This simplified some of the code.
* The new Task-based implementation will capture any exceptions (and rethrow most
  of them) from the tasks we're waiting for, so no need to do that in each RunAsync
  caller. This simplifies the testing code a lot for some tests.
* Add a new TryRunAsync method that will return (instead of rethrowing) any exceptions.
  This simplifies some of the testing code (which verifies the correct exception,
  or ignores the test in case of some exceptions).
* The new Task-based implementation will bubble up any NUnit exceptions, which
  means that the tasks we're waiting for can call NUnit's Assert and the right thing
  happens (in particular Assert.Ignore will actually ignore the test).
2023-06-06 21:36:49 +02:00
Rolf Bjarne Kvinge 1ca3c6ad8a
[tests] Adjust a few tests to not write a temporary file into the user directory. (#18394)
Fixes:

    MonoTouchFixtures.Foundation.NSFileManagerTest
    	[FAIL] GetSkipBackupAttribute : System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/F9F5B72D-D452-49F9-93AC-5CBB1E60A81C/DoNotBackupMe-NSFileManager-14036' is denied.
      ----> System.IO.IOException : Operation not permitted
    		   at Interop.ThrowExceptionForIoErrno(ErrorInfo , String , Boolean )
    		   at Interop.CheckIo(Error , String , Boolean )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , OpenFlags , Int32 , Func`4 )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , UnixFileMode , Int64& , UnixFileMode& , Func`4 )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 , Func`4 )
    		   at System.IO.File.OpenHandle(String , FileMode , FileAccess , FileShare , FileOptions , Int64 )
    		   at System.IO.File.WriteToFile(String , FileMode , String , Encoding )
    		   at System.IO.File.WriteAllText(String , String , Encoding )
    		   at System.IO.File.WriteAllText(String , String )
    		   at MonoTouchFixtures.Foundation.NSFileManagerTest.GetSkipBackupAttribute() in xamarin-macios/tests/monotouch-test/Foundation/FileManagerTest.cs:line 98
    		   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
    		--IOException
    MonoTouchFixtures.Foundation.UrlTest
    	[FAIL] IsExcludedFromBackupKey : System.UnauthorizedAccessException : Access to the path '/private/var/mobile/Containers/Data/Application/F9F5B72D-D452-49F9-93AC-5CBB1E60A81C/DoNotBackupMe-NSUrl-14036' is denied.
      ----> System.IO.IOException : Operation not permitted
    		   at Interop.ThrowExceptionForIoErrno(ErrorInfo , String , Boolean )
    		   at Interop.CheckIo(Error , String , Boolean )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , OpenFlags , Int32 , Func`4 )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , UnixFileMode , Int64& , UnixFileMode& , Func`4 )
    		   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String , FileMode , FileAccess , FileShare , FileOptions , Int64 , Nullable`1 , Func`4 )
    		   at System.IO.File.OpenHandle(String , FileMode , FileAccess , FileShare , FileOptions , Int64 )
    		   at System.IO.File.WriteToFile(String , FileMode , String , Encoding )
    		   at System.IO.File.WriteAllText(String , String , Encoding )
    		   at System.IO.File.WriteAllText(String , String )
    		   at MonoTouchFixtures.Foundation.UrlTest.IsExcludedFromBackupKey() in xamarin-macios/tests/monotouch-test/Foundation/UrlTest.cs:line 54
    		   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
    		--IOException
2023-06-06 18:28:23 +02:00
Rolf Bjarne Kvinge 1a182ec08d [tests] Improve assert message for easier test failure diagnostics. 2023-06-06 18:24:48 +02:00
Rolf Bjarne Kvinge f47040e099 Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-06-05 2023-06-06 18:22:29 +02:00
Rolf Bjarne Kvinge 11e7883da0
[tests] System.Numerics.Vector3.Length is a method, not a property, so treat it as such. (#18401)
Fixes:

    MonoTouchFixtures.Phase.PhaseObjectTest
    	[FAIL] ForwardTest :   length
			Expected: 1
			But was:  <System.Func`1[System.Single]>
    	[FAIL] RigthTest :   length
			Expected: 1
			But was:  <System.Func`1[System.Single]>
    	[FAIL] UpTest :   length
			Expected: 1
			But was:  <System.Func`1[System.Single]>
2023-06-05 15:46:33 +02:00
Rolf Bjarne Kvinge e6e25497a0 [net8.0] Merge main into net8.0. 2023-06-05 10:54:13 +02:00
Rolf Bjarne Kvinge 8d3a1aff7e
[tests] Fix warnings in tests/bgen/bgen-tests.csproj and enforce no more nullability warnings. (#18400) 2023-06-05 10:42:33 +02:00
Rolf Bjarne Kvinge 481ce215c9
[tests] Update the Xcode version check for Xcode 13.3. (#18390)
Fixes:

    MonoTouchFixtures.AVFoundation.CaptureMetadataOutputTest
    	[PASS] Defaults
    	[PASS] Flags
    	[FAIL] MetadataObjectTypesTest : System.NotImplementedException : The method or operation is not implemented.
    		   at TestRuntime.CheckXcodeVersion(Int32 major, Int32 minor, Int32 build) in xamarin-macios/tests/common/TestRuntime.cs:line 483
    		   at MonoTouchFixtures.AVFoundation.CaptureMetadataOutputTest.MetadataObjectTypesTest() in xamarin-macios/tests/monotouch-test/AVFoundation/CaptureMetadataOutputTest.cs:line 131
    		   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
2023-06-05 10:27:32 +02:00
Rolf Bjarne Kvinge d33a5d812d
[tests] Use the NetworkResources class for urls instead of hardcoding them. (#18374) 2023-06-02 15:27:41 +02:00
Rolf Bjarne Kvinge a43b664584
[Foundation] Several fixes to NSFileManager. (#18371)
* Enable nullability.
* Add API that was previously iOS-specific to all platforms.
2023-06-02 15:19:42 +02:00
Rolf Bjarne Kvinge 7198886910
[tests] Give the CGImagePropertiesGPSTest some latitude with the coordinates. (#18375)
Seems like the actual values on device might be ever so slightly off.
2023-06-02 14:35:51 +02:00
Rolf Bjarne Kvinge 9e14229176
[tests] Adjust BundleTest to not use Assembly.Location, since it doesn't work in NativeAOT. (#18376) 2023-06-02 14:35:01 +02:00
Rolf Bjarne Kvinge fad26bcc3e
[tests] Adjust BundleTest to cope with a differently named app. (#18392)
It seems the actual app name might be "PublicStaging.app" on device now.

Fixes:

    MonoTouchFixtures.CoreFoundation.BundleTest
        [FAIL] TestExecutableUrl :
            Expected: String containing "monotouchtest.app/monotouchtest"
            But was:  "file:///private/var/containers/Bundle/Application/4B2AD441-C411-42D4-ACCB-4E964A905A17/PublicStaging.app/monotouchtest"
        [FAIL] TestResourcesDirectoryUrl :
            Expected: String containing "monotouchtest.app/"
            But was:  "file:///private/var/containers/Bundle/Application/4B2AD441-C411-42D4-ACCB-4E964A905A17/PublicStaging.app/"
        [FAIL] TestSupportFilesDirectoryUrl :
            Expected: String containing "monotouchtest.app/"
            But was:  "file:///private/var/containers/Bundle/Application/4B2AD441-C411-42D4-ACCB-4E964A905A17/PublicStaging.app/"
         [FAIL] TestUrl :
            Expected: String containing "monotouchtest.app/"
            But was:  "file:///private/var/containers/Bundle/Application/4B2AD441-C411-42D4-ACCB-4E964A905A17/PublicStaging.app/"
2023-06-02 14:32:05 +02:00
Rolf Bjarne Kvinge d98be15ea7
[tests] Fix typo in method name. (#18393) 2023-06-02 14:31:41 +02:00
Steve Hawley 91daf664c4
[dotnet] Add to optimizations (#18387)
add redirect-class-handles to test output along with options

---------

Co-authored-by: Alex Soto <alex@soto.dev>
2023-06-01 22:04:33 -04:00
Rolf Bjarne Kvinge b4f7daac08
[tests] Ignore the NWParametersTest.SetPrivacyContextText, it crashes everywhere. (#18383) 2023-06-01 12:03:56 +02:00
Rolf Bjarne Kvinge 92da968558 [net8.0] Merge main into net8.0. 2023-05-30 08:51:24 +02:00
Rolf Bjarne Kvinge 12be89c189
[CoreFoundation] Add a few missing APIs to CFRunLoop and enable nullability. (#18322) 2023-05-30 08:50:42 +02:00
Rolf Bjarne Kvinge d931a9f7ac Merge remote-tracking branch 'origin/main' into bump-main-in-net8.0-2023-05-26 2023-05-26 18:25:37 +02:00
Rolf Bjarne Kvinge 3dd412daa6
[tests] Adjust ImageCaptioningTest to clean up after itself and support concurrent execution. (#18329)
* This test creates a file in the temp directory, so make sure the file name
  is unique enough to not clash with any other test runs running concurrently.

Fixes this problem:

> SetCaption: System.IO.IOException : IO_SharingViolation_File, /var/folders/r7/kvhxkfw54qlc5y72d620783h0000gn/T/basn3p08.png


* Also delete the temporary file at the end of the test.

This PR is best viewed by ignoring whitespace, since it indents a big chunk of
code.
2023-05-25 10:50:08 +02:00
Rolf Bjarne Kvinge 52e538db6e
[tests] Detect another way to be unable to record audio in AVAudioSinkNodeTest and ignore the test in that case. (#18316) 2023-05-25 10:49:34 +02:00
Rolf Bjarne Kvinge 22e510c063 [net8.0] Merge main into net8.0. 2023-05-25 07:54:38 +02:00
Rolf Bjarne Kvinge 48f22eb1ed
Merge branch 'net8.0' into bump-main-in-net8.0-2023-05-19 2023-05-24 20:35:50 +02:00
dotnet-maestro[bot] ea4c29c438
[net8.0] Update dependencies from dotnet/installer (#18305)
This pull request updates the following dependencies

## Coherency Updates

The following updates ensure that dependencies with a *CoherentParentDependency*
attribute were produced in a build used as input to the parent dependency's build.
See [Dependency Description Format](https://github.com/dotnet/arcade/blob/master/Documentation/DependencyDescriptionFormat.md#dependency-description-overview)

- **Coherency Updates**:
  - **Microsoft.NET.ILLink.Tasks**: from 8.0.0-preview.5.23260.3 to 8.0.0-preview.5.23272.14 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.AspNetCore.App.Ref**: from 8.0.0-preview.5.23262.1 to 8.0.0-preview.5.23273.2 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.5.23260.3 to 8.0.0-preview.5.23272.14 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: from 8.0.0-preview.5.23252.1 to 8.0.0-preview.5.23265.1 (parent: Microsoft.NETCore.App.Ref)
  - **Microsoft.NETCore.App.Ref**: from 8.0.0-preview.5.23260.3 to 8.0.0-preview.5.23272.14 (parent: Microsoft.Dotnet.Sdk.Internal)
  - **Microsoft.DotNet.Cecil**: from 0.11.4-alpha.23252.1 to 0.11.4-alpha.23265.2 (parent: Microsoft.NETCore.App.Ref)

## From https://github.com/dotnet/installer
- **Subscription**: f9b68d84-9c90-4bd0-5499-08db4112d57e
- **Build**: 20230523.15
- **Date Produced**: May 24, 2023 12:03:24 AM UTC
- **Commit**: 4b48b408f9b777eddd4e87f6b9efab4b5b1723a6
- **Branch**: refs/heads/main

- **Updates**:
  - **Microsoft.Dotnet.Sdk.Internal**: [from 8.0.100-preview.5.23267.7 to 8.0.100-preview.5.23273.15][21]
  - **Microsoft.NET.ILLink.Tasks**: [from 8.0.0-preview.5.23260.3 to 8.0.0-preview.5.23272.14][22]
  - **Microsoft.AspNetCore.App.Ref**: [from 8.0.0-preview.5.23262.1 to 8.0.0-preview.5.23273.2][23]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.5.23260.3 to 8.0.0-preview.5.23272.14][22]
  - **Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport**: [from 8.0.0-preview.5.23252.1 to 8.0.0-preview.5.23265.1][24]
  - **Microsoft.NETCore.App.Ref**: [from 8.0.0-preview.5.23260.3 to 8.0.0-preview.5.23272.14][22]
  - **Microsoft.DotNet.Cecil**: [from 0.11.4-alpha.23252.1 to 0.11.4-alpha.23265.2][25]

[21]: dda516cbd7...4b48b408f9
[22]: 888bac3044...8163d1643a
[23]: 059939bda4...39564d529f
[24]: ab09b0b8d6...7a90ec9edc
[25]: c32f0be86d...f283c62293
2023-05-24 20:35:32 +02:00
Rolf Bjarne Kvinge 8cff397db0
[tests] Fix adding no files to package-test-libraries.zip. (#18307)
If only some platforms are enabled, some of the commands to find files to add
to package-test-libraries.zip won't find any files at all.

Asking 'zip' to add no files fails with:

    zip error: Nothing to do!

and there's no way to add 'zip' to ignore this error condition.

However, we can instead try to not call zip at all when we don't find any
files, and we do that by using:

    "find ... -exec zip"

instead of:

   "find .. | zip ..."
2023-05-24 17:04:57 +02:00
Rolf Bjarne Kvinge 5ad0df2dde
[tests] Adjust AXHearingUtilitiesTest to accept more values regarding hearing configuration. (#18313)
These values are returned on device.
2023-05-24 17:04:28 +02:00
Rolf Bjarne Kvinge 0a3ba93d38
[tests] Update CaptureMetadataOutputTest to work on older devices by adding an OS version check. (#18314) 2023-05-24 17:04:15 +02:00
Rolf Bjarne Kvinge ac6b1e0a1c
[monotouch-test] Ignore MTLArgumentEncoderTest on older devices. (#18315)
The test fails on iOS 12.4, and works on iOS 16.5, so for now ignore if <iOS 13.0.
2023-05-24 16:58:49 +02:00
Rolf Bjarne Kvinge ab73088c0b [net8.0] Merge main into net8.0. 2023-05-19 08:06:07 +02:00
Rolf Bjarne Kvinge a9c52baa28 [net8.0] Merge main into net8.0. 2023-05-18 17:26:48 +02:00
Rolf Bjarne Kvinge 65590ba8c0 Merge remote-tracking branch 'origin/main' into msr 2023-05-18 15:19:39 +02:00
Manuel de la Pena 87e3edcb5a
[Generator] Remove nullability warnings. (#18281)
Remove some warnings that started to happen "recently".


Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-05-17 10:21:59 -04:00
Rolf Bjarne Kvinge 50cc0bedbe [net8.0] Merge main into net8.0. 2023-05-17 08:28:14 +02:00
Rolf Bjarne Kvinge 43cb1e8dcb
Auto-format source code. (#18278)
The autoformatter was down for a litle while, and these issues crept in.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
2023-05-16 12:46:24 +02:00
Rolf Bjarne Kvinge cdac4507a2
[devops] Stop building test dependencies on each test run. (#18096)
Stop building the test dependencies on each test run, and instead use the archived test dependencies we have from the main build:

* Stop running 'make all' in tests/ on every separate test run.
* Add a lot more stuff in the package-test-libraries.zip archive.
* Extract all the new stuff on every test run. We add stuff from outside the tests/
  directory, so adjust archive creation and extraction to use the root directory
  of the repository as the root of the zip archive as well.
* Also add the introspection dependencies to the same archive to simplify the logic.
* Fix xharness to not store absolute paths in generated projects.
* Fix test project to not automatically run make in tests/test-libraries when running
  on the bots.

Building the test dependencies takes ~10 minutes for each test run, so this saves
about that time for each test run.
2023-05-15 18:41:49 +02:00
Rolf Bjarne Kvinge 065da5fcee [tests] Use Enum.HasFlag according to reviews. 2023-05-15 16:13:40 +02:00
Rolf Bjarne Kvinge 00de70eb8f
[ServiceManagement] Bind this framework. Fixes #18084. (#18263)
Fixes https://github.com/xamarin/xamarin-macios/issues/18084.
2023-05-12 15:40:36 +02:00
Rolf Bjarne Kvinge 8a4d868cbe
[monotouch-test] Adjust the CGEventTest to handle successful tap creation. (#18266)
My mac can tap just fine!
2023-05-12 10:16:30 +02:00
Rolf Bjarne Kvinge dd2252f365 Merge remote-tracking branch 'origin/main' into msr 2023-05-12 08:45:15 +02:00
Rolf Bjarne Kvinge 1cb598e624
[monotouch-test] Adjust ImageCaptioningTest.GetCaption to don't care if we get an error or not. (#18267)
This check is passing a remote url to an API that wants a url to a local file
(file:// url), and this is supposed to fail (it's not a network hiccup if it
fails).

However, sometimes it doesn't fail... for unknown reasons. So instead change
the test's expectations so that it passes whether using a remote url fails
with an error or not.
2023-05-12 07:41:17 +02:00
Rolf Bjarne Kvinge d06209a917
[Foundation] Bind two overloads to create NSUrl instances from file paths. (#18265) 2023-05-12 07:37:36 +02:00
Rolf Bjarne Kvinge 17b2d37227 [tests] Adjust to cope with slightly different errors reported when using the managed static registrar. 2023-05-11 13:10:31 +02:00
Rolf Bjarne Kvinge 4f5fa5e202 [monotouch-test] Use MidiThruConnectionEndpoint instead of MidiCIDeviceIdentification in exported methods.
MidiCIDeviceIdentification isn't blittable ((yet)[1]), so exporting it makes
the AOT compiler complain. Use a different (but blittable) type instead in the
test.

[1]: 03f0a35012
2023-05-11 13:10:31 +02:00
Rolf Bjarne Kvinge eb629644af [tests] Update to work with the managed static registrar 2023-05-11 13:10:31 +02:00