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

894 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 12ba642b19 [monotouch-test] Adjust TestTypeEncodings for ARM64 on macOS. 2021-05-11 15:54:39 +02:00
Rolf Bjarne Kvinge 6457c5a5a4 [tests] Update tests to cope with macOS and simulator running on ARM64. 2021-05-11 15:54:39 +02:00
Rolf Bjarne Kvinge ccbdb33b93 [monotouch-test] Adjust BundleTest.TestIsArchitectureLoadable for ARM64.
We can still load an X64 executable when running on an ARM64 CPU.
2021-05-11 15:54:39 +02:00
Manuel de la Pena 47f273b4f6
[Tests] Update xamarin domain to make tests not fail. (#11408)
A wrong implementation of a redirect was added and returns a 403 and not
a 302 resulting in an error. Update to the final destination of the
redirect and be happy.

fixes https://github.com/xamarin/maccore/issues/2432
2021-05-02 20:11:16 -04:00
Rolf Bjarne Kvinge ec7dc80b59
[tests] Add a bluetooth usage description to monotouch-test/macOS. (#11355)
This seems to be required when running monotouch-test with lldb (!) - no idea
why it doesn't fail otherwise.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-29 08:37:36 +02:00
Sebastien Pouliot 5accd102cf
[dotnet][tvos] Enable ICU (instead of using Invariant) and additional tests (#11247) 2021-04-21 20:19:05 -04:00
dotnet-maestro[bot] e8f437319a
[main] Update dependencies from dotnet/installer (#11175)
* Update dependencies from https://github.com/dotnet/installer build 20210408.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21208.1

* Update dependencies from https://github.com/dotnet/installer build 20210409.4

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21209.4

* Update dependencies from https://github.com/dotnet/installer build 20210410.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21210.1

* same P4 specific fix as ccb43cba56
but the ICU support was added based on P3 but merged after ^

* Update dependencies from https://github.com/dotnet/installer build 20210412.5

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21212.5

* Update dependencies from https://github.com/dotnet/installer build 20210413.70

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21213.70

* Update dependencies from https://github.com/dotnet/installer build 20210414.14

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21214.14

* Update to new package names

Thanks @pjcollins for the heads up https://github.com/xamarin/xamarin-macios/pull/11175#issuecomment-819936692

* Update dependencies from https://github.com/dotnet/installer build 20210415.1

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21215.1

* Fix build (path changed to include '.mono')

* remove more '.mono' special case that are not needed anymore

* Update dependencies from https://github.com/dotnet/installer build 20210415.12

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21215.12

* Fix building apps (it now finds the native libs)

Credits to @filipnavara

8325f8dadc

* Add back IsTrimmable (or nothing gets linked)

* Update dependencies from https://github.com/dotnet/installer build 20210418.6

Microsoft.Dotnet.Sdk.Internal
 From Version 6.0.100-preview.3.21202.5 -> To Version 6.0.100-preview.4.21218.6

* Keep downloading the CoreCLR runtime packs.

* [runtime] Adjust the build to link with the correct runtime library for CoreCLR.

* [tests][monotouch-test] Ignore NSTimeZoneTest / All_28300 on dotnet as it hangs

Introduced with https://github.com/dotnet/runtime/pull/48931

Issue https://unicode-org.atlassian.net/browse/ICU-21591
PR https://github.com/unicode-org/icu/pull/1699

* [dotnet][msbuild] Add more (missing) '\'

Fix satellite/location assemblies and some unit tests

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Alex Soto <alex@alexsoto.me>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@microsoft.com>
Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-04-20 09:09:56 -04:00
Sebastien Pouliot f85af095da
[dotnet] Add ICU support for iOS builds (#11163)
and re-enable some tests for dotnet

Part of the fix for https://github.com/xamarin/xamarin-macios/issues/8906

Known Issues
* [some Calendar are not the expected ones](https://github.com/dotnet/runtime/issues/50859)
* [No support for tvOS (bitcode)](https://github.com/dotnet/runtime/issues/48508)
2021-04-09 17:06:26 -04:00
Alex Soto e5818d815b [monotouch-tests] disable some more MacCat crashers 2021-04-07 00:04:48 -04:00
Alex Soto 06185ea8fc [monotouch-tests] Import some fixes from xamarin/xamarin-macios#10587 2021-04-06 22:59:51 -04:00
Alex Soto bf682fd2aa Fix submodules and disable AddressBookTests in MacCat 2021-04-06 20:47:17 -04:00
Alex Soto 58403035f5 [monotouch-tests] Fix crasher in MacCat 2021-04-04 19:22:19 -04:00
Alex Soto bc1d8513a6 Merge remote-tracking branch 'xamarin/xcode12.5' into alex-xcode12.5-main 2021-04-02 21:46:31 -04:00
Peter Collins 5c12fdfac9
[build] Use arcade dependency management tooling (#10890)
* [build] Use arcade dependency management tooling

* Apply feedback

* Apply second round of feedback

* Always make dotnet.config before trying to read it

* Debugging

* Update dependencies, trim tabs and spaces

* [dotnet] Remove the existing workload shipped with .NET and install our locally built ones.

The new version of .NET ships with our workloads, but those aren't
the workloads we want to use, so replace them with our own.

* Update .gitignores.

* Bump to 6.0.100-preview.3.21181.5

That required renaming simulator runtime packs...

* More rename for simulator packages

* moar (hopefully all)

* Bump to 6.0.100-preview.3.21201.11

This fix the issue with `Wait` that failed several tests in monotouch-tests

However it does not include the fix for AppConext.GetData on device (AOT)

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Sebastien Pouliot <sebastien@xamarin.com>
2021-04-02 00:02:27 -04:00
Sebastien Pouliot 747cc9a2b8
[dotnet] Fix device builds (#11036)
With P3 addition on ICU we must now link the native executable as C++.

Remove an old workaround, in many tests, referencing old (5.0/previews)
packages that caused native link time failures.

ref: https://github.com/mono/linker/issues/1139
2021-03-31 12:59:07 -04:00
Rolf Bjarne Kvinge 9153edebda
[runtime] Redirect to our objc_msgSend wrapper functions when needed for .NET code. (#10932)
This makes the mono_dllmap_insert function unnecessary for .NET, so remove it.

Ref: https://github.com/dotnet/runtime/issues/48110
Ref: https://github.com/dotnet/runtime/issues/43204
Ref: #10504
2021-03-24 09:17:35 +01:00
Sebastien Pouliot 584b45a25e
[catalyst] Remove extraneous API detected by xtro (#10872)
This fixes almost [1] all `extra` API detected from the extrospection
(header-based) tests for MacCatalyst. This is needed to complete the
introspection fixes (without having _too large PR).

[1] except `!extra-null-allowed!` since those are still in progress for
all platforms
2021-03-16 16:04:01 -04:00
Rolf Bjarne Kvinge 7ac3c658e0
[tests] Preserve all test fixtures. (#10870)
* [tests] Preserve all test fixtures.

This fixes the wildly diffetent number of tests when running xammac tests with and without linking.

Without linking:

> Tests run: 2446 Passed: 2321 Inconclusive: 9 Failed: 0 Ignored: 125

vs with linking:

> Tests run: 1885 Passed: 1802 Inconclusive: 4 Failed: 0 Ignored: 83

Now we run the same tests either with or without linking.

One test was updated to not fail when linking is enabled.

Also add a test to ensure all future test fixtures are preserved.

* Remove whitespace noise.
2021-03-16 15:15:30 +01:00
Sebastien Pouliot 00a69e1654
[dotnet] Update `Min*` constants and fix builds for tests (#10835)
We're bumping the minimum OS versions for all supported platforms
https://github.com/dotnet/core/blob/master/release-notes/6.0/6.0-supported-os.md

Intro's `Introduced` test is ignored as it require (a lot of) changes. This
will be fixed in separate PRs and gradually re-enabled.

iOS
```
[FAIL] Introduced : 7573 API with unneeded or incorrect version information
```

tvOS
```
[FAIL] Introduced : 299 API with unneeded or incorrect version information
```

Tracking progress in https://github.com/xamarin/xamarin-macios/issues/10834
2021-03-13 10:38:46 -05:00
Sebastien Pouliot c830da3c23
[coremedia] Update for Xcode 12.5 beta 3 (#10860) 2021-03-13 10:23:04 -05:00
Alex Soto ba58ddd217
[UIKit] Update bindings for Xcode 12.5 Beta 1 to Beta 3 (#10851)
* [UIKit] Update bindings for Xcode 12.5 Beta 1 to Beta 3

* Fix condition

* Apply feedback!

* Update tests/monotouch-test/UIKit/UIListSeparatorConfigurationTest.cs
2021-03-12 12:26:24 -05:00
Rolf Bjarne Kvinge d1718c63b3
[tests] Adjust Assembly.GetType calls to find nested types due to different behavior in CoreCLR. (#10796)
Assembly.GetType works differently between CoreCLR and Mono for nested types:
Mono accepts both '/' and '+' as the character separating the declaring type
from the nested type, while CoreCLR only accepts '+'.

So just switch to '+', since that works everywhere.
2021-03-06 01:06:59 +01:00
Rolf Bjarne Kvinge 2ddef0b306
[monotouch-test] Our P/Invokes here too needs MarshalAs attributes for boolean return types and parameters. (#10791) 2021-03-06 01:05:45 +01:00
Rolf Bjarne Kvinge 2d6a3c42a7
Bump to .NET 6.0.100-preview.2.21153.28. (#10788)
* Bump to .NET 6.0.100-preview.2.21153.28.

* [tests] Ignore failing tests due to dotnet/runtime#49201.
2021-03-05 16:28:31 +01:00
Rolf Bjarne Kvinge 871e7b1cd0
[runtime] Build our runtime for Mac Catalyst/ARM64 for .NET. (#10739)
* [runtime] Build our runtime for Mac Catalyst/ARM64 for .NET.

* [ObjCRuntime] There's no need for the StartWWAN implementation on Mac Catalyst.

This also fixes a build error:

    error MT5214: Native linking failed, undefined symbol: _xamarin_start_wwan. This symbol was referenced by the managed member ObjCRuntime.Runtime.xamarin_start_wwan.

* Only exclude xamarin_start_wwan in the .NET version of Mac Catalyst.

* [tests] Update to not run the StartWWAN test on Mac Catalyst.

* Update conditional logic.

* Fix build with newer make versions.
2021-03-03 07:48:07 +01:00
Sebastien Pouliot 755b60e64c
[catalyst] Remove "unknown" API inside existing frameworks (#10731)
xtro tests are based on Apple's header files and report as _unknown_
bindings to API that are not found in headers - Catalyst in this case.

Removing them is required so the applications can be submitted to the
AppStore.
2021-02-26 11:49:24 -05:00
Sebastien Pouliot 0f69381be8
[catalyst][addressbookui] Remove AddressBookUI framework that is not available on Catalyst (#10711)
This required working around internal ctor that uses internal (non
re-generated) types. E.g.

```
build/dotnet/maccatalyst/ref/Xamarin.iOS.cs(9201,64): error CS0234: The type or namespace name 'ABFunc<>' does not exist in the namespace 'AddressBookUI' (are you missing an assembly reference?)
```

We cannot just skip such constructor since the C# compiler will add a
**public** default one when none is present (and that's the case for
the error above),

This also required fixing the ctor chaining code (which can't be shared
with the, previously fixed, override code) so base classes could be
called for some `*EventArg` types.

Follow up to https://github.com/xamarin/xamarin-macios/pull/10658 , https://github.com/xamarin/xamarin-macios/pull/10678 and https://github.com/xamarin/xamarin-macios/pull/10706

This is the last framework that needs removal - but there's still a few
`unknown-*` entries in Catalyst-supported frameworks (more PR coming).
2021-02-25 11:22:02 -05:00
Rolf Bjarne Kvinge 538fd86172
[tests] Add a .NET/macOS version of monotouch-test. (#10672)
* [tests] Add a .NET/macOS version of monotouch-test.

I made a macOS version of monotouch-test instead of a .NET version of xammac tests,
so that one day we might have only one test suite for all our API tests.

* Add a project file for .NET/macOS
* Fix some code to handle the fact that we're called 'monotouchtest' on macOS (but
  only on .NET).
* Ignore exception marshalling tests, those aren't working yet.

* [xharness] Add support for .NET/macOS and add a macOS version of monotouch-test to our tests

* [dotnet-linker] Skip libSystem.Net.Security.Native and libSystem.Native when collecting native methods to preserve for .NET/macOS.
2021-02-24 16:07:04 +01:00
Sebastien Pouliot 89f1c668b4
[catalyst][arkit] Remove ARKit framework that are is available on catalyst (#10706)
This required fixing the override code so that all (not just one) the
parameter types would match. Fixes

```
build/maccatalyst/reference/Xamarin.iOS.cs(11036,50): error CS0115: 'ARSCNView.HitTest(CGPoint, ARHitTestResultType)': no suitable method found to override
build/maccatalyst/reference/Xamarin.iOS.cs(11703,50): error CS0115: 'ARSKView.HitTest(CGPoint, ARHitTestResultType)': no suitable method found to override
```

Follow up to https://github.com/xamarin/xamarin-macios/pull/10658 and
https://github.com/xamarin/xamarin-macios/pull/10678
2021-02-23 16:48:45 -05:00
Sebastien Pouliot a0634460ce
[catalyst] Remove more framework that are not available on catalyst (#10678)
Follow up to https://github.com/xamarin/xamarin-macios/pull/10658

This includes a `.ctor` chaining fix for the forwarder tool which
resulted in several errors like:

```
build/dotnet/maccatalyst/ref/Xamarin.iOS.cs(12640,17): error CS1729: 'UIScene' does not contain a constructor that takes 0 arguments
```

There's two different issues blocking ARKit and AddressBookUI that
will be solved in different PR.

When used with Xamarin.MacCatalyst we must still consider Xamarin.iOS.dll
as a platform assembly (and not user code) so the linker will remove more
code (that usual).

This is even more important as the stubs are unusable - so we do not want
to keep any extra pieces there since they would not work anyway.
2021-02-23 09:11:14 -05:00
Rolf Bjarne Kvinge 86bfa92466
[monotouch-test] Clean up keychain items after test completions. (#10680)
This fixes at least some variations of this failure:

    * Protocol_17579: Add
        Expected: Success
        But was: DuplicateItem

In this test we try to delete any existing keychain items, but it seems that
may fail if the keychain item in question was created by a different app, in
which case we wouldn't have permission to delete it (but adding a new one
would still fail with a duplicate item error). Cleaning up any added keychain
items by the same test (and process) that added them avoids the permissions
problem.

Also clean up in other tests as well, to avoid filling up our keychain with
test stuff.
2021-02-22 17:15:04 +01:00
Sebastien Pouliot a56960b023
[catalyst] Remove some framework that are not available on catalyst (#10658)
Those show up with only `!unknown-*` inside extrospection tests.

There's a few more frameworks to disable but they require some changes
inside `src/generate-type-forwarders/Program.cs` and are better done in
separate pull-requests.
2021-02-21 10:04:09 -05:00
Sebastien Pouliot 36ab765d54 Merge branch 'd16-9' into xcode12.5 2021-02-10 16:48:40 -05:00
VS MobileTools Engineering Service 2 982821c162
[d16-9] [monotouch-test] Rework big parts of KeyChainTest. Fixes #xamarin/maccore@2365. (#10603)
* [monotouch-test] Rework big parts of KeyChainTest. Fixes #xamarin/maccore@2365.

'GenericPassword' keychain items are unique by their Service+Account
properties [1]. This means that changing the Label property will not create a
different 'GenericPassword', which has a few consequences:

* It's possible to filter (and try to delete) using the Label property.
* It's possible to try to delete a 'GenericPassword' item, and have that
  deletion attempt fail with 'no item found', and then subsequently trying to
  add the same item will fail with a DuplicateItem, because the deletion
  was filtered using the Label property.

The change I've made is to:

* Make the Label property much more descriptive, and unique per process. This
  makes it easier to figure out where things come from in the Keychain Access
  app.
* Make the Service property unique per process. This way these tests are
  parallel safe and they won't stomp on eachother.
* Keep the Account property the same (a constant value), so that it's easy to
  filter to just these items in the Keychain Access app.
* Remove the Label property from all queries, it doesn't matter anyway. The
  Label property is still set when adding items to the keychain.

Finally try to clean up after ourselves as good as possible. This way we don't
fill the keychain with test stuff. This involves removing certificates and
passwords we add to the keychain at the end of tests.

Fixes https://github.com/xamarin/maccore/issues/2365.

[1]: https://stackoverflow.com/a/11672200/183422

* Adjust query for RecordTest.AuthenticationType as well to not include fields that don't determine uniqueness.

Also make the InternetPassword items we add to the keychain more descriptive and labelled helpfully.

* Add debug code.

* Revert "Add debug code."

This reverts commit a3edac8160.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2021-02-09 23:05:39 -05:00
Sebastien Pouliot 32bce7fc1f
[xcode12.5] Initial bump for beta 1 (#10573)
This version of Xcode requires macOS 11.0 or later.

New commits in xamarin/maccore:

* xamarin/maccore@de616ca53e [mlaunch] Fix dependencies for Xcode 12.5 beta 1 (#2387)
* xamarin/maccore@e93375583c [Actions] Fix rebase trigger.
* xamarin/maccore@0dfeb85ff6 [CI][VSTS] Add information when the external tool fails. (#2377)
* xamarin/maccore@87e165fdbb Remove Vincent as a code owner 😞 (#2368)
* xamarin/maccore@55a700bb5b [build] Add /restore to Xamarin.Analysis build (#2366)
* xamarin/maccore@2d9f8a9685 Bump to xamarin/xamarin-analysis@95245313 (#2362)

Diff: 428964bf32..de616ca53e

* Bump system mono to the latest available 2020-02 package. (#10402)

This makes xamarin-macios build on Apple Silicon, and also seems to get an
updated csc that fixes a problem with nullability warnings/errors.

* [tests] Fix mmp-regression build

```
10:59:46.5383210 Making all in /Users/builder/azdo/_work/1/s/xamarin-macios/tests/mmp-regression
10:59:46.5392610 TargetFrameworkFallbackSearchPaths=/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Mono.framework/External/xbuild-frameworks MSBuildExtensionsPathFallbackPathsOverride=/Users/builder/azdo/_work/1/s/xamarin-macios/_mac-build/Library/Frameworks/Mono.framework/External/xbuild make all
10:59:46.6208220 /Applications/Xcode_12.5.0-beta.app/Contents/Developer/usr/bin/make clean
10:59:46.6956100 /Applications/Xcode_12.5.0-beta.app/Contents/Developer/usr/bin/make build
10:59:46.7422460 GEN      dylib/libTest.dylib
10:59:46.8094820 ld: library not found for -lSystem
10:59:46.8097590 clang: error: linker command failed with exit code 1 (use -v to see invocation)
10:59:46.8110310 make[2]: *** [dylib/libTest.dylib] Error 1
10:59:46.8112570 make[1]: *** [run] Error 2
10:59:47.0030120 Process make exited with 2
```

This happens on BigSur as it does not find the default location anymore...

* [tests] Do not test GKLeaderboardViewController on BigSur

The issue is the OS version, not the Xcode version. Update check
to skip that test on macOS 11+

* [tests] Fix MSBuild tests / integration

The test cannot work on BigSur since while you can `dlopen` the library
you can open `fopen` it as a file (and can't embed it for the test).

```
12:31:23.9407820 CSC : error CS1566: Error reading resource 'libz.dylib' -- 'Could not find file "/usr/lib/libz.dylib"' [/Users/builder/azdo/_work/1/s/xamarin-macios/tests/msbuild/Xamarin.MacDev.Tests/bin/Debug/net472/tmp-test-dir/msbuild-tests201/XM45Binding.csproj]
12:31:23.9407900 Done Building Project "/Users/builder/azdo/_work/1/s/xamarin-macios/tests/msbuild/Xamarin.MacDev.Tests/bin/Debug/net472/tmp-test-dir/msbuild-tests201/XM45Binding.csproj" (default targets) -- FAILED.
```

* [tests] Fix MTouch tests failures

* `nm` changed it's output and test was updated

* `clang` linking has a much higher limit for it's command-line length

At least it does not seem to be OS specific since both 10.15 and 11.0
returns the same maximum

```
$ getconf ARG_MAX
1048576
```
2021-02-05 20:30:24 -05:00
Rolf Bjarne Kvinge 21e2462e9c Adjust code according to code review. 2021-01-29 11:06:55 +01:00
Rolf Bjarne Kvinge d1735ae779 [monotouch-test] Adjust ExceptionsTest.ManagedExceptionPassthrough according to behavior on Mac Catalyst. 2021-01-28 08:08:02 +01:00
Rolf Bjarne Kvinge cfc32f237e [monotouch-test] Ignore tests that require the GC to actually work in Mac Catalyst. 2021-01-28 08:08:02 +01:00
Rolf Bjarne Kvinge ea56e75816 [monotouch-test] Ignore a few Font tests due to bugs in Mac Catalyst. 2021-01-28 08:08:02 +01:00
Rolf Bjarne Kvinge 1a2d352087 [monotouch-test] Ignore a few tests that require a custom provisioning profile on Mac Catalyst. 2021-01-28 08:08:02 +01:00
Rolf Bjarne Kvinge df4d85ab84 [monotouch-test] Adjust PassLibraryTest.Defaults for Mac Catalyst. 2021-01-28 08:08:02 +01:00
Rolf Bjarne Kvinge 4ec519b7cb [monotouch-test] Fix AVCapturePhotoBracketSettingsTest.TestConstructor to take into account the max bracketed capture photo count. 2021-01-28 08:07:58 +01:00
Rolf Bjarne Kvinge 52e29c4130 [monotouch-test] Adjust version checks according to how they're done now for Mac Catalyst. 2021-01-28 08:07:58 +01:00
Rolf Bjarne Kvinge 72b50c4693 Merge remote-tracking branch 'origin/main' into HEAD 2021-01-28 08:07:48 +01:00
Rolf Bjarne Kvinge 179114b870
[monotouch-test] Rework big parts of KeyChainTest. Fixes #xamarin/maccore@2365. (#10492)
* [monotouch-test] Rework big parts of KeyChainTest. Fixes #xamarin/maccore@2365.

'GenericPassword' keychain items are unique by their Service+Account
properties [1]. This means that changing the Label property will not create a
different 'GenericPassword', which has a few consequences:

* It's possible to filter (and try to delete) using the Label property.
* It's possible to try to delete a 'GenericPassword' item, and have that
  deletion attempt fail with 'no item found', and then subsequently trying to
  add the same item will fail with a DuplicateItem, because the deletion
  was filtered using the Label property.

The change I've made is to:

* Make the Label property much more descriptive, and unique per process. This
  makes it easier to figure out where things come from in the Keychain Access
  app.
* Make the Service property unique per process. This way these tests are
  parallel safe and they won't stomp on eachother.
* Keep the Account property the same (a constant value), so that it's easy to
  filter to just these items in the Keychain Access app.
* Remove the Label property from all queries, it doesn't matter anyway. The
  Label property is still set when adding items to the keychain.

Finally try to clean up after ourselves as good as possible. This way we don't
fill the keychain with test stuff. This involves removing certificates and
passwords we add to the keychain at the end of tests.

Fixes https://github.com/xamarin/maccore/issues/2365.

[1]: https://stackoverflow.com/a/11672200/183422

* Adjust query for RecordTest.AuthenticationType as well to not include fields that don't determine uniqueness.

Also make the InternetPassword items we add to the keychain more descriptive and labelled helpfully.
2021-01-28 07:50:34 +01:00
Rolf Bjarne Kvinge 2a61296464
[tests] Ignore the MonoTouchFixtures.ObjCRuntime.RegistrarTest.RegistrarRemoval test, it's failing on .NET. Fixes #xamarin/maccore@2380. (#10513)
Fixes https://github.com/xamarin/maccore/issues/2380.
2021-01-27 17:44:52 +01:00
Rolf Bjarne Kvinge a06ae76c36
[monotouch-test] Be more descriptive and clean up stuff added to the keychain. (#10493)
* [monotouch-test] Use a more descriptive label for items added to the keychain in KeyTest.

* [monotouch-test] Use a more descriptive label for some items in CertificateTest.

Also make generated keys non-permanent so that they're not added to the keychain.

* [monotouch-test] Clean up a few items added to the keychain by CertificateTest.
2021-01-22 16:15:11 +01:00
Rolf Bjarne Kvinge aa1bf71cd6 [monotouch-test] Make it work with Mac Catalyst.
* Fix system version checks to work properly on Mac Catalyst (which uses the macOS
  version as its system version).

* Add the framework-specific defines to the build for monotouch-test.csproj (using
  the generated response files), this way we can use them in the tests.

* Sprinkle conditionals in numerous places - I tried using either framework-specific
  or XAMCORE_3_0 whenever that made since (instead of using Mac Catalyst as a condition).

* Updated a few tests to use non-deprecated API (because the deprecated API often
  doesn't exist in Mac Catalyst).

* Also a few minor API fixes to make any corresponding tests compile.
2021-01-15 17:52:28 +01:00
Rolf Bjarne Kvinge 29727d6a8d
[tests] Preserve a required method in System.Private.CoreLib to work around a bug in .NET 6. (#10426)
Ref: https://github.com/dotnet/runtime/issues/46908.
2021-01-15 16:39:44 +01:00
Rolf Bjarne Kvinge 24331f35dd
[monotouch-test] Adjust CaptiveNetworkTest.TryCopyCurrentNetworkInfo to work on iOS 10.3.3 (#10435)
According to Apple's documentation, an app linked with iOS 12 or later must
enable a specific entitlement, otherwise calls to CNCopyCurrentNetworkInfo
will always return NULL.
2021-01-15 16:14:27 +01:00