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

4081 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena add9f54722
[CoreData] Update framework for Xcode 12 beta 4. (#9405)
Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-08-19 20:09:35 -04:00
Manuel de la Pena d168637be4
[CoreTelephony] Update framework for Xcode 12. (#9398) 2020-08-19 13:01:05 -04:00
Whitney Schmidt 2f377f0887
fix tiny typo (#9399) 2020-08-19 12:57:05 -04:00
Dorothy Tam 3dad70a503
[AppTrackingTransparency] Add support for Xcode 12 beta 4 (#9385)
Co-authored-by: Dorothy Tam <dtam@switch.tv>
2020-08-19 15:54:04 +02:00
Manuel de la Pena 5ba2042409
[StoreKit] Update framework to Xcode 12 beta 4. (#9387)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-08-18 20:22:36 -04:00
Sebastien Pouliot 2f7770e0b4
[tests][intro] Fix tvOS crash on older (non 4k) devices (#9395) 2020-08-18 13:25:16 -04:00
Manuel de la Pena bf32c513fb
[IntentsUI] Update framework to Xcode 12 beta 4. (#9391) 2020-08-18 10:47:38 -04:00
Rolf Bjarne Kvinge 695ca8d680 [xharness] Don't clone the same project multiple times when reached through different project references.
Problem:

1. interdependent-binding-project references binding-test and bindings-test2.
2. bindings-test2 references bindings-test.

This means bindings-test is reached through 2 projects: both
interdependent-binding-projects and bindings-test2, and previously we'd
process each of these references separately, effectively making two separate
clones of the bindings-test project.

Instead keep track of all referenced projects from the leaf project, and if we
encounter a project we've already cloned, use that directly.
2020-08-18 15:22:24 +02:00
Sebastien Pouliot 0571e90038
[xcode12] Update xtro to ignore unsuported frameworks (#9394)
Mostly macOS but some ExposureNotification got "exposed" in tvOS
2020-08-18 08:56:00 -04:00
Rolf Bjarne Kvinge b84e5e8049 [tests] Add a reference to System.Json in the interdependent-binding-projects test. 2020-08-18 11:35:42 +02:00
Sebastien Pouliot e7d605c128
[passkit] Update for Xcode 12 beta 4 (#9218) 2020-08-17 20:01:41 -04:00
Rolf Bjarne Kvinge 138ebc7288 [xharness] Bump timeout for the .NET tests.
More tests take longer to run!
2020-08-17 19:59:05 +02:00
Sebastien Pouliot af3083a121
[quicklookthumbnailing] Update for Xcode 12 beta 4 (#9388) 2020-08-17 13:43:00 -04:00
monojenkins 3efecd09ac
[d16-8] [Submission] Fix all the selectors that apple warns about. (#9382)
We have noticed the following message from Apple when performing
submissions with Xamarin.iOS:

> ITMS-90338: Non-public API usage - The app references non-public
> selectors in WcBc.iOS: behaviorTypes, convolutionState,
> discoverAllContactUserInfosWithCompletionHandler:,
> discoverAllContactsCompletionBlock,
> discoverUserInfoWithEmailAddress:completionHandler:,
> discoverUserInfoWithUserRecordID:completionHandler:,
> discoverUserInfosCompletionBlock, displayContact, drawableResizesAsynchronously,
> encodeToCommandBuffer:sourceImage:convolutionState:,
> encodeToCommandBuffer:sourceImage:destinationImage:state:,
> getProperty:onChannel:responseHandler:, hasProperty:onChannel:responseHandler:,
> initWithEmailAddresses:userRecordIDs:, initWithMIDIEntity:dataReadyHandler:,
> initWithZoneID:options:, initWithZoneID:subscriptionID:options:,
> isPublicDatabase, mouseUpAction, newDrawable, propertyChangedCallback,
> removeAllAppearanceStreams, replaceTextStorage:, retrieveConnectedPeripherals,
> retrievePeripherals:, setDiscoverAllContactsCompletionBlock:,
> setDiscoverUserInfosCompletionBlock:, setDrawableResizesAsynchronously:,
> setEditedMask:, setMouseUpAction:, setMovieControlMode:,
> setProperty:onChannel:responseHandler:, setPropertyChangedCallback:,
> setSocketFamily:, setTemporaryAttributes:forCharacterRange:, setUserRecordIDs:,
> sourceOffset, subscriptionOptions, takeBackgroundColorFrom:, takePasswordFrom:,
> temporalAntialiasingEnabled, userRecordIDs. If method names in your source code
> match the private Apple APIs listed above, altering your method names will help
> prevent this app from being flagged in future submissions. In addition, note
> that one or more of the above APIs may be located in a static library that was
> included with your app. If so, they must be removed. For further information,
> visit the Technical Support Information at http://developer.apple.com/support/technical/

All of them have been removed but without a break in the API excep
"initWithMIDIEntity:dataReadyHandler:" wich does look like an error on
Apples side.

Empty stubs are used as much as possible except on those cases in which
a handler is called or an output variable should be modified (buffer,
out param) to minimize the users surprise at runtime.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-08-17 09:34:06 -04:00
Sebastien Pouliot f920686313
[sensorkit] Update for Xcode 12 beta 4 (#9378)
beta 3 included a ton of bad update of availability. While it correctly
changed `13` to `14`, is also added `API_UNAVAILABLE(ios` to everything

```diff
-SR_EXTERN API_AVAILABLE(ios(13.0)) API_UNAVAILABLE(watchos) API_UNAVAILABLE(tvos, macos)
+SR_EXTERN API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(ios, watchos) API_UNAVAILABLE(tvos, macos)
```

Those were corrected (lot of noise) if beta 4, along with few API
changes.
2020-08-17 08:23:06 -04:00
Rolf Bjarne Kvinge ea30bc9cea [xharness] Make sure MSBUILD_EXE_PATH is not set when executing dotnet.
Something ends up confused, and dotnet hangs.
2020-08-17 11:09:06 +02:00
Rolf Bjarne Kvinge 5795f11bf0 [tests] Adjust the bindings-test2 project to work with xharness.
xharness needs to inspect project files, but can't do so through imported
projects, so move some of the logic from the imported shared.csproj to the
main csproj.
2020-08-17 09:32:12 +02:00
Přemek Vysoký b1f7bd44d9
[xharness] Do not mark DeviceLoaders as loaded when loading fails (#9367) 2020-08-17 08:27:48 +02:00
Manuel de la Pena 09fa8266be
[ScreenTime] New framework for Xcode 12 up to beta 4. (#9379) 2020-08-15 11:04:23 -04:00
Manuel de la Pena 7e7caa00a6
[Submission] Fix all the selectors that apple warns about. (#9268)
We have noticed the following message from Apple when performing
submissions with Xamarin.iOS:

> ITMS-90338: Non-public API usage - The app references non-public
> selectors in WcBc.iOS: behaviorTypes, convolutionState,
> discoverAllContactUserInfosWithCompletionHandler:,
> discoverAllContactsCompletionBlock,
> discoverUserInfoWithEmailAddress:completionHandler:,
> discoverUserInfoWithUserRecordID:completionHandler:,
> discoverUserInfosCompletionBlock, displayContact, drawableResizesAsynchronously,
> encodeToCommandBuffer:sourceImage:convolutionState:,
> encodeToCommandBuffer:sourceImage:destinationImage:state:,
> getProperty:onChannel:responseHandler:, hasProperty:onChannel:responseHandler:,
> initWithEmailAddresses:userRecordIDs:, initWithMIDIEntity:dataReadyHandler:,
> initWithZoneID:options:, initWithZoneID:subscriptionID:options:,
> isPublicDatabase, mouseUpAction, newDrawable, propertyChangedCallback,
> removeAllAppearanceStreams, replaceTextStorage:, retrieveConnectedPeripherals,
> retrievePeripherals:, setDiscoverAllContactsCompletionBlock:,
> setDiscoverUserInfosCompletionBlock:, setDrawableResizesAsynchronously:,
> setEditedMask:, setMouseUpAction:, setMovieControlMode:,
> setProperty:onChannel:responseHandler:, setPropertyChangedCallback:,
> setSocketFamily:, setTemporaryAttributes:forCharacterRange:, setUserRecordIDs:,
> sourceOffset, subscriptionOptions, takeBackgroundColorFrom:, takePasswordFrom:,
> temporalAntialiasingEnabled, userRecordIDs. If method names in your source code
> match the private Apple APIs listed above, altering your method names will help
> prevent this app from being flagged in future submissions. In addition, note
> that one or more of the above APIs may be located in a static library that was
> included with your app. If so, they must be removed. For further information,
> visit the Technical Support Information at http://developer.apple.com/support/technical/

All of them have been removed but without a break in the API excep
"initWithMIDIEntity:dataReadyHandler:" wich does look like an error on
Apples side.

Empty stubs are used as much as possible except on those cases in which
a handler is called or an output variable should be modified (buffer,
out param) to minimize the users surprise at runtime.
2020-08-14 14:53:01 -04:00
Rolf Bjarne Kvinge 9fddbbda58 [xharness] Enhance ResolveAllPaths to understand $(RootTestsDirectory).
This requires passing the root directory around in multiple places, since ResolveAllPaths
doesn't have access to the static class where we define the root directory.

Also call ResolveAllPaths in a few more places to ensure paths everywhere are resolved.
2020-08-14 18:33:29 +02:00
Rolf Bjarne Kvinge 5a5a53e1a9 [xharness] Add the .NET version of interdependent-binding-projects to our lineup 2020-08-14 18:33:28 +02:00
Rolf Bjarne Kvinge 98b52c7c3a [tests] Port interdependent-binding-projects to .NET. 2020-08-14 18:33:28 +02:00
Rolf Bjarne Kvinge 6186e98de8 [tests] Fix binding project file path 2020-08-14 18:33:28 +02:00
Rolf Bjarne Kvinge b28997fa8a
[xharness] Add support for getting the default AssemblyName for projects. (#9369)
In .NET projects there's a default value for most properties, which means that
there won't necessarily be an AssemblyName property in a csproj. We need to know the
AssemblyName, so calculate it from the csproj filename (which is how .NET does it).

This turned out slighly complicated, because we're pass an XmlDocument around,
and the XmlDocument doesn't know the file from where it was loaded, so we need
to keep that information separately.
2020-08-14 10:32:23 +02:00
Manuel de la Pena 1be4b57cbe
[AVFoundation] Update framework for Xcode 12 beta 4. (#9354)
Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-08-13 17:09:47 -04:00
Whitney Schmidt fb665c8c68
[NearbyInteraction][Xcode12] Add manual binding for NINearbyObjectDirectionNotAvailable (#9346)
* nearby interaction manual update + test
2020-08-12 15:43:00 -04:00
Rolf Bjarne Kvinge d36853c8cd
[xharness] Add support for adding PropertyGroups for unknown platform/configuration values in a csproj. Fixes xamarin/maccore@2277. (#9347)
Fixes https://github.com/xamarin/maccore/issues/2277.
2020-08-12 10:35:18 +02:00
Rolf Bjarne Kvinge 621bf6c085
[tests] Fix running several test suites from the command line. Fixes xamarin/maccore@2279. (#9348)
Fixes https://github.com/xamarin/maccore/issues/2279
2020-08-12 10:34:55 +02:00
Rolf Bjarne Kvinge 9fda2c6c9b
[tests] Add --dlsym:+nunit.framework.dll to all Xamarin.iOS test suites. (#9349)
This works around a build problem that occurs because NUnit ships with a
P/Invoke to a function that doesn't exist on Apple platforms:

    MTOUCH : error MT5210: Native linking failed, undefined symbol: _GetVersionEx. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. [/Users/xamarinqa/myagent/_work/8/s/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test58/monotouch-test-tvos.csproj]
    MTOUCH : error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -fembed-bitcode-marker [/Users/xamarinqa/myagent/_work/8/s/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test58/monotouch-test-tvos.csproj]
    clang : error : linker command failed with exit code 1 (use -v to see invocation) [/Users/xamarinqa/myagent/_work/8/s/xamarin-macios/tests/xharness/tmp-test-dir/monotouch-test58/monotouch-test-tvos.csproj]

Also fix an issue in mtouch where we would overwrite any previous --dlsym
values; they're now accumulative (`--dlsym:foo.dll --dlsym:bar.dll` works
as expected)

Ref: https://github.com/nunit/nunit/issues/3618
2020-08-12 09:42:53 +02:00
Rolf Bjarne Kvinge 90ec0c7cf9
[dotnet] Add support for building binding projects (#9340).
* Ship bgen
* Fix a few issues in the generator.
* Modify some of the MSBuild logic to support binding projects.
* Port bindings-test[2] to .NET.
2020-08-11 11:15:56 +02:00
Whitney Schmidt 6ff4eb6c97
[Xcode12][NearbyInteraction] New framework, updated through beta 4 (#9336)
* add new framework for xcode12
2020-08-10 16:06:02 -04:00
Rolf Bjarne Kvinge 855c2b09fc
[mtouch] Fix the MT0091 (now called MT0180) after recent code changes. Fixes xamarin/maccore@2280. (#9342)
Also fix a confusion between the M?0179 and M?0180 error message vs error number.

Fixes https://github.com/xamarin/maccore/issues/2280.
2020-08-10 15:49:50 -04:00
Rolf Bjarne Kvinge 8814e8ca24 [tests] Port bindings-test2 to .NET. 2020-08-10 16:14:52 +02:00
Rolf Bjarne Kvinge d883eb4725 [tests] Add a tvOS and watchOS version of the bindings-test project for .NET 2020-08-10 16:12:42 +02:00
Rolf Bjarne Kvinge 43d234de52 [tests] Add a macOS version of the bindings-test project for .NET
This required disabling some Xamarin.Mac-specific binding code in .NET mode.
2020-08-10 16:12:42 +02:00
Rolf Bjarne Kvinge c583cfd01e [dotnet] Add bindings-test to our unit tests. 2020-08-10 16:12:42 +02:00
Rolf Bjarne Kvinge 89e5bb15f7 [tests] Port bindings-test to .NET 2020-08-10 16:12:41 +02:00
Rolf Bjarne Kvinge 19e53376dd
[dotnet] Port the fsharplibrary project to .NET (#9339) 2020-08-10 16:12:19 +02:00
Manuel de la Pena 9405c5e46b
[MapKit] Update the framework to Xcode 12 beta 4. (#9314)
* [MapKit] Update the framework to Xcode 12 beta 4.

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Address reviews.

* Add ignore to init test because we should use the Create method.

* Fix failing tests.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-08-10 09:58:09 -04:00
Rolf Bjarne Kvinge d96827cd89
[msbuild] Share the _CompileEntitlements target. (#9323)
Use two separate output variables (EntitlementsInExecutable/EntitlementsInSignature)
instead of using the same output variable for two different purposes. This makes
the code more self-explanatory.

Also move the simulator check to the C# code, that way it's easier to re-use elsewhere.

* [msbuild] Share the _CompileEntitlements task.

* [msbuild] Create the same class hierarchy for Xamarin.Mac and Xamarin.iOS for the CompileEntitlements task.

    CompileEntitlementsTaskBase
    └─── iOS/CompileEntitlementsTaskCore
    │    └─── iOS/CompileEntitlements
    └─── Mac/CompileEntitlementsTaskCore
         └─── Mac/CompileEntitlements

This also means we can remove a known failure in the list of MSBuild tasks that don't
conform to our 'no code in final task implementation' requirements.
2020-08-10 13:55:54 +02:00
Rolf Bjarne Kvinge d0f426b731
[tests] Port the EmbeddedResources test project to .NET and add a test to build it. (#9324) 2020-08-10 10:48:29 +02:00
Rolf Bjarne Kvinge 200608ce77
[xharness] Look at the exact NUnit version an NUnit project is referencing to figure out how to run it in a makefile. (#9322) 2020-08-10 10:47:45 +02:00
Manuel de la Pena dd0beaaed4
[MLComputet] Update the bindings for Xcode 12 beta 4. (#9335) 2020-08-08 00:09:57 -04:00
Alex Soto a292a2ea10
[UIKit] Update bindings to Xcode 12 Beta 4 (#9331) 2020-08-07 22:17:29 -04:00
Alex Soto 5d657f0cde
[Foundation] Update bindings to Xcode 12 Beta 4 (#9328) 2020-08-07 22:16:19 -04:00
Manuel de la Pena 5d2f117877
[CoreMidi] Update framework for Xcode 12 beta 4. (#9326) 2020-08-07 18:15:36 -04:00
Manuel de la Pena 7eeb550504
[WatchKit] Update framework to xcode 12 beta 4. (#9327) 2020-08-07 18:15:15 -04:00
Whitney Schmidt 1f77d1bf2b
[GameController][Xcode12] Updates through beta 4 (#9265)
* commit for GameController Xcode12
2020-08-07 11:16:25 -04:00
Whitney Schmidt 205412f8a0
[HomeKit][Xcode12] Update for beta 3 (#9270)
* HK updates for Xcode12
2020-08-07 11:15:39 -04:00
Alex Soto 4755af7351
[CoreMotion] Update bindings to Xcode 12 Beta 4 (#9316) 2020-08-07 09:29:36 -04:00
Rolf Bjarne Kvinge 8f5dba2194
[introspection] Some P/Invokes have moved to a QCall library in .NET 5 preview 8+. (#9300)
This fixes numerous P/Invoke test failures like this:

    Could not find the symbol 'GlobalizationNative_GetCalendars' in QCall
    Could not find the symbol 'GlobalizationNative_GetCalendarInfo' in QCall
    Could not find the symbol 'GlobalizationNative_EnumCalendarInfo' in QCall
    Could not find the symbol 'GlobalizationNative_GetLatestJapaneseEra' in QCall
    [...]

Ref: a56d6a8034
Ref: fae477f34b
2020-08-07 08:06:31 +02:00
Rolf Bjarne Kvinge f2b8dc3d48
[xharness] Make it possible to include .NET tests by setting a label. (#9298)
This also means that setting 'run-all-tests' enables the .NET tests, which
means they'll now start running on internal Jenkins (as was the intention from
the beginning).
2020-08-07 07:59:14 +02:00
Rolf Bjarne Kvinge 2b96b9ac5f
[monotouch-test] Adjust tests based on Environment.OSVersion (#9291)
With Mono, Environment.OSVersion returns the macOS version when running in the
simulator. On Catalina, Mono returns 19.* as the Environment.OSVersion, which
means that the check for major version = 15 in the simulator turns out to be a
constant value now (since we don't support running in the simulator on a
4-year-old macOS version).

With .NET, Environment.OSVersion returns the iOS version instead, which means
that the check would have to be reworked.

However, since these version checks have effectively been constant for a few
years now, we can just remove the checks and the resulting unreachable code.
2020-08-07 07:57:40 +02:00
Alex Soto f0590a8ee5
[AuthenticationServices] Update bindings to Xcode 12 Beta 4 (#9302) 2020-08-06 18:29:22 -04:00
Manuel de la Pena f147fe91cf
[Harness] Fix some typos. (#9303) 2020-08-06 17:37:57 -04:00
Manuel de la Pena 90bf04f608
Remove wrongly added dir. (#9301)
Someone (Manuel) uses an IDE that uses .idea to store user settings and
that got added by accident.
2020-08-06 16:35:26 -04:00
Alex Soto cf8d5599ee
[CoreGraphics] Update bindings to Xcode 12 Beta 3 & 4 (#9299) 2020-08-06 16:08:18 -04:00
Alex Soto 1215f65ae6
[CoreFoundation] Update bindings to Xcode 11 Beta 4 (#9297) 2020-08-06 16:00:22 -04:00
Whitney Schmidt d1bff45739
[PhotosUI][Xcode12] Update for beta 4 (#9285)
* update for beta 4
2020-08-06 11:29:30 -04:00
Manuel de la Pena 141f9c370e
[Harness] Backport all needed commits to allow to use tcp tunnels on iOS 14 2020-08-06 09:37:59 -04:00
Rolf Bjarne Kvinge 53ccfa6664
[monotouch-test] Improve a few asserts to make them show better output when they fail. (#9290) 2020-08-06 15:04:57 +02:00
Alex Soto c467926813
[AppKit] Update bindings to Xcode 12 Beta 4 (#9287) 2020-08-06 05:58:17 -04:00
Manuel de la Pena 6293ce6828
[Tests] Fix TryGetSupportedInterfaces when we have values. Fixes #2273 (#9276)
* [Tests] Fix TryGetSupportedInterfaces when we have values. Fixes #2273

Make the test check against the value returned by the native API rather
than expect the result to always be null.

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

* Address reviews.
2020-08-06 11:00:18 +02:00
Manuel de la Pena 3348ad244c [Harness] Add support to create tunnels. (#8446)
* [Harness] Add support to create tunnels.

Add support to create tunnels in case the devices cannot connect to
the host. This option is false by default, which means that unless told
otherwise xharness will try to se a tcp connection over the WiFi.

We are not setting it as default because the devices in DDFun will have
access to an unrestricted network. Nevertheless after this PR we will
create a new one with the following logic:

1. Try to use the tcp connection using the network.
2. If devices cannot connect to the host via the network, fall back to
the tcp tunnel.

This change executes a tunnel process per test application, most of the
cases out of the 150 test application we execute, most of them (maybe 98%
but most % are made up) will pass, and just a few of them will fail. The
reason is that there is a daemon in the OS that gets underwater.

Rather than tryingt o find a hacky way to re-use the tunnel, lets KISS
and if we need to hack that, do it as an enhancement.
2020-08-05 18:54:43 -04:00
Manuel de la Pena da98de9a7f [Harness] Remove old files that are not longer used. (#8424)
The bcltest dir should only have the .ignore files, the code generator
creates all the different projects and those files were left behind when
they should have been removed.

* The info.plist is needed. This was added to issue: https://github.com/xamarin/xamarin-macios/issues/8426
2020-08-05 18:52:55 -04:00
Manuel de la Pena 5616caa302 [Harness] Move all common code to the shared lib. (#8389)
Moved all the code that can be shared with the CLI to the common
library. We neede some small changes, but mainly due to namespaces and a
forgotten interface implemenation (was already implemented, was missing
in the class).

This was fun :)
2020-08-05 18:52:39 -04:00
Manuel de la Pena d4af4e8ae5 [Harness] Refactor TestProject to be moved to the common lib. (#8388)
Refactor TestProject so that we can move all the tasks to the common
assembly. We had to remove all the references from Harness, that
included the MonoNativeInfo.
2020-08-05 18:52:21 -04:00
Manuel de la Pena e24b1f735b [Harness] Refactor RunDeviceTask. (#8386)
Move most/all of the logic to a helper class so that it later can be
used in the CLI.
2020-08-05 18:52:08 -04:00
Manuel de la Pena 2e33c03b55 [Harness] Generalize the RunTestTask to allow it to be used in the CLI. (#8380)
Move all the logic outside and use it as a Composition pattern, later
this class can be used in the CLI so that we share the logic of building
and tested.
2020-08-05 18:51:54 -04:00
Manuel de la Pena 62c277704a [Harness] Donet doest not need to restore. (#8383)
Removed line due to a bad merge, re-add it.
2020-08-05 18:51:38 -04:00
Manuel de la Pena c56b3f68ae [Harness] Create IBuildToolTask and use it in the RunTestTask. (#8375)
In order to de-couple the RunTestTask from Jenkins, create an interface
to be implemented, which is pass to use as a member (Composition
pattern). In order to do that, do not expose Jenkins as a property of
the interface because it is required just by the base constructor.

Moving the the use an interface meant a lot of small changes that
should have no real effect (the compiler should have caught any possible
issues).
2020-08-05 18:51:26 -04:00
Manuel de la Pena 711afda56e [Harness] Refactor certain class names to simplify the extraction of the RunTestTask. (#8372)
The initial idea of the refactoring looked nice but as soon as we want
to get the RunTestTask out of jenkins, we have a number of naming
issues. Move the tools to not use the *Task postfix so that it is
cleaner and we can later extra the RunTestTask better.


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-08-05 18:51:14 -04:00
Manuel de la Pena f1a4cad35b [Tests] Bump language used in the mac binding tests. (#8348)
* [Tests] Bump language used in the mac binding tests.

They broke with nullability, we need to use the latests lang version.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8346
2020-08-05 18:50:06 -04:00
Manuel de la Pena 2a84bb37d1 [Harness] Generalize MSBuildTask and DotnetBuildTask. (#8306)
Move all the logic outside of the Jenkins namespace. Rework a little the
inheritance to make it nicer in the constructors.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-08-05 18:49:25 -04:00
Manuel de la Pena 7c739e7ff1 [Harness] Generalize the BuildProjectTask (#8299)
Use composition to generalize the BuildProjectTask to later reuse it in
the CLI.

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-08-05 18:39:35 -04:00
Manuel de la Pena 7c2650a87f [Harness] Move BuildToolTask to a more general namespace. (#8287)
Move the task and use composition so that we can reuse the code. This
will later allow other projects to use the class without the need of
Jenkins or Harness and just implement the base class.



Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-08-05 18:25:45 -04:00
Manuel de la Pena 55665e8e4d [Harness] Move to create a more general TestTasks class to be reused. (#8286)
Some of the Jenkins test tasks are very useful and do A LOT of stuff. So
we try to generalize the base class, to later be able to share the most
usebul ones in the shared lib.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-08-05 18:25:24 -04:00
Alex Soto 42eaa54108
[xcode12] Initial bump to Xcode 12 Beta 4 (#9272)
* [xcode12] Bump to Xcode 12 Beta 4

* [Tests] Disable Trust_FullChain and Trust2_FullChain tests

These tests started showing a different error than the one we expect
I'll let our security expert chime in
2020-08-05 13:25:01 -04:00
Manuel de la Pena 57212bce8e
[CoreHaptics] Update framework for Xcode 12 beta 3. (#9273)
Update the framework to include Xcode beta3 and add support for tvOS.
As of Xcode12 beta 3 it cannot yet be compiled on macOS X, please refer
to https://github.com/xamarin/maccore/issues/2261
2020-08-05 11:43:44 -04:00
Manuel de la Pena f6b2f55353
[ClassKit] Update to Xcode12 beta 3. (#9274) 2020-08-05 06:07:49 -04:00
Rolf Bjarne Kvinge 603b22e1d6
[tests] Move from MonoTouch.NUnitLite to Touch.Client. (#9264)
* Touch.Client is a tiny mobile UI/runner for the official NUnitLite. This
  means we'll stop using a very old fork of NUnitLite to run our tests, and
  instead use the most recent upstream version instead.

* Some test changes were required to use the official NUnitLite, because there
  have been breaking changes there.

* NUnitLite is now referenced using a NuGet, which means there are numerous
  changes to support this.

* We're not using GuiUnit anymore, so that dependency has been removed.
2020-08-05 09:32:23 +02:00
Rolf Bjarne Kvinge ab80b27d52 [tests] Update according to API change in Touch.Client.
New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@d7f55a6 [TouchRunner] Add support for a --test:<testname> argument to select a specific test to run. (#85)
* spouliot/Touch.Unit@6cf8d0b [TouchRunner] Fix test filtering. (#86)
* spouliot/Touch.Unit@c4a1cd1 [TouchRunner] The mac runner must run tests inside NSApplication.Run. (#84)

Diff: f62066880a..d7f55a6167
2020-08-04 17:10:07 +02:00
Rolf Bjarne Kvinge 5327564109
[AppKit/UIKit] Merge the definitions of NS[Mutable]ParagraphStyle. (#9261)
* Reduces code duplication.
* Makes the macOS versions thread-safe (the iOS versions have been thread-safe
  for years: 2c6a5303a7).
* A few parameters names were different in the definitions; I chose to keep the ones in Xamarin.iOS, since they looked better.
* Xamarin.Mac had two methods, SetTextBlocks and SetTextLists, in place of an actual property override (for the mutable setter), this was fixed to be an actual property overload, and compat methods were implemented.
* xtro needed an update to cope with multiple static methods for the same selector.
2020-08-04 14:25:24 +02:00
Rolf Bjarne Kvinge 85b50a0347 Merge remote-tracking branch 'origin/main' into HEAD 2020-08-04 10:39:46 +02:00
Rolf Bjarne Kvinge 7b92ea061b [monotouch-test] Fix a couple asserts with regards to native types. 2020-08-04 10:33:16 +02:00
Rolf Bjarne Kvinge 21ee5a7f74
[mtouch] Don't try to copy invalid symbol files. (#9262)
This solves a rebuild problem if an assembly has an invalid or unsupported symbol
file, where we'd detect that the symbol file exists, and expect it to be copied,
but then the linker would drop it, causing us to always rebuild the app (this is
not the same as when a symbol file is out of date).

This happens for NUnitLite 3.12.0's nunit.framework.dll, which ships with an old-style
pdb.

Also add a warning that is shown when we detect that there's a symbol file, but it
couldn't be loaded for some reason.
2020-08-04 08:08:44 +02:00
Rolf Bjarne Kvinge 691e8eac7a
[xharness] Improve parsing of NUnitV2 xml reports to fix an issue with failures in parameterized tests. (#9259)
We weren't properly reporting all failures when there were multiple failures
in parameterized tests, because we'd incorrectly skip too many xml nodes when
we were looking for the next test failure.
2020-08-03 18:51:30 +02:00
Rolf Bjarne Kvinge 7e9a60d690
[xharness] Fix main log parsing by not requiring it to come from a file. (#9258)
Not all types of logs have files, but all types of logs have a reader (or will
have soon due to PR #9257).
2020-08-03 18:51:09 +02:00
Rolf Bjarne Kvinge f7cd7d3cad
[xharness] Implement Log.GetReader for all loggers. (#9257)
This makes it easier to write code that parses logs, since that code won't
have to worry about if a particular log supports GetReader or not.
2020-08-03 18:51:01 +02:00
Rolf Bjarne Kvinge 8bb50638da Bump Touch.Unit.
This also required adding System.Core.dll to the MonoTouch.NUnitLite.dll, and fixing a csproj path.

New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@f620668 [Touch.Client] Adjust project configurations. (#83)
* spouliot/Touch.Unit@545400b [Touch.Client] Fix paths in the .NET project files. (#81)
* spouliot/Touch.Unit@703586b [Touch.Client] Add API to exclude tests based on categories. (#82)
* spouliot/Touch.Unit@9266732 [Touch.Client] Add support for macOS. (#80)
* spouliot/Touch.Unit@2d556a5 [TouchRunner] Fix network logging to log if we're logging to a file even if EnableNetwork is false. (#79)
* spouliot/Touch.Unit@1f85e16 [TouchOptions] Fix a few issues related to command-line parsing. (#78)
* spouliot/Touch.Unit@1c272a9 [TouchRunner] Rename TestElement.Update to TestElement.TestFinished to make it clearer when it's used. (#73)
* spouliot/Touch.Unit@9a654ca [TouchRunner] Fix running multiple test assemblies in NUnitLite mode. (#76)
* spouliot/Touch.Unit@55c747f [TouchRunner] Print test output to the console. (#75)
* spouliot/Touch.Unit@ab5dce0 [TouchRunner] Keep track of the last shown test suite, and return to it when the app is relaunched. (#74)
* spouliot/Touch.Unit@1a7068c [TouchRunner] Only update the UI for a single test after the test has finished running. (#72)
* spouliot/Touch.Unit@ba93ddf [TouchRunner] Fix unused variable warning by only defining the variable when it's used. (#71)
* spouliot/Touch.Unit@ab2aaa5 [TouchRunner] Always show 'Run all'. (#70)
* spouliot/Touch.Unit@af58317 Move every Touch.Client projects to its own folder. (#69)
* spouliot/Touch.Unit@8a0ec0d [TouchRunner] Improve name printing in NuGet mode. (#68)
* spouliot/Touch.Unit@c7f8ff0 Ignore any 'packages' directory. (#67)

Diff: b4e8606a85..f62066880a
2020-08-03 16:21:43 +02:00
Rolf Bjarne Kvinge cad850fae7 [tests] Restore projects before building them from the command line. 2020-08-03 11:53:18 +02:00
Rolf Bjarne Kvinge 49030cffaf [tests] Pass --dlsym:+nunit.framework.dll to work around a P/Invoke to an inexistent function in nunit.framework.dll. 2020-08-03 11:53:18 +02:00
Rolf Bjarne Kvinge 3f8ebe4ba5 [tests] Make the mtouch tests cope with bindings-test.dll now having a dependency on nunit.framework.dll from a NuGet.
I would have liked to automatically get all the references required by bindings-test.dll,
but that turned out to be not as simple as I first thought (since bindings-test is
a library project, the exact dependencies actually depend on the type of the executable
project that references it, which means it's quite difficult to calculate the final
references given just the binding project).

Instead just hardcode the fact that there's a reference to nunit.framework.dll, and
the corresponding on-disk path (we still look in the actual csproj to get the version
of nunit.framework.dll).
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 62719b6f7b [xharness] Use LogFile instead of ResultFile in macOS BCL tests to match the Touch.Client usage. 2020-08-03 11:53:18 +02:00
Rolf Bjarne Kvinge 09edb8558d [xharness] Add support for finding/setting the main Xamarin import among multiple imports.
This is required for the previous commit, where we added an additional import to
a few project files to pass an xml definition to mtouch/mmp.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 96615bbd67 [tests] The upstream NUnitLine isn't linker safe, so add an xml file to make sure linking doesn't remove too much.
In particular NUnit uses reflection to get a private method, and the linker removes
the corresponding private method:

1c680b4dc8/src/NUnitFramework/framework/Internal/TestExecutionContext.cs (L552)

So add an xml definition to keep this private method, and modify project files to
pass the xml definition to mtouch and mmp.

Some care needs to be taken to make sure xharness is still able to clone these project
files.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 5dcb243a05 [introspection] Remove NUnitLite and MonoTouchDialog tests.
These tests now end up testing the NUnitLite and MonoTouch.Dialog assemblies from
NuGet, not the ones we ship, which means they're out of our control to fix.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge ba76910dc2 [tests] Delete MacTestMain.cs, it's not used anymore. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge d85b7ea03e [tests] Make the template watchOS extension use Touch.Client's API to exclude tests based on categories.
This also removes the ability to filter tests based on the first character of
a test name, but we don't use this ability anymore.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge f79efc29f6 [tests] Fix template projects to use Touch.Client. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 1cc265838a [xharness] Add the Touch.Client projects to our solutions instead of MonoTouch.NUnitLite. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge e4aaf6a8d6 [xharness] Change how we run macOS unit tests to work with Touch.Client.
This is very similar to how we run iOS unit tests.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge fcb8446eb5 [tests] Remove dead code related to GuiUnit and the GuiUnit submodule. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge dcfa5015cc [tests] Update Xamarin.Mac tests to use Touch.Client and the official NUnit[Lite]. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 0a5b72d64b [tests] Update attributes in tests according to breaking changes in NUnit[Lite]. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 4a8cd19f93 [tests] Move the TestRuntime class out of MacTestMain.cs.
This makes it easier to re-use the TestRuntime code together with other Main implementations.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 349a6b6d5a [xharness] Add support for generating/duplicating projects with a Touch.Client reference.
This also means removing support for generating/duplicating MonoTouch.NUnit references,
since we're not using those anymore.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge a528c4e869 [monotouch-test] Update setting the default floating point tolerance to how it's done in the official NUnitLite. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 4cee581ba5 [tests] Use Assert.IsInstanceOf instead of Assert.IsInstanceOfType.
The latter doesn't exist anymore in the official NUnitLite.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge f516fcfb07 [tests] Use the Does.[BeginWith|Contain|EndWith] constraints instead of the Is.[StringStarting|StringContaining|StringEnding] constraints.
The latter don't exist in the official NUnitLite anymore.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 191ad80088 [tests] [linksdk] Add a dummy interface for an interface provided by our old NUnitLite.
It didn't look like this interface was used anywhere expect to check for its
presence, so just provide another, identically named, interface.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 99081123a7 [tests] Update a few TestCase attributes to be compatible with official NUnitLite. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge b7db211e2d [tests] Use MonoTouch.Dialog from NuGet and Touch.Client instead of MonoTouch.NUnit.
* Touch.Client references the official NUnitLite package, which means we're using
  a non-forked version of NUnit.

* This makes it easier for our .NET 5 effort, since we won't have to port an ancient
  version of NUnitLite to .NET 5 (nor will we have to keep using it in our existing
  code, we can use more modern NUnit patterns).

* Reference MonoTouch.Dialog from the NuGet package. This also eases the .NET 5 effort,
  since we won't have to port MonoTouch.Dialog to .NET 5 (we'll probably still do it
  though at some point, but it doesn't have to be done right away), nor build it
  ourselves / ship it.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 7df8652579 Update .gitignore. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 77771f7893
[xharness] Don't try to parse a build log that doesn't exist. (#9253) 2020-07-31 19:32:33 +02:00
Rolf Bjarne Kvinge 1e6e17cb2d
[xharness] Resolve relative project references using the referencing project's directory. (#9252)
Otherwise it would end up being resolved from the current directory, which is
not dependable.
2020-07-31 16:50:34 +02:00
Rolf Bjarne Kvinge cc06a93976
[xharness] Mark the .NET tests project as a .NET project so that we don't try to call nuget restore on it. (#9251)
* [xharness] Mark the .NET tests project as a .NET project so that we don't try to call nuget restore on it.

* [xharness] Mark the .NET generator project as a .NET project as well.
2020-07-31 16:50:10 +02:00
Rolf Bjarne Kvinge 30650b5f87
[tests] Switch msbuild-mac and mmptest to use package references. (#9246)
And don't specify the solution path anymore, because we can restore using just
the csproj just fine now.
2020-07-31 15:20:50 +02:00
Rolf Bjarne Kvinge e3cb32c23b
[tests] Switch msbuild-mac to use package references. (#9245)
And don't specify the solution path anymore, because we can restore using just
the csproj just fine now.
2020-07-31 11:20:09 +02:00
Rolf Bjarne Kvinge 43102c09bf
[tests] Migrate the sample tests to use package references. (#9244) 2020-07-31 11:19:57 +02:00
Whitney Schmidt c999bd5f57
[HealthKit][Xcode12] Update beta 1 (no b2, b3 changes) (#9249)
* HealthKit updates for Xcode12
2020-07-30 16:41:38 -04:00
Rolf Bjarne Kvinge 631073dafe
[xharness] Improve restoring NuGets for Xamarin.Mac projects in the makefile by depending on the csproj files in addition to the packages.conf files. (#9242)
Packages are listed in the csproj when we're using package references.

Also only list files in git, otherwise we pick up all the generated project files as well.
2020-07-30 17:00:41 +02:00
Rolf Bjarne Kvinge 28e3e2c5b6
[tests] Migrate Xamarin.Mac template projects to use package references. (#9241) 2020-07-30 16:21:10 +02:00
Rolf Bjarne Kvinge 2e59986723
[tests] Migrate the generator tests to use package references. (#9239) 2020-07-30 16:20:39 +02:00
Rolf Bjarne Kvinge ab90bb7a95
[tests] Migrate the mtouch test project to use package references. (#9238) 2020-07-30 16:19:58 +02:00
Rolf Bjarne Kvinge d304198536
[xharness] Make restoring nugets the default for all test projects. (#9237)
But don't do it for .NET projects, since 'dotnet build' automatically restores.
2020-07-30 16:19:53 +02:00
Rolf Bjarne Kvinge 6d26688d1e
[tests] mmptest doesn't need to include MacTestMain.cs (#9236)
Because mmptest is a library, not an executable.
2020-07-30 16:19:41 +02:00
Rolf Bjarne Kvinge dc2404de51
[tests] Migrate the xtro sharpie project to use package references. (#9240)
This also bumps Mono.Cecil to the latest available version (that way we use
the same version as in other tests).
2020-07-30 16:19:08 +02:00
Alex Soto b3194f5d57
[UIKit] Update bindings to Xcode 12 Beta 3 (#9224)
* [UIKit] Update bindings to Xcode 12 Beta 3

* Update src/uikit.cs
2020-07-30 09:39:52 -04:00
Alex Soto 3107356250
[Intents] Update bindings from Xcode 12 Beta 1 to Beta 3 (#9220)
* [Intents] Update bindings from Xcode 12 Beta 1 to Beta 3

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Implement feedback

* Fix more feedback

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-30 09:36:59 -04:00
Alex Soto 4d23d42ea3
[AppKit] Update bindings to Xcode 12 Beta 3 (#9232) 2020-07-30 09:33:29 -04:00
Manuel de la Pena e821b2708a
[CoreMIDI] Add support for Xcode 12 beta 3. (#9125) 2020-07-29 16:51:45 -04:00
Sebastien Pouliot c7f6ca0506
[mediaplayer] Update for Xcode 12 beta 3 (#9214)
tvOS mostly catch up with (much older) iOS changes
2020-07-29 13:36:43 -04:00
Sebastien Pouliot e8de7afd4d
[mlcompute] New Xcode 12 framework. Up-to-date with beta 3 (#9208)
Framework not shipped for iOS/tvOS simulators - even if it's available
on macOS...

Feedback FB8132074 / https://github.com/xamarin/maccore/issues/2271
2020-07-28 20:55:28 -04:00
Whitney Schmidt 8fc88096ad
Revert "[Xcode12] HealthKit b1 update (#9152)" (#9217)
This reverts commit 74e8421f2c.
2020-07-28 14:04:31 -04:00
Whitney Schmidt 74e8421f2c
[Xcode12] HealthKit b1 update (#9152)
* HealthKit updates for beta 3
2020-07-28 14:03:56 -04:00
Rolf Bjarne Kvinge 988edad1d3
[tests] Skip 32-bit iOS tests in the simulator, because the 32-bit iOS simulator is broken. (#9201) 2020-07-28 14:19:39 +02:00
Rolf Bjarne Kvinge a3a9cf1558 [tests] Update the list of .apps to package. 2020-07-28 08:42:07 +02:00
Whitney Schmidt 0f7aa312e1
[CoreVideo][Xcode12] Update through beta 3 (#9209)
* corevideo changes
2020-07-27 19:44:37 -04:00
Whitney Schmidt 0e4749c207
[Xcode12][GameKit] Update for beta 1-2 (#9126)
* initial gamekit commit for xcode12
2020-07-27 11:12:02 -04:00
Chris Hamons b101d7e8b9
Add support for arbitrary extensions to be bundled in XI/XM apps (#9048) (#9107)
- This commit adds a hook, "AdditionalAppExtensions", to the msbuild to allow
extensions written in other languages, such as Swift, to be embedded and signed in an
Xamarin App bundle easily.
- Example:
<AdditionalAppExtensions Include="$(MSBuildProjectDirectory)/../../native">
	<Name>NativeTodayExtension</Name>
	<BuildOutput Condition="'$(Platform)' == 'iPhone'">build/Debug-iphoneos</BuildOutput>
	<BuildOutput Condition="'$(Platform)' == 'iPhoneSimulator'">build/Debug-iphonesimulator</BuildOutput>
</AdditionalAppExtensions>
2020-07-27 09:27:19 -05:00
Rolf Bjarne Kvinge 815de988d3 [xharness] If we're not generating projects in the Target class, the project path equals the template path. 2020-07-27 11:31:19 +02:00
Rolf Bjarne Kvinge b5a1251592 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-27 11:20:16 +02:00
Alex Soto 5289facd04 [xcode11.6] Bump to final version of Xcode 11.6 (#9112) 2020-07-26 18:27:06 -04:00
Alex Soto f9c2a62127 [MetalPerformanceShaders] Neural Networks Update to Xcode 11 (#8844)
* [MetalPerformanceShaders] Neural Networks Update to Xcode 11

This includes updates from PRs xamarin/xamarin-macios#6932, xamarin/xamarin-macios#6935 and xamarin/xamarin-macios#7461

It adds new functionality to the neural network components.
This is still not the complete API for 11.3

* Update src/metalperformanceshaders.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Make changes requested by @rolfbjarne

* Fix binding of default random distribution creation

The parameterless function creates new
default distributions and is not a property.
It is a counterpart of CreateUniform.

* Expose public APIs for MPSCnnConvolutionTransposeNode

These APIs are public and documented at: https://developer.apple.com/documentation/metalperformanceshaders/mpscnnconvolutiontransposenode/2942641-initwithsource?language=objc

I have also tested that they work.

* Reintroduce compat API.

* Fix acronym casing.

* Fix introspection tests.

* Fix xtro.

* One last xtro issue.

* Fix more xtro.

* Another introspection fix.

Co-authored-By: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply feedback

* Please the typo guardians

Co-authored-by: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-26 18:27:06 -04:00
Alex Soto ac42dad8de [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-26 18:27:06 -04:00
monojenkins 8c587f89a3
[generator] Add nullability `?` when [BindAs] is used with an array type (#9185)
Fix two false positives in AVFoundation.
Needed for xcode12 too (to be backported)
2020-07-25 11:30:42 -04:00
Sebastien Pouliot dd6f12bb5d
[tools][tests] Update to use macOS 11.0 (instead of 10.16) (#9188) 2020-07-24 22:03:46 -04:00
Sebastien Pouliot e47e10addf
[corebluetooth] Update for Xcode 12 beta 3 (#9186)
Apple removed the 10.16 API instead of marking them for 11.0 ?!?
2020-07-24 18:16:46 -04:00
Sebastien Pouliot 04e84477b2
[uniformtypeidentifiers] Update for Xcode 12 beta 3 (#9181) 2020-07-24 13:38:44 -04:00
Sebastien Pouliot ecedb498c7
[generator] Add nullability `?` when [BindAs] is used with an array type (#9179)
Fix two false positives in AVFoundation.
2020-07-24 11:50:26 -04:00
Sebastien Pouliot 1497988e21
[wkwebkit] Update for Xcode 12 beta 3 (#9178) 2020-07-24 11:45:47 -04:00
Rolf Bjarne Kvinge e0986916e5
[xharness] Fix how .NET projects are ignored. (#9168)
* [xharness] Fix how .NET projects are ignored.

Now they're actually ignored if .NET tests are not included.

* Fix compile error.
2020-07-24 14:56:08 +02:00
Sebastien Pouliot 142ff3127b
[xcode12] Bump for beta 3 (#9162)
* Disable iOS 32bits simulator based tests
2020-07-24 08:52:33 -04:00
Rolf Bjarne Kvinge 4a5dc20338
[dotnet] Only pass a single custom step to the linker. (#9173)
* [dotnet] Only pass a single custom step to the linker.

The linker will load the assemblies with the custom steps once per custom step
argument, which means that each step is effectively in a different assembly,
making it impossible to share state between steps.

This behavior is filed as a linker bug: https://github.com/mono/linker/issues/1314

Until this is fixed, we can just have a single step that injects all the other
steps programmatically.

* [tests] Adjust .NET tests according to new behavior.
2020-07-24 09:20:52 +02:00
Rolf Bjarne Kvinge 96034db9d1 [xharness] Fix finding Info.plist, and add some tests too. 2020-07-24 09:13:33 +02:00
Rolf Bjarne Kvinge 570a2e03a1
[test-libraries] Don't include all the dependencies in the ar archives we create. (#9167)
We only want the *.o files in the *.a archives, not the source files (*.m files).
2020-07-23 15:37:39 +02:00
Rolf Bjarne Kvinge 4a2236f7e0 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-23 15:37:06 +02:00
Rolf Bjarne Kvinge 1eb0c2cd3b [tests] Info.plists should be inside LogicalName, not Link.
This makes it possible to simplify a bit more code inside xharness as well.
2020-07-23 15:34:58 +02:00
Rolf Bjarne Kvinge 1e9ac8099e [tests] Fix mtouch test according to project file move. 2020-07-23 15:34:50 +02:00
Rolf Bjarne Kvinge 568dc5d32a
[xharness] Backport Touch.Unit fix for command line parsing. (#9165)
Apply https://github.com/spouliot/Touch.Unit/pull/78 to the duplicated file.
2020-07-23 15:32:54 +02:00
Rolf Bjarne Kvinge 4780f8b1f9
[tests] Move the aot.cs inside the mmptest directory, and remove some redundant code/files. (#9166) 2020-07-23 15:31:44 +02:00
Rolf Bjarne Kvinge 4e8219b42e
[tests] The HttpWebRequest constructors are not publicly available in .NET 5, so use WebRequest.CreateHttp instead. (#9157) 2020-07-23 08:37:45 +02:00
Rolf Bjarne Kvinge 14d95df81a
[xharness] Generate makefile targets for non-executable projects. (#9158)
It turns out some Xamarin.Mac projects are library projects (for unit tests),
and we still need to generate makefile targets for those (because we use them
to build Xamarin.Mac tests to run on older macOS bots).
2020-07-23 08:31:45 +02:00
Alex Soto 98a4c2bd60 [tests] Accommodate intro test to .NET 5 changes 2020-07-22 15:44:42 -04:00
Alex Soto 250c372cad [xcode11.6] Bump to final version of Xcode 11.6 (#9112) 2020-07-22 15:44:42 -04:00
Alex Soto 5d6b8057ed [MetalPerformanceShaders] Neural Networks Update to Xcode 11 (#8844)
* [MetalPerformanceShaders] Neural Networks Update to Xcode 11

This includes updates from PRs xamarin/xamarin-macios#6932, xamarin/xamarin-macios#6935 and xamarin/xamarin-macios#7461

It adds new functionality to the neural network components.
This is still not the complete API for 11.3

* Update src/metalperformanceshaders.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Make changes requested by @rolfbjarne

* Fix binding of default random distribution creation

The parameterless function creates new
default distributions and is not a property.
It is a counterpart of CreateUniform.

* Expose public APIs for MPSCnnConvolutionTransposeNode

These APIs are public and documented at: https://developer.apple.com/documentation/metalperformanceshaders/mpscnnconvolutiontransposenode/2942641-initwithsource?language=objc

I have also tested that they work.

* Reintroduce compat API.

* Fix acronym casing.

* Fix introspection tests.

* Fix xtro.

* One last xtro issue.

* Fix more xtro.

* Another introspection fix.

Co-authored-By: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply suggestions from code review

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Apply feedback

* Please the typo guardians

Co-authored-by: Frank A. Krueger <fak@praeclarum.org>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-22 15:44:42 -04:00
Alex Soto 10059f1add [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-22 15:44:42 -04:00
Sebastien Pouliot 038db0fa51
[metrickit] Update for Xcode 12 beta 2 (#9151) 2020-07-22 13:32:06 -04:00
Sebastien Pouliot 52e51bccfc
[corewlan] Update for Xcode 12 beta 2 (#9156) 2020-07-22 13:30:47 -04:00
Rolf Bjarne Kvinge 7fab4abf96
[xharness] Allow for null environment variables to mlaunch. (#9140)
It's a valid scenario to set a null environment variable.

This happens when changing InCI to always return true (to test locally what's
done on the bots), in which case we try to forward BUILD_REVISION to mlaunch,
but BUILD_REVISION isn't necessarily set. Not forwarding it to mlaunch should
not cause problems in most tests, so just allow this scenario.
2020-07-22 18:13:17 +02:00
Rolf Bjarne Kvinge 3efc9baced [tests][mtouch] Update after bindings-test.csproj move.
Also remove an unused property.
2020-07-22 14:26:45 +02:00
Rolf Bjarne Kvinge 1867b421e6 [tests] Improve exception message a little bit. 2020-07-22 14:25:47 +02:00
Rolf Bjarne Kvinge bdada6e21b Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-22 10:36:23 +02:00
Rolf Bjarne Kvinge 554845905a [xharness] Remove a redundant ToArray. 2020-07-22 10:35:36 +02:00
Rolf Bjarne Kvinge e47a995797 [tests] Set the correct mono-native link mode and flavor defines in the csproj itself.
This makes it possible to simplify a lot of C# code.
2020-07-22 10:33:03 +02:00
Rolf Bjarne Kvinge 12b30b709f [tests] Fix path to AssemblyOriginatorKeyFile in bindings-test.csproj. 2020-07-22 09:06:49 +02:00
Rolf Bjarne Kvinge 9cfe57bffa
[xharness] Fix logic to not create makefile targets to run BCL tests. (#9148)
According to the existing code, we're already not supposed to create makefile
targets for BCL tests. However, the code to detect BCL tests wasn't quite
reliable, so we ended up creating makefile targets for some BCL tests.

So always use the same logic to detect BCL tests.

Also remove a lot of dead code to generate makefile code for BCL tests.
2020-07-22 08:28:38 +02:00
Rolf Bjarne Kvinge 35c44e82fc
[xharness] Fix compiler warning. (#9147) 2020-07-22 08:28:08 +02:00
Sebastien Pouliot 5cdfa2ebd6
[devicecheck] Update for Xcode 12 beta 2 (#9145) 2020-07-21 19:21:18 -04:00
Sebastien Pouliot f36b2ae7b8
[sensorkit] Update for Xcode 12 beta 2 (#9142) 2020-07-21 13:12:51 -04:00
Rolf Bjarne Kvinge cff47214ec [tests] Move bindings-test[-mac].csproj to their own directory. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 6d26599997 [xharness] Simplify the MonoNativeInfo class a bit by removing the custom Mac-specific subclass (there's almost no difference anymore). 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 5fa43d073e [tests] Put the iOS and macOS mono-native templates in their own directory.
This makes it possible to remove a few conditions in the code.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge f2d9764123 [xharness] Make the BCL project generation generate each project file into its own subdirectory. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 52c56933dc [xharness] Make the templates path an input parameter for the BCL templates. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge ca0885b33e [xharness] Add a TestPlatform value to TestProject, and use it to indicate that a TestProject might be of a specific platform already. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 6a59d2b87b [xharness] Don't generate variations for BCL projects using the normal procedure, we generate them differently already.
This makes it possible to remove some dead code.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge e3fdcf59ca [xharness] Add support for specifying whether variations should be generated for Xamarin.iOS projects. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge a510af6078 [xharness] Make ProjectFileExtensions.GetInfoPListInclude a bit clearer.
Add a comment to document what's supposed to happen, and simplify the code a little bit.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge cbe780d734 [xharness] Store attribute in local variable instead of fetching it twice. 2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 1c52a14566 [xharness] Remove a lot of special-casing for the mono-native tests.
It's not needed anymore.
2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 8e6e17ea89 [xharness] Generate projects into a subdirectory for each project.
Because it's cumbersome to keep the build working when the same directory has
multiple project files.
2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge ba61b68f11 [xharness] Document the test loading process a little bit. 2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 4a10ba51db
[xharness] Generate BCL projects asynchronously. (#9083)
Split the BCL project generation in two: one part that figures out which
projects to generate, and which is done synchronously (because we need it to
compute the list of tests), then split out the actual generation and run it on
a background thread (since that doesn't have to happen until we want to
execute those tests).

This speeds up launching xharness in server mode significantly (from ~2s to
~0.2s).
2020-07-21 17:14:36 +02:00
Rolf Bjarne Kvinge cd0cca50c8
[tests] Remove the mono-native CheckSymbols test. (#9138)
It's running into different behavior between OS versions, and it's getting
time-consuming and annoying to keep up with the changes.

So instead just remove the test, because as far as I can see it's not testing
something important anyway (we don't care exactly which library provides the
'mono_native_initialize' function, the important part is that it's callable,
which we already test elsewhere).
2020-07-21 14:49:05 +02:00
Rolf Bjarne Kvinge f9fbf56544
[xharness] Disable default inclusion behavior for the introspection .NET tests. (#9137)
It gets too annoying to keep track of which files are where with the project
cloning we're doing, if files are implicitly included.
2020-07-21 14:48:52 +02:00
Sebastien Pouliot 819acdaad3
[mediaplayer] Update for Xcode 12 beta 2 (#9136) 2020-07-21 08:45:38 -04:00
Rolf Bjarne Kvinge 7d47d8742d
[xharness] Don't generate into the same directory/files for macOS Modern and macOS Full. (#9121)
* [xharness] Don't generate into the same directory/files for macOS Modern and macOS Full.

This meant that we were overwriting some generated files, which meant that we
were executing the Modern set of tests instead of the Full set of tests for at
least some configurations.

* Add a few ignored tests to the System.Configuration test now that we actually run it.
2020-07-21 13:15:14 +02:00