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

6345 Коммитов

Автор SHA1 Сообщение Дата
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 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 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 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
Rolf Bjarne Kvinge 1deba2cf61 [tests] Add a check for the managed static registrar 2023-05-11 13:10:31 +02:00
Rolf Bjarne Kvinge a2f5e16fad [tests] Improve the current registrar detection in the tests 2023-05-11 13:10:31 +02:00
Git History Editor b8ccbad871 [src] Add helper methods for the managed static registrar 2023-05-11 13:10:30 +02:00
Rolf Bjarne Kvinge cfb248ecac [tools] Add a ManagedStatic registrar mode.
This new mode is still considered a 'Static' registrar mode, it's just a variation of it.
2023-05-11 12:21:53 +02:00
Rolf Bjarne Kvinge 3ac9b8fc76 [xharness] Add new variations using the managed static registrar for monotouch-test. 2023-05-11 12:21:53 +02:00
Rolf Bjarne Kvinge 69eb2755b5
[tests] Ignore a network failure condition on bots in the LinkSdk.AsyncTests.Bug12221 test. (#18252) 2023-05-11 07:28:38 +02:00
Rolf Bjarne Kvinge 199b43e2d9
[monotouch-test] Ignore network failures in CI for SecProtocolMetadataTest.TlsDefaults. Fixes #xamarin/maccore@2040. (#18255)
Fixes https://github.com/xamarin/maccore/issues/2040.
2023-05-10 11:04:53 +02:00
Rolf Bjarne Kvinge f358715a38
[xharness] Use our own SetProperty to set properties instead of the SetTopLevelPropertyGroupValue extension method. (#18253)
This is because the SetTopLevelPropertyGroupValue method doesn't always
work as expected (it doesn't always set seomthing), while SetProperty does.

Fixing the SetTopLevelPropertyGroup method is somewhat complex, since it
lives in the dotnet/xharness repository, so instead use the SetProperty
method, which is our own (working) version.
2023-05-10 10:53:53 +02:00
Rolf Bjarne Kvinge 415086c4ce
[Foundation] Fix nullability issues in NSUserDefaults. Fixes #18243. (#18246)
Fixes https://github.com/xamarin/xamarin-macios/issues/18243.
2023-05-09 17:39:34 +02:00
Rolf Bjarne Kvinge da23c8e488
[tests] Install workloads on Windows without checking the signature of the packages. (#18210)
Hopefully fixes:

    MSBuild version 17.4.1+9a89d02ff for .NET
    D:\AzDO\_work\_tool\dotnet\sdk\7.0.102\MSBuild.dll --property:DisableImplicitNuGetFallbackFolder=true -bl:D:\AzDO\_work\2\s/xamarin-macios/tests/dotnet/Windows/install.binlog -consoleloggerparameters:Summary -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,D:\AzDO\_work\_tool\dotnet\sdk\7.0.102\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,D:\AzDO\_work\_tool\dotnet\sdk\7.0.102\dotnet.dll -maxcpucount -restore -verbosity:m -verbosity:quiet D:\AzDO\_work\2\s/xamarin-macios/tests/dotnet/Windows/InstallDotNet.csproj
    EXEC : error : NU3004: The package is not signed. [D:\AzDO\_work\2\s\xamarin-macios\tests\dotnet\Windows\InstallDotNet.csproj]
2023-05-08 11:03:18 +02:00
Rolf Bjarne Kvinge 36af029204
Change all null checking expressions to use 'is' and 'is not'. (#18176)
Change all null checking expressions to use 'is null' and 'is not null'
instead of '== null' and '!= null'.

This was mostly done with sed, so code can probably be improved in many
other ways with manual inspection, but that will come over time.

Also add code to the autoformat script to automatically fix these issues in the future.
2023-05-05 17:52:19 +02:00
Rolf Bjarne Kvinge 185a9a8c9a
[xharness] Add a release + all optimization test variation of monotouch-test for desktop. (#18140)
Add a 'release + all optimization' test variation of monotouch-test for
macOS and Mac Catalyst.
2023-05-05 11:24:26 +02:00
Rolf Bjarne Kvinge 17bcfbf4cb
[tests] Fix running dotnet with MSBUILD_EXE_PATH. (#18223)
'dotnet build' doesn't work when MSBUILD_EXE_PATH is set (which we do in
some places for legacy tests), so make sure to unset MSBUILD_EXE_PATH before running
'dotnet build'.
2023-05-05 11:16:54 +02:00
Rolf Bjarne Kvinge 70e33e4924
[xharness] Unify MtouchExtraArgs and MonoBundlingExtraArgs handling when creating test variations. (#18215)
Make the code that creates test variations set a single BundlingArguments
property, and then when we generate the corresponding test project we set both
MtouchExtraArgs and MonoBundlingExtraArgs. The property that doesn't apply to
the current platform will just be ignored.
2023-05-04 22:44:55 +02:00
Rolf Bjarne Kvinge 066ab68bc6
[xharness] Append to MtouchExtraArgs/MonoBundlingExtraArgs instead of just setting the value. (#18200)
When generating/cloning test projects and modifying
MtouchExtraArgs/MonoBundlingExtraArgs, we always want to add to any existing
properties instead of overwriting them, so do exactly that.

With this change we now find the latest top-level PropertyGroup in the project
file with no Condition, and add a MtouchExtraArgs/MonoBundlingArgs that adds
to any existing property.
2023-05-04 17:09:50 +02:00
Rolf Bjarne Kvinge d12c04689f
Enable nullability in various places (#18082)
I started fixing nullability in one place, and then it snowballed a bit
and I had to fix nullability in a lot of places.

Most are trivial, except for the `generate-frameworks-constants`
project: I had to create a .NET version of the project in order to
compile a .NET version of the tool.
2023-05-04 07:39:56 +02:00
Rolf Bjarne Kvinge 98cc2817ba
[xharness] Improve listing files in the repository. (#18183)
When cloning projects, we need to list all the files in the original project
directory and manually include some of them in the cloned project (because in
.NET some files from the project directory are included automatically, and if
we clone a project and put the cloned project in a different directory, those
files won't be picked up automatically by the build anymore).

The previous code to list the files in the project directory would run 'git
ls-files' for each project directory. This is rather slow, since it happens
quite a few times. Instead modify the logic to run 'git ls-files' once for the
entire tests/ directory, store the result, and then when we need to list files
in a particular project directory, just look in that stored list for the
applicable files.

This is much, much faster.
2023-05-03 14:21:50 +02:00
Rolf Bjarne Kvinge a4b5edd1d1
[xharness] Remove the MtouchExtraArgs parameters/properties/fields in numerous places. (#18182)
It's not being used for anything at all, it's only passing empty strings
around.
2023-05-03 14:10:11 +02:00
Rolf Bjarne Kvinge 6e7128b619
[msbuild/tests/dotnet] Add support for xcframeworks for Hot Restart and add tests. Fixes #16571. (#18103)
Rework Hot Restart builds to use as much as possible of the normal build
logic, because this is the easiest way to make sure the Hot Restart build is
as close as possible to normal builds (and we don't end up missing features).

This is done by executing selected parts of a normal build, and at the end we
have a new task that computes where each file goes in the various output
directories Hot Restart uses (HotRestartAppBundlePath, HotRestartContentDir,
HotRestartAppContentDir, etc.)

This PR also:

* Adds a test that runs on Windows and verifies that everything consumed in a
  build is placed in the correct location for a Hot Restart build (this is a
  variation of the BundleStructure test we already have).
* Removes tasks that aren't used anymore.
* Misc fixes to make sure existing code works on Windows.

---

This PR is best reviewed commit-by-commit.

Ref: https://github.com/xamarin/xamarin-macios/issues/13924

* Fixes https://github.com/xamarin/xamarin-macios/issues/16571
* Fixes https://github.com/xamarin/xamarin-macios/issues/16001
* Fixes https://github.com/xamarin/xamarin-macios/issues/10784
* Fixes https://github.com/xamarin/xamarin-macios/issues/17579
* Contributes towards https://github.com/xamarin/xamarin-macios/issues/13924.
2023-05-03 14:09:31 +02:00
Manuel de la Pena 9159d0d849
[CI] Fix the windows tests in the unified pipeline. (#18196)
Add the prefixes that were missing in the csproj using the env variable
set by the pipeline.
2023-05-02 14:42:38 -04:00
Rolf Bjarne Kvinge a182ad5a1f
[AVFoundation] Add missing AVCapture members. Fixes #18155. (#18156)
Fixes https://github.com/xamarin/xamarin-macios/issues/18155.
2023-04-28 10:48:03 +02:00
Rolf Bjarne Kvinge 35432b22b7
[tests] Package macOS tests even if only Mac Catalyst is enabled. (#18158)
We have tests to execute on macOS even if only Mac Catalyst is enabled,
so package those tests in that case as well.
2023-04-28 10:24:24 +02:00
Peter Collins abe065f639
[ci] Add parameter to disable classic signing (#18142)
A new parameter has been added to allow the unified pipeline to skip
classic signing jobs.

The jobs that would sign and notarize the custom workload .pkg and .zip
files have been removed, as we do not ship these anywhere and do not
need to wait on signing for them.  The `dotnet-signed` artifact has been
removed as a result, and the `not-signed-package` artifact is used in
its place.
2023-04-27 12:40:21 -04:00
Rolf Bjarne Kvinge bc272a9446
[tests] Find a workaround for #xamarin/maccore@2668. (#18159)
1. Mono changed dyld lookup to start looking in directories in
   NATIVE_DLL_SEARCH_DIRECTORIES before the actual given path, even when the
   given path is absolute [1].
2. This turned out to break Mac Catalyst, because when a DllImport says a
   P/Invoke is in "/System/Library/Frameworks/SceneKit.framework/SceneKit",
   Mono would try loading by prefixing the directories in
   NATIVE_DLL_SEARCH_DIRECTORIES. We add the Contents/MonoBundle directory to
   NATIVE_DLL_SEARCH_DIRECTORIES, so Mono would try to load
   "/path/to/my.app/Contents/MonoBundle//System/Library/Frameworks/SceneKit.framework/SceneKit",
   and things would go wrong.
3. We found a workaround: add "/" to NATIVE_DLL_SEARCH_DIRECTORIES. This works
   on Ventura, but apparently not on older macOS version, because the actual
   path we pass to dlopen ends up being "///System/Library/Frameworks/SceneKit.framework/SceneKit"
   (note the three initial slashes instead of a single slash).
4. Add a second workaround, where we add a dll import resolver to load exactly
   the path we want to load.

[1]: 5a1baebc09
[2]: https://github.com/dotnet/runtime/pull/85255

Technical sidenote:

Why trying to load "/path/to/my.app/Contents/MonoBundle//System/Library/Frameworks/SceneKit.framework/SceneKit"
turned out so bad on Mac Catalyst is not obvious. What happens is this:

* The app calls 'dlopen ("/path/to/my.app/Contents/MonoBundle//System/Library/Frameworks/SceneKit.framework/SceneKit")'
* dlopen checks if this is a Mac Catalyst override of a macOS system
  framework, by prefixing "/System/iOSSupport" and trying to load that. So
  dlopen would try to load "/System/iOSSupport/path/to/my.app/Contents/MonoBundle//System/Library/Frameworks/SceneKit.framework/SceneKit",
  which would obviously fail.
* Then dlopen would try a few more fallbacks, eventually trying
  "/System/Library/Frameworks/SceneKit.framework/SceneKit", and successfully
  loading that library.
* Unfortunately "/System/Library/Frameworks/SceneKit.framework/SceneKit" is
  the wrong library to load for Mac Catalyst ("/System/iOSSupport/System/Library/Frameworks/SceneKit.framework/SceneKit"
  is the correct version). These two libraries are incompatible, and calling
  one when you mean to call the other will do nasty things like corrupting the
  stack.
2023-04-27 18:17:33 +02:00
Rolf Bjarne Kvinge bdf25df990
[tests] Allow a little bit of leeway when testing floating point numbers in SKTransformNodeTest. (#18157)
Fixes this test failure:

    MonoTouchFixtures.SpriteKit.SKTransformNodeTest
        [FAIL] EulerAngles :   #x1
            Expected: -2.14159298f
            But was:  -2.14159274f
2023-04-27 17:55:49 +02:00
Rolf Bjarne Kvinge 59d8370d6f
[tests] Fix finding instructions that take methods in cecil-tests. (#18138)
The calli instruction calls a function pointer on the stack, not a specific
managed function, so don't include it when looking for calls to managed functions.
2023-04-26 15:25:07 +02:00
Rolf Bjarne Kvinge f05ecfaf7e
[tests] Make any ObjCRuntime.Messaging internal. (#18130)
This fixes ~1600 warnings like these:

     warning CS0436: The type 'Messaging' in 'xamarin-macios/tests/monotouch-test/ObjCRuntime/Messaging.cs' conflicts with the imported type 'Messaging' in 'bindings-test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065'
2023-04-26 15:23:00 +02:00
Rolf Bjarne Kvinge c9cb8ca5e3
[AppKit] Add a few missing NullAllowed attributes. Fixes #18115. (#18118)
Fixes https://github.com/xamarin/xamarin-macios/issues/18115.
2023-04-25 07:44:38 +02:00
Rolf Bjarne Kvinge d010844076
[introspection] Ignore the AddressBook namespace for Mac Catalyst when checking static cctors. (#18088)
Fixes these test failures (which only happen on the bots):

    [FAIL] AddressBook.InitConstants .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABGroupProperty .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABGroupProperty' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABGroupProperty..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonPropertyId .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonPropertyId' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonPropertyId..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonAddressKey .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonAddressKey' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonAddressKey..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonDateLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonDateLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonDateLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonKindId .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonKindId' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonKindId..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonPhoneLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonPhoneLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonPhoneLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonInstantMessageService .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonInstantMessageService' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonInstantMessageService..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonInstantMessageKey .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonInstantMessageKey' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonInstantMessageKey..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonUrlLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonUrlLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonUrlLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABPersonRelatedNamesLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABPersonRelatedNamesLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABPersonRelatedNamesLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABLabel .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABLabel' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABLabel..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
       at Introspection.ApiTypeTest.StaticCtor() in /Users/builder/azdo/_work/4/s/xamarin-macios/tests/introspection/ApiTypeTest.cs:line 51
    [FAIL] AddressBook.ABSourcePropertyId .cctor could not execute properly: System.TypeInitializationException: The type initializer for 'AddressBook.ABSourcePropertyId' threw an exception.
     ---> System.TypeInitializationException: The type initializer for 'AddressBook.InitConstants' threw an exception.
     ---> System.EntryPointNotFoundException: ABAddressBookCreate
       at AddressBook.InitConstants..cctor()
       --- End of inner exception stack trace ---
       at AddressBook.ABSourcePropertyId..cctor()
       --- End of inner exception stack trace ---
       at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(RuntimeTypeHandle type)
2023-04-21 18:48:22 +02:00
Rolf Bjarne Kvinge 8e6104c497 [tests] Add a HotRestart version of the BundleStructure test. 2023-04-20 18:21:17 +02:00
Rolf Bjarne Kvinge d6195febf1 [tests] Find the .NET executable using the DOTNET environment variable as well.
It's much easier to set an environment variable on Windows than it is to change the
test configuration, which is Makefile-based.
2023-04-20 18:21:17 +02:00
Rolf Bjarne Kvinge 5511849baa [tests] Add support for creating temporary directories on Windows. 2023-04-20 18:21:17 +02:00
Rolf Bjarne Kvinge e8c8f0056a
[AVFoundation] Fix callback signature for the AVAudioSinkNode constructor. Fixes #17575. (#17785)
The callback to the AVAudioSinkNode constructor was declared incorrectly, and
if used, the app would crash at runtime.

This fix does a few things:

* Creates an overload with callback signature that matches the native API
  (using IntPtrs).
* Writes a custom version for the broken callback signature to make it work
  (and this overload is obsoleted, and removed in XAMCORE_5_0).
* Adds a third overload with the ideal signature.
* Adds tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/17575.
2023-04-20 13:15:49 +02:00
Rolf Bjarne Kvinge 736662d8ee
[tests] Remove files from the generator tests to fix compiler warnings. (#18092)
Also fix a nullability warning.

Fixes these warnings:

    "tests/generator/generator-tests.csproj" (default target) (1:7) ->
    (CoreCompile target) ->
      tests/generator/AttributeFactoryTests.cs(43,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(44,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(45,29): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(17,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(34,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(53,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(54,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(55,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(56,39): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(64,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(69,11): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(76,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(55,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(83,34): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(78,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(111,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(138,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(95,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/AttributeFactoryTests.cs(178,16): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.
      tests/generator/ConstructorArgumentsTests.cs(116,19): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(194,18): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(210,18): warning CS0436: The type 'AttributeFactory' in 'tests/generator/../../src/bgen/AttributeFactory.cs' conflicts with the imported type 'AttributeFactory' in 'bgen, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'tests/generator/../../src/bgen/AttributeFactory.cs'.]
      tests/generator/ConstructorArgumentsTests.cs(197,44): warning CS8602: Dereference of a possibly null reference.
      tests/generator/ConstructorArgumentsTests.cs(201,43): warning CS8602: Dereference of a possibly null reference.
2023-04-20 07:34:30 +02:00
Rolf Bjarne Kvinge 9615de3334
[dotnet] Include the parsed runtimeconfig.bin into ResolvedFileToPublish. Contributes towards #17579. (#18087)
This makes it unnecessary to special-case this file for it to copied
correctly when building on Windows (once we've fixed the Windows build to use
ResolvedFileToPublish as the source of truth, like we do on macOS).

This is the first part of a fix for
https://github.com/xamarin/xamarin-macios/issues/17579.
2023-04-19 07:32:13 +02:00
Rolf Bjarne Kvinge d4797e605b
[xharness] Add support for tests labeled 'Windows'. (#18089)
We already have support for 'run-windows-tests' and 'skip-windows-tests'
labels: 3e86254ef8.
2023-04-19 07:24:03 +02:00
Rolf Bjarne Kvinge ecea1a431c
[msbuild] Remove the SdkVersion property in the ReadAppManifest task. (#18053)
The ReadAppManifest task doesn't need the SdkVersion, because it's only used to compute
the path to the sdk on disk, and that path can be calculated without an sdk version
now:

    $ ls -la /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
    total 0
    drwxrwxr-x  4 rolf  staff  128 Dec 14 10:58 .
    drwxr-xr-x  5 rolf  staff  160 Nov 11 01:38 ..
    drwxrwxr-x  8 rolf  staff  256 Dec 14 10:48 iPhoneOS.sdk
    lrwxr-xr-x  1 rolf  staff   12 Dec 14 10:56 iPhoneOS16.2.sdk -> iPhoneOS.sdk

In fact, the path with the version just symlinks to the path without.
2023-04-17 07:57:42 +02:00
Rolf Bjarne Kvinge e93c75c2e5
[msbuild] Simplify the CompileAppManifest a bit by removing the SdkPlatform input property. (#18054)
We don't need the SdkPlatform input, because we can compute it from
other input properties.
2023-04-17 07:50:35 +02:00
Rolf Bjarne Kvinge 03f0a35012
[CoreMidi] Create a blittable version of MidiCIDeviceIdentification. (#18052)
The original implementation for the MidiCIDeviceIdentification struct uses
public byte[] fields with a MarshalAs attribute to set the array size. This is
not blittable, but unfortunately these are _public_ fields, which means we
can't change them.

Instead introduce an internal intermediate struct, which is blittable, and
convert to and from this struct when marshalling to and from native code.

Then in XAMCORE_5_0 we can make the intermediate struct public and use it
instead of the non-blittable struct everywhere.
2023-04-17 07:49:31 +02:00
Rolf Bjarne Kvinge 0bb732072f
[tests] Ignore DNS lookup failures in CI. (#18049)
This will hopefully fix the following errors:

    [FAIL] TrustUsingNewCallback : System.Net.WebException : nodename nor servname provided, or not known (dotnet.microsoft.com:443)
     ----> System.Net.Http.HttpRequestException : nodename nor servname provided, or not known (dotnet.microsoft.com:443)
     ----> System.Net.Sockets.SocketException : nodename nor servname provided, or not known
    	   at System.Net.HttpWebRequest.GetResponse()
    	   at System.Net.WebClient.GetWebResponse(WebRequest )
    	   at System.Net.WebClient.DownloadBits(WebRequest , Stream )
    	   at System.Net.WebClient.DownloadDataInternal(Uri , WebRequest& )
    	   at System.Net.WebClient.DownloadString(Uri )
    	   at System.Net.WebClient.DownloadString(String )
    	   at LinkSdk.CryptoTest.TrustUsingNewCallback()
    	   at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags )
    	--HttpRequestException
    	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String , Int32 , HttpRequestMessage , Boolean , CancellationToken )
    	   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage , Boolean , CancellationToken )
    	   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage , Boolean , CancellationToken )
    	   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem )
    	   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellation(CancellationToken )
    	   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1[[System.Net.Http.HttpConnection, System.Net.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].WaitWithCancellationAsync(Boolean , CancellationToken )
    	   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.<WaitForConnectionAsync>d__5[[System.Net.Http.HttpConnection, System.Net.Http, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext()
    	   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage , Boolean , Boolean , CancellationToken )
    	   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage , Boolean , CancellationToken )
    	   at System.Net.Http.HttpMessageHandlerStage.Send(HttpRequestMessage , CancellationToken )
    	   at System.Net.Http.SocketsHttpHandler.Send(HttpRequestMessage , CancellationToken )
    	   at System.Net.Http.HttpMessageInvoker.Send(HttpRequestMessage , CancellationToken )
    	   at System.Net.Http.HttpClient.Send(HttpRequestMessage , HttpCompletionOption , CancellationToken )
    	   at System.Net.HttpWebRequest.SendRequest(Boolean )
    	   at System.Net.HttpWebRequest.GetResponse()
    	--SocketException
    	   at System.Net.Dns.GetHostEntryOrAddressesCore(String , Boolean , AddressFamily , Int64 )
    	   at System.Net.Dns.GetHostAddressesCore(String , AddressFamily , Int64 )
    	   at System.Net.Dns.GetHostAddresses(String , AddressFamily )
    	   at System.Net.Dns.GetHostAddresses(String )
    	   at System.Net.Sockets.Socket.Connect(String , Int32 )
    	   at System.Net.Sockets.Socket.Connect(EndPoint )
    	   at System.Net.HttpWebRequest.<>c__DisplayClass219_0.<<CreateHttpClient>b__1>d.MoveNext()
    	--- End of stack trace from previous location ---
    	   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String , Int32 , HttpRequestMessage , Boolean , CancellationToken )
2023-04-14 08:28:17 +02:00
Rolf Bjarne Kvinge b29169bccc
[bgen] Check for null (no) namespace when matching namespace to framework. Fixes #18025. (#18046)
Fixes https://github.com/xamarin/xamarin-macios/issues/18025.
2023-04-14 08:27:16 +02:00
Rolf Bjarne Kvinge a179f83df6
[tests] Remove duplicated 'using' directives. (#18033) 2023-04-13 08:11:28 +02:00
Rolf Bjarne Kvinge 8ceb8731dd
[tests] Ignore a warning we don't care about in F# test code. (#18034) 2023-04-13 08:11:20 +02:00
Rolf Bjarne Kvinge a54ab5c42a
[tools/tests] Fix bug in 'link all' test and the resulting regression that showed up in code. (#18016)
There's a 'link all' test that's verifying that the IntroducedAttribute is
linked away. It does so by verifying that the linked app doesn't have a
'IntroducedAttribute' type - but the test was constructing the fully qualified
type name to look for incorrectly:

    ObjCRuntime.IntroducedAttribute, , Microsoft.iOS

Note the double comma: that meant we wouldn't find the type, even if it wasn't linked away.

The fix is easy (use a single comma), with one caveat (don't use a constant
string, because the linker sees the reference to
"ObjCRuntime.IntroducedAttribute" and _helpfully_ preserves it, exactly what
we don't want), but it revealed that the tested behavior regressed: a fully
linked app wouldn't link away the IntroducedAttribute.

So a fix is also needed: properly remove TVAttribute, WatchAttribute and
MacCatalystAttribute, which are subclasses of IntroducedAttribute (and what
would make the linker keep IntroducedAttribute).

Interestingly this showed up because of a bug in the runtime, where parsing
the invalid assembly name would now throw an exception
(https://github.com/dotnet/runtime/issues/84118).
2023-04-11 20:12:35 +02:00
Rolf Bjarne Kvinge 2012ffbb75
[tests] Fix BlittablePInvokes.CheckForNonBlittablePInvokes to not verify known failures unless building for all platforms. (#18007)
This fixes a test failure when not including all platforms:

	Cecil.Tests.BlittablePInvokes.CheckForNonBlittablePInvokes: Known failures that aren't failing anymore - remove these from the list of known failures: In the file tests/cecil-tests/BlittablePInvokes.cs, read the guide carefully.
		Expected: <empty>
		But was: < "AudioUnit.AudioComponentStatus AudioUnit.AudioUnit::AudioOutputUnitPublish(AudioUnit.AudioComponentDescription,System.IntPtr,System.UInt32,System.IntPtr)", ...
2023-04-11 07:12:46 +02:00
Rolf Bjarne Kvinge 3d554c2200
[tests] Fix assumption that we'll always produce a compressed binding resource package in the ProjectTest.LibraryReferencingBindingLibrary test. (#18008)
Fixes this test failure when building only for iOS (and similar for tvOS):

	Xamarin.Tests.DotNetProjectTest.LibraryReferencingBindingLibrary(iOS): Existence
		Expected: file or directory exists
		But was: "/Users/builder/azdo/_work/4/s/xamarin-macios/tests/dotnet/LibraryReferencingBindingLibrary/iOS/bin/Debug/net7.0-ios/BindingWithDefaultCompileInclude.resources.zip"
2023-04-11 07:12:27 +02:00
Rolf Bjarne Kvinge 8c9ee8289f
[msbuild/dotnet] Rework how we collect and process native references. (#17554)
Previously, we'd do this:

* Collect all possible native references.
* Extract any compressed native references (*.framework.zip, *.xcframework.zip,
  *.resources.zip) to disk.
* Resolve the resulting native references.

This doesn't work very well on Windows (in non-connected/Hot Restart mode),
because some compressed files may contain symlinks (in particular compressed
xcframeworks). If those symlinks are for any other platform than the one we're
building for, they shouldn't matter, but if we extract the entire compressed
xcframework before figuring out what we need from it, we'd run into symlinks
and not knowing whether they should be ignored or not.

So rework the process to:

* Collect all possible native references.
* Resolve the resulting native references, peeking into zip files if need be.
* Extract any compressed native references, but only the parts of the zip we need.

This way we won't run into any symlinks unless we really need them, and it
should also improve build performance slightly, even on macOS, since we're not
extracting files we won't need (which can be significant for xcframeworks).

Additionally:

* Add support for unzipping on Windows by using System.IO.Compression.
* Show an error if attempting to extract a symlink in the last step in the
  reworked process on Windows.
* Some tests had to be updated (since they poked into internals of the
  ResolveNativeReferences task, and those internals have changed).
2023-04-10 11:27:41 +02:00
Rolf Bjarne Kvinge 2aff5aefe6
[tests] Add missing file to .NET tests. (#17947)
This fixes an issue in the BundleStructure tests:

> error MSB3030: Could not copy the file
"/Users/builder/azdo/_work/4/s/xamarin-macios/tests/dotnet/BundleStructure/NoneP.dll"
because it was not found.
2023-03-30 18:49:05 +02:00
Rolf Bjarne Kvinge 62ee7a4426
[msbuild] Move *.targets, *.props and FrameworkList.xml files to a common directory. (#17860)
This unifies the code/logic between iOS and macOS a bit more.
2023-03-30 18:25:14 +02:00
Alex Soto bae2dd5f78
[main] Add Xcode 14.3 Support (#17810)
please do review the work done so far, this should be up to date to
Xcode 14.3 Beta 2. Best way to review this is going commit by commit
2023-03-30 12:10:45 -04:00
Rolf Bjarne Kvinge 335f8c9d90
[dotnet/msbuild] Don't bundle *.xml files that match any assemblies. Fixes #14939 and fixes #15897. (#17908)
This fixes a warning when documentation is enabled for a project:

> The file '~/.nuget/packages/fsharp.core/6.0.0/contentFiles/any/netstandard2.1/FSharp.Core.xml' does not specify a 'PublishFolderType' metadata, and a default value could not be calculated. The file will not be copied to the app bundle.

This doesn't change any behavior (as the warning says, the file wasn't copied
to the app bundle before either), but it makes the behavior explicitly
documented and silences the warning.

Fixes https://github.com/xamarin/xamarin-macios/issues/14939.
Fixes https://github.com/xamarin/xamarin-macios/issues/15897.
2023-03-30 07:24:00 +02:00
Alex Soto 4d98f09877 [tests] Add two more know issues to the BlittablePInvokes.CheckForNonBlittablePInvoke 2023-03-29 22:25:30 -04:00
Rolf Bjarne Kvinge b24323fc0a [tests] Update BuildWithObjcArcFlag test to cope with breaking changes in Xcode 14.3. 2023-03-29 14:37:51 -04:00
Alex Soto f793719e58 [xcode14.3] Update bidnings to Xcode 14.3 RC and fix tests 2023-03-29 14:37:51 -04:00
Rolf Bjarne Kvinge 65137612a4 [tests] Add more accepted public symbols to the Xamarin.Tests.Misc.VerifySymbols test. 2023-03-29 14:37:51 -04:00
Alex Soto 658346262d Apply suggestions from code review
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-29 14:37:51 -04:00
Alex Soto 67ee103d30 [WebKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 014eb10674 [VideoSubscriberAccount] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 3936403fd3 [UIKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto cdf9be3038 [ThreadNetwork] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto db24230b67 [SensorKit] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto c0169509ba [PencilKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto dd8007b98a [PassKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 81034eb003 [NetworkExtension] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto c525187e3d [MediaAccessibility] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto d824a93b9a [JavaScriptCore] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto f21f9a63a5 [Intents] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 4eda3948ca [HomeKit] [ImageIO] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 542f8cd07e [HealthKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6c36c1abe9 [GameKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6a21f91f16 [Foundation] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 9f03095fd7 [FileProvider] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 6f9113f54f [CoreWLAN] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 283c2dc643 [CoreML] Bump bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 7bb36f88aa [CoreLocation] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 968c73eee8 [CoreFoundation] Cleanup xtro as nothing to be done here 2023-03-29 14:37:51 -04:00
Alex Soto c3daeaf510 [CarPlay] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 80dcea3188 [BackgroundAssets] Update bindings to Xcode 13.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 85b2e8c93d [AVRouting] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 8b6f1c64e4 [AppKit] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00
Alex Soto 3aad6f054d [authenticationservices] Update bindings to Xcode 14.3 Beta 2 2023-03-29 14:37:51 -04:00