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

563 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena 01d11263b9
[Tests] Ignore tests that fail on VMs (#11524)
There are a number of tests that do not work on VMs yet our older
machines are using virtualization. Ignore those tests since we cannot
assert if they work or not.

fixes: https://github.com/xamarin/maccore/issues/2438
2021-05-13 08:41:07 -04:00
Manuel de la Pena 289b095313
[Tests] Allow to assert on device and not vm on macOS. (#11508) 2021-05-12 11:09:35 -04:00
Rolf Bjarne Kvinge 0924ce55ef
Remove dead code. (#11289) 2021-04-22 16:03:05 +02:00
Sebastien Pouliot bbee8a0a57
[tests][link all] Fix nunit silent exception causing some tests not to be enabled (#11287)
This exposed a few tests that are failing on dotnet (adjusted or fixed)
Also fix a typo in an exception message in `src/ObjCRuntime/PlatformAvailability.cs`
and a build warning in `tests/common/TestRuntime.cs`

Fix part of https://github.com/xamarin/xamarin-macios/issues/11243
And allows enabling the tvOS/dotnet link all tests
2021-04-22 09:14:33 -04:00
Sebastien Pouliot 05aa0c8aa8
[tests][introspection] Report error if no version is present in [SupportedOSPlatformAttribute] (#11193)
Otherwise a `[SupportedOSPlatformAttribute ("ios12,3")]` (should be a
dot, not a comma) would throw a `NullReferenceException` making it
harder to track down the error
2021-04-12 14:56:06 -04:00
Sebastien Pouliot 4e48aa2ae1
[generator][dotnet] Add support for `[Uns|S]upportedOSPlatformAttribute` (#10580)
This moves our current/legacy attributes to the ones added in dotnet 5 [1].

Short Forms (only in bindings)

| Old                                   | New                                 |
|---------------------------------------|-------------------------------------|
| [iOS (7,0)]                           | [SupportedOSPlatform ("ios7.0")]    |
| [NoIOS]                               | [UnsupportedOSPlatform ("ios")]     |

Long Forms

| Old                                   | New                                 |
|---------------------------------------|-------------------------------------|
| [Introduced (PlatformName.iOS, 7,0)]  | [SupportedOSPlatform ("ios7.0")]    |
| [Obsoleted (PlatformName.iOS, 12,1)]  | [Obsolete (...)]                    |
| [Deprecated (PlatformName.iOS, 14,3)] | [UnsupportedOSPlatform ("ios14.3")] |
| [Unavailable (PlatformName.iOS)]      | [UnsupportedOSPlatform ("ios")]     |

Other changes

* `[SupportedOSPlatform]` and `[UnsupportedOSPlatform]` are not allowed on `interface` [2] which means they cannot be used for protocols. This is currently handled by inlining the existing attributes on all members.
* `[ObsoletedInOSPlatform]` was removed in net5 RC. This PR is now mapping the existing attributes to `[Obsolote]`, however multiple ones cannot be added so they need to be platform specific.

Remaining work (manual bindings update) tracked in https://github.com/xamarin/xamarin-macios/issues/11055

References

* [1] https://github.com/xamarin/xamarin-macios/issues/10170
* [2] https://github.com/dotnet/runtime/issues/47599
* [3] https://github.com/dotnet/runtime/issues/47601
2021-04-10 11:09:14 -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 2b499743c6 [monotouch-tests] Ignore CheckAddressBookPermission for MacCat 2021-04-07 12:55:04 -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 048a8affe3 [tests] Fix bad merge 2021-04-02 22:33:00 -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
VS MobileTools Engineering Service 2 9f4390cc65
[xcode12.5] Link FrameworkList.xml to a place where MSBuild SDK actually expects it (#10955)
* Link FrameworkList.xml to a place where MSBuild SDK actually expects it

* Create necessary directories

* Fix symlinks for packaging

* Add test case

* Minor tweak to test case

* Fix cut & paste error

Co-authored-by: Filip Navara <navara@emclient.com>
2021-03-26 07:21:50 -04:00
Alex Soto 9c791dcd07
[mono] Bump mono to bring iOS binaries built with xcode12.4 (#10943)
* [mono] Bump mono to bring iOS binaries built with xcode12.4

Also bumping system mono pkg to the one that contains arm64 support

New commits in mono/mono:

* mono/mono@eb4c3116eb Build iOS SDK archives on Xcode 12.4
* mono/mono@acb8d8ed6f [2020-02][marshal] Fix VARIANT and BSTR marshaling in structs (#20918)

Diff: be9218f4d1..eb4c3116eb

* [mtouch] fix version logic check

Fixes Unexpected minOS version (expected 8.0.0, found 7.0.0) in MonoTouch.iphonesimulator.sdk/lib/libmono-native-compat.dylib ()

we really only care if it is over the version we expect not below.

* Fix version test
2021-03-24 17:34:30 -04:00
Rolf Bjarne Kvinge b30777f420
Bump to .NET 6.0.100-preview.3.21161.23 (#10772)
* Bump to .NET 6.0.100-preview.3.21152.10

* Bump to 6.0.100-preview.3.21152.10.

* Bump to 6.0.100-preview.3.21161.7.

* Bump to .NET 6.0.100-preview.3.21161.23.

* [dotnet-linker] Bump ILink and use the supported method of getting an assembly's location.

* Bump to MSBuild.StructuredLogger 2.1.364 to get support for newer binlog versions.

* Fix build failure

Fixes:

    TestHelpers/BuildEngine.cs(161,24): error CS0433: The type 'ProjectEvaluationFinishedEventArgs' exists in both 'Microsoft.Build.Framework, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' and 'StructuredLogger, Version=2.1.0.0, Culture=neutral, PublicKeyToken=d4c7181801cb6448' [/Users/builder/azdo/_work/1/s/xamarin-macios/tests/msbuild/Xamarin.MacDev.Tests/Xamarin.MacDev.Tests.csproj]

* Update parsing binlog properties.

* Be more defensive.

* [tests] Make sure the InternalsVisibleToAttribute constructor isn't linked away.

* [tests] Implement better printing of binlogs.

The latest MSBuild.StructuredLogger made some internal changes to the Message
property which confuses some of our test logic. So implement manual printing
of the log entries that we care about to make sure they conform to the
expected format by the tests (the output is mimicing what 'msbuild /v:diag
foo.binlog' would show).
2021-03-24 16:59:33 +01:00
Filip Navara 85dd54db29
Link FrameworkList.xml to a place where MSBuild SDK actually expects it (#10928)
The [SDK conflict resolution code](3c1307d227/src/Tasks/Common/src/ConflictResolution/ResolvePackageFileConflicts.cs (L54-L57)) expects the FrameworkList.xml file to be located in `$(TargetFrameworkDirectory)/RedistList/FrameworkList.xml`.

Fixes https://github.com/dotnet/runtime/issues/49211
Fixes https://github.com/dotnet/runtime/issues/49940
Fixes https://github.com/dotnet/runtime/issues/49477
Fixes https://github.com/xamarin/xamarin-macios/issues/10912
Fixes https://github.com/xamarin/xamarin-macios/issues/10839
Fixes https://github.com/xamarin/xamarin-macios/issues/10548
Fixes https://github.com/xamarin/xamarin-macios/issues/10592
Fixes https://github.com/mono/mono/issues/20805
Fixes https://github.com/mono/mono/issues/20894
2021-03-24 09:31:15 +01:00
mathieubourgeois a921ee2fb1
Xamarin.Mac native Apple Silicon targetting support (#10115)
* Add support for Xamarin.Mac arm64

* Add compile product definition task

Xamarin.Mac can be provided with a ProductDefinition file for the generated pkg. Normally, providing a product definition was optional. However, with Apple Silicon, we have an extra issue : `productbuild` needs to know what architectures your package target. If not provided with them, it will guess to the best of its abilities. However, on Catalina and lower, the guess is x86_64, even if you have an arm64 slice. To fix this, we add a new task to compile the product definition and use this file to create the pkg. If you provide your own Product Definition, we can check and warn if the architectures don't match what we expect. If the file doesn't exist or there is no architecture, we set it ourselves based on our target architectures.

* Don't reference dynamic objC_send on arm64

When building in debug, we currently try to link dynamic objC_send symbols when targeting a 64-bit architecture. However, this is actually only defined on Intel architectures, not on arm64, so we end up failing because we're referring symbols that don't exist. Rework the `GetRequiredSymbols` to take an abi, and tag those symbols to only be valid on i386/x86_64, so they don't get referred at all when building on arm64, but still get referred in x86_64.

* Fix improper delete/move with already existing directories

* Fix stret requirement for Xamarin.Mac in arm64.

The generator supposes that we're running in x64 mode, refactor to take into account the possibility of running in arm64.

* Implement OS version generation in Product.plist, based on MinimumSystemVersion of the app

* Re-generalize some mmp registrar rules

`Microsoft.macOS.registrar` was missed by the current rule set

* Fix mmp tests

* Set E7072 as not translated

Tests were failing otherwise

* Rename Xamarin.Mac lib/x86_64 folder to 64bits (currently all targeted archs are the same)

* Fix style issues

* Fix `ToLower` usage for invariant usage

* Fix xtro-sharpie test
2021-03-17 21:48:02 -04:00
Rolf Bjarne Kvinge 3f018eedb6
[tests] Don't forcefully exit macOS tests. (#10844)
* [tests] Don't forcefully exit macOS tests.

Instead give the process a chance to exist (3 seconds), before we take drastic
measures.

* Bump Touch.Unit.

New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@f19eb45 [TouchRunner] Try to make MacRunner exit nicely. (#100)

Diff: a33e0c3f2e..f19eb45cb6

* It looks like mono from 2020-02 doesn't want to exit no matter what, so limit this to .NET.
2021-03-17 18:46:29 +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
Rolf Bjarne Kvinge bf7c3268bc
[dotnet] Use the reference assemblies from the .NET 6 version we're referencing. (#10813) 2021-03-09 14:57:56 +01:00
Rolf Bjarne Kvinge 913b612d6d [tests] Add unit tests for Mac Catalyst on .NET 6. 2021-02-23 07:59:13 +01:00
Rolf Bjarne Kvinge b8d98a499c
[dotnet] Disable watchOS. (#10625)
* [dotnet] Disable watchOS.

* [tests] Ignore watchOS tests when the watchOS build is disabled.
2021-02-12 21:52:27 +01: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 506b4f1b30 Fix boolean logic (or not!?) 2021-01-29 19:01:00 +01:00
Rolf Bjarne Kvinge 37ab334489 [tests] Adjust TestRuntime.RequestEventStorePermission to work on Mac Catalyst. 2021-01-29 11:00:14 +01:00
Rolf Bjarne Kvinge 4a734d0673 [tests] Adjust TestRuntime.Check*SystemVersion according to how version checks are done on Mac Catalyst now. 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 a867cf4b4f
[tests] Fix reporting exit code for .NET tests. (#10460) 2021-01-19 14:30:16 +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 48080d2d03
[monotouch-test] Add version checks for new HKCategoryTypeIdentifier fields. (#10424) 2021-01-15 08:24:29 +01:00
Rolf Bjarne Kvinge 734c120bb0
[tests] Add a Xamarin.Forms test project using Mac Catalyst. (#10319) 2020-12-18 22:16:51 +01:00
Rolf Bjarne Kvinge daa7e123e2
Add very early support for Mac Catalyst. (#10199)
* Install the Mac Catalyst versions of the mono libraries and BCL.
   * The BCL is the same as the one for Xamarin.iOS, which means it has to be post-processed a bit to work with a Xamarin.MacCatalyst.dll
* Build our runtime for Mac Catalyst.
* Build a Xamarin.MacCatalyst.dll with the Mac Catalyst API (it compiles, but I haven't looked at the API surface at all). This PR assumes we're going to have a new TargetFrameworkIdentifier for Mac Catalyst, but a final decision has not been made (see https://github.com/dotnet/runtime/issues/44882), so this may change.
* Build a Xamarin.iOS.dll that contains type forwarders to Mac Catalyst for all the types that exist in both Mac Catalyst and Xamarin.iOS.
* Add support to xharness for running introspection on Mac Catalyst (there are a lot of failures because the API surface is wrong)
* Add support to our msbuild tasks and mtouch for building Mac Catalyst apps. This basically comes down to adding a new case in numerous places to either do things the iOS way or the macOS way, depending on each case.
* Add a __MACCATALYST__ define (which is in addition to the __IOS__ define).
2020-12-04 18:27:37 +01:00
Rolf Bjarne Kvinge 9e20285ebb
[tests] Merge the msbuild-mac tests into the Xamarin.MacDev.Tests project. (#10129) 2020-12-04 13:05:51 +01:00
Rolf Bjarne Kvinge b36b02c80e
[tests] Remove the MM0143 test, it doesn't look like VSMac is going to fix the bug. Fixes #8939. (#10183)
* [tests] Skip the MM0143 test, it doesn't look like VSMac is going to fix the bug. Fixes #8939.

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

* Remove more code.
2020-12-03 16:59:14 +01:00
Rolf Bjarne Kvinge 9edb9e2885 [tests] Add test project 2020-12-03 10:42:25 +01:00
Rolf Bjarne Kvinge a4a1fea868
[dotnet] Add an issue for a missing Mono.framework, which isn't on us for now. (#10126) 2020-11-23 09:44:03 +01:00
Rolf Bjarne Kvinge f4c9327fac
[dotnet] Bump to .NET 6.0.100-alpha.1.20556.2 and net6.0 (#10079)
This involves a few changes:

* Change everything to reference net6.0 instead of net5.0
* Update various variables to be NET6* instead of NET5*
* Reorder build logic to account for that our targets are imported earlier in
  the build process:

   In the latest .NET 6, our Workloads.targets is imported earlier in the
   build. This requires a few changes, because we still need to run most of
   our logic later in the process, which we do by adding targets files we
   want imported later to the AfterMicrosoftNETSdkTargets property.

   What we're loading as soon as possible:

   * Our version information (Xamarin.Shared.Sdk.Versions.targets)
   * The supported OS versions
     (Microsoft.<platform>.Sdk.SupportedTargetPlatforms.targets)
   * The default OS version
     (Xamarin.Shared.Sdk.TargetFrameworkInference.targets).

   This is all information that the .NET build require early on.

   Changes:

   * Rename all files that are loaded early to *.props.
   * Updated documentations to reflect these changes.
   * Remove Microsoft.<platform>.TargetFrameworkInference.targets, these
     files aren't used and don't contain anything useful.
   * Move the logic to calculate _ComputedTargetFrameworkMoniker has been
     delayed to later, because it needs TargetFrameworkMoniker set.

* Add a StoreAttributesStep to store attributes that are removed by the
  linker, but that the static registrar needs.

   In particular, in .NET 6 the linker removes the
   System.Runtime.CompilerServices.ExtensionAttribute, which the static
   registrar needs to handle category methods properly.

   This involved copying and slightly modifying the RemoveAttributesBase
   code.
2020-11-19 15:01:55 +01:00
Manuel de la Pena 0f7bc75e50 Merge branch 'xcode12.2' into main-xcode12.2 2020-11-17 11:09:15 -05:00
Rolf Bjarne Kvinge 5792c497d9 Merge remote-tracking branch 'origin/main' into dotnet-6.0.100-alpha.1.20559.4 2020-11-16 15:33:26 +01:00
Sebastien Pouliot d4fb41b172
[tests] Update framework tests not to embed/zip the native binaries (#10073)
Manually added `NoBindingEmbedding` to bindings .csproj and removed
`[LinkWith]` attributes.

Also added support for NativeReference to harness and updated the
workaround for watchOS (since it can't link against ModelIO)

Fixed/adapted unit tests wrt change
2020-11-11 12:00:48 -05:00
Rolf Bjarne Kvinge d6756f4829 Merge remote-tracking branch 'origin/main' into dotnet-6.0.100-alpha.1.20559.4 2020-11-11 16:38:15 +01:00
Rolf Bjarne Kvinge bbc81dd80c
[dotnet] We're not doing anything with regards to the http handler, so we won't have a runtime-options.plist. (#10083) 2020-11-11 07:43:49 +01:00
Rolf Bjarne Kvinge db23ca881a
[dotnet] Add _CreateDebugSettings, _CreateDebugConfiguration and _CreatePkgInfo to the targets we run on app creation. (#10061) 2020-11-10 13:44:26 +01:00
Rolf Bjarne Kvinge c640775699 [dotnet] Bump to .NET 6.0.100-alpha.1.20556.2. and net6.0
New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@f8768d9 Advance into the world of net6.0

Diff: 9abe69e6f5..f8768d99ef
2020-11-10 11:41:06 +01:00
Rolf Bjarne Kvinge 0def89604d
[msbuild] Add Metal files to our items included by default. (#10049) 2020-11-05 15:36:36 +01:00
Rolf Bjarne Kvinge 8aa53ba943
[dotnet] Add app extension targets to our list of stuff to do during the build. (#10044)
That makes app extensions build in dotnet.

This required adding a RuntimeIdentifier property to all the extension test
projects.
2020-11-05 08:34:29 +01:00
Rolf Bjarne Kvinge 1c6cd0b439
[tests] Re-enable the ReleaseBuild.RebuildTest, since we're using msbuild exclusively now. (#10041)
This test also required a few changes to pass.
2020-11-05 08:24:50 +01:00
Rolf Bjarne Kvinge e7dd367125
[msbuild] Add CoreML models to our items included by default. (#10038) 2020-11-04 16:01:43 +01:00
Rolf Bjarne Kvinge 781bc851a5
[dotnet] Add atlas textures to the our items included by default. (#9995) 2020-11-04 08:40:16 +01:00
Rolf Bjarne Kvinge d104a660ed
[tests] Update .NET unit tests to parse the binlog. (#10031)
Update the .NET unit tests to parse the binlog instead of standard output for
specific build output, since we're not printing a diagnostic build log to
standard output anymore.

This fixes numerous test failures in the .NET unit tests:

    * Xamarin.Tests.DotNetProjectTest.BuildBindingsTest("watchOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildBundledResources("iOS","monotouch"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildEmbeddedResourcesTest("iOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildBundledResources("watchOS","monotouch"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildBindingsTest2("tvOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildBindingsTest("tvOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildBindingsTest("iOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildBundledResources("tvOS","monotouch"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildMyTVApp: Linker did not executed as expected.
        Expected: String containing "Building target "_RunILLink" completely."
        But was: "Microsoft (R) Build Engine version 16.8.0-preview-20475-05+aed5e7ed0 for .NET [...]"

    * Xamarin.Tests.DotNetProjectTest.BuildMySingleView: Linker did not executed as expected.
        Expected: String containing "Building target "_RunILLink" completely."
        But was: "Microsoft (R) Build Engine version 16.8.0-preview-20475-05+aed5e7ed0 for .NET [...]"

    * Xamarin.Tests.DotNetProjectTest.BuildInterdependentBindingProjects("iOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildEmbeddedResourcesTest("tvOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildBindingsTest2("watchOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildFSharpLibraryTest("tvOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildFSharpLibraryTest("watchOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildEmbeddedResourcesTest("watchOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildBindingsTest2("iOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildInterdependentBindingProjects("tvOS"): Assemblies
        Expected: not <empty>
        But was: <empty>

    * Xamarin.Tests.DotNetProjectTest.BuildFSharpLibraryTest("iOS"): Assemblies
        Expected: not <empty>
        But was: <empty>
2020-11-03 18:20:33 +01:00
Rolf Bjarne Kvinge 69a171abff [tests] Clean up Xamarin.MacDev.Tests.
This is a pretty big refactoring, which:

* Always copies the test projects to a temporary directory before running any tests
  that use them.
* Runs all the tests using an out-of-process MSBuild instance.
* Logs to a binlog instead of writing text to stdout.
* Refactors all the code that used the MSBuild assemblies in memory to instead:
    * Tests that modified projects in memory now modifies them on disk instead. This
      won't affect the working copy because the tests are always working with a copy
      of the test projects.
    * Tests that inspected projects in memory afterwards now parses the binlog to get
      the same information.
* Significantly simplified the code to setup the test projects for testing.
2020-10-29 14:52:31 +01:00
Rolf Bjarne Kvinge 62af8c3fd9 [tests] Use binlog instead of text logs 2020-10-29 09:53:06 +01:00
Rolf Bjarne Kvinge 8f2913b518
[dotnet] Add asset catalogs to the our items included by default. (#9841) 2020-10-29 09:18:20 +01:00
Rolf Bjarne Kvinge c72b320561
[tests] Set MSBuildEnableWorkloadResolver=true when running the .NET tests. (#9977)
This works fine when executed from xharness, because
MSBuildEnableWorkloadResolver is set by xharness, but without this the dotnet
tests fail when executed from the IDE.
2020-10-28 08:12:19 +01:00
Alex Soto 9d1988a3c8
[tests][xcode12.2] Fix xammac tests (#9935)
* [tests][xcode12.2] Fix xammac tests

* Update tests/common/TestRuntime.cs

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

* [xammac] Avoid multiple #if statements

* [xammac] Fix missing cases amd reduce amount of changes

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-10-21 17:12:48 -04:00
Manuel de la Pena 00e25199ae [Main] Bring Xcode12.1 support. 2020-10-20 17:55:31 -04:00
Sebastien Pouliot b7254af791
[xcode12.2][coregraphics] Update availability wrt Xcode 12.1 GM (#9898) 2020-10-16 18:12:05 -04:00
Rolf Bjarne Kvinge 062352ccae [tests] Use 'Microsoft.NET.Sdk' instead of 'Microsoft.<platform>.Sdk'. 2020-10-16 14:27:57 +02:00
Sebastien Pouliot e358d75863
[coregraphics] Update for Xcode 12.1 GM (#9880)
Backport of PR#9828 (xcode12.2) with availability changes.

No need to merge it back into `xcode12.2` (it would conflict) but another
PR will be needed to change `[iOS (14,2)]` to `[iOS (14,1)]` on the new
API

Co-authored-by: Alex Soto <alex@alexsoto.me>
2020-10-15 20:11:54 -04:00
Alex Soto dff6934850
[xcode12.2] Initial commit for Xcode 12.2 Beta 3 (#9877)
* [xcode12.2] Initial commit for Xcode 12.2 Beta 3

* Update iOSApiCtorInitTest.cs

* Fix watchOS check on intro for AVSpeechSynthesisVoice

* Update iOSApiCtorInitTest.cs

* Update iOSApiCtorInitTest.cs
2020-10-15 12:08:27 -04:00
Rolf Bjarne Kvinge 86cb7468b9
[tests] Fix ignoring dotnet tests when certain platforms have been disabled. (#9851)
Fixes an issue where some of the non-macOS dotnet tests where ignored because
the logic to disable the macOS ones were incorrect.
2020-10-13 17:55:20 +02:00
Rolf Bjarne Kvinge 54a553a900
[dotnet] Add storyboards and xibs to the our items included by default. (#9834) 2020-10-09 18:24:45 +02:00
Rolf Bjarne Kvinge 9ade64930f
[msbuild] Move all the msbuild tests to tests/msbuild to put all the tests together. (#9824)
* [msbuild] Move msbuild/tests to tests/msbuild to put all the tests together.

* [tests] Move test projects for Xamarin.Mac to tests/common/TestProjects

* [tests] Move test projects for Xamarin.iOS to tests/common/TestProjects
2020-10-09 16:06:19 +02:00
Rolf Bjarne Kvinge 4b5be94592
[msbuild] Add SceneKit assets to our items included by default. (#9798)
* [msbuild] Add SceneKit assets to our items included by default.

There's a minor wrinkle here: we need to calculate the virtual path of the
SceneKit items (relative to the project), but for items included by default
their defining project is not the user's project, but our
Xamarin.Shared.Sdk.DefaultItems.targets file.

The solution is to add metadata for items included by default
('IsDefaultItem'), and if that's found when we calculate the virtual path, use
the executable project to calculate the virtual path, instead of the project
that defined the SceneKit items.

* [msbuild] Use a different temporary directory based on the platform.
2020-10-09 08:31:52 +02:00
Rolf Bjarne Kvinge dd97579e3a
[msbuild] Share the *CompileCoreMLModels targets between Xamarin.iOS and Xamarin.Mac. (#9792)
Xamarin.Mac didn't have support for CoreML models before, so this effectively adds
support for CoreML models to Xamarin.Mac.

Also add a test to make sure it actually works.
2020-10-07 08:42:17 +02:00
Alex Soto 5deee9ea95
[xcode12.2] Initial bump to Xcode 12.2 Beta 2 (#9730)
* [xcode12.2] Initial bump to Xcode 12.2 Beta 2

* Add tvOS specific checks for exact Xcode check
2020-10-02 18:33:38 -04:00
Rolf Bjarne Kvinge 82be630003
[tests] Set the build environment when cleaning project as well in the mac msbuild tests. (#9739)
This way we don't depend on having a system install of Xamarin.Mac.
2020-10-01 08:42:05 +02:00
Rolf Bjarne Kvinge 8876444586
[msbuild] Share the _*CompileSceneKitAssets targets between Xamarin.iOS and Xamarin.Mac. (#9735)
The Xamarin.iOS version is more updated, so that's the version now for both
Xamarin.iOS and Xamarin.Mac:

* The iOS version contains Inputs/Outputs (important for incremental builds).
* It doesn't use FileWrites (see e97d69b25c why
  this was removed for iOS)

Additionally define the _SceneKitCache variable for macOS as well, previously
it was only defined for iOS (I'm adding more variables than just
_SceneKitCache to macOS, most of the others will be used in in macOS in
upcoming pull requests, and this way turned out to be simplest).

And also add a new Xamarin.Mac test that exercises the CompileSceneKitAssets targets.
2020-10-01 08:37:52 +02:00
Rolf Bjarne Kvinge 24795d1306
[tests] Simplify ProjectTestHelpers.FindRootDirectory by re-using existing code. (#9734) 2020-09-30 19:12:54 +02:00
Rolf Bjarne Kvinge f4832392d7
[tests] Remove duplicated code to set the requirement environment variables for building locally. (#9733) 2020-09-30 19:09:55 +02:00
Rolf Bjarne Kvinge fa58a24161
[msbuild] Port the test projects to .NET, and add a test case that compares the built .app (#9706)
Port the iOS/tvOS/watchOS msbuild test projects to .NET, and add a unit test
that builds both the old-style and new-style test projects and compares the
output in the resulting .app directories.

There are many expected differences in the apps, those will be ignored during
the comparison.

There are also numerous features that are not implemented yet in .NET, with
the corresponding adjustments in the comparison logic (they show up as TODO in
the code), these TODOs will be removed as features are implemented in the .NET
build.

There are a couple of test projects that can't be compared yet, because they
just don't build yet. Those are also TODOs.
2020-09-29 08:44:08 +02:00
Manuel de la Pena 764734d20a
[Main][Xcode12] Add support for Xcode 12 2020-09-25 12:58:29 -04:00
Rolf Bjarne Kvinge 22fe547944
[tests] Make the .NET bgen tests actually reference the .NET BCL. (#9693)
Make the bgen tests pass in the path to the attribute library, platform
assembly and all the .NET reference assemblies to bgen. This way we execute
these tests using the .NET version of everything.
2020-09-24 14:57:05 +02:00
Manuel de la Pena dcb0c93ab0 [Xcode12] Bring xcode 12 changes into main. 2020-09-23 16:05:22 -04:00
Rolf Bjarne Kvinge 8bda9174fd
Bump to Xcode 12.2 beta 1. (#9665)
* Bump to Xcode 12.2 beta 1.

* [tests] Fix xtro and intro

* Fix wrong availability

* Fix monotouch tests

* Disable watchOS tests and bump iOS version to the right one

watchOS tests have been disabled because Xcode 12.2 Beta is
broken, you cannot create a watch app and deploy, Xcode just
crashes when you try to list simulators, If you try to use
our tools at the moment of deploying we get:

> error HE0046: Failed to install the app 'app' on the device 'watchOS 7.1 (18R5552f) - Apple Watch Series 6 - 44mm': Unable To Install ???app???

* Fix macOS check and bump both versions to satisfy commit distance check, luckily we have infinite numbers!!

Co-authored-by: Alex Soto <alex@alexsoto.me>
2020-09-23 08:11:26 -04:00
Manuel de la Pena eb9b690fe0 Merge xcode12 into d16-8. 2020-09-18 17:51:52 -04: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 85b50a0347 Merge remote-tracking branch 'origin/main' into HEAD 2020-08-04 10:39:46 +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 ba76910dc2 [tests] Delete MacTestMain.cs, it's not used anymore. 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 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 28e3e2c5b6
[tests] Migrate Xamarin.Mac template projects to use package references. (#9241) 2020-07-30 16:21:10 +02: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
Alex Soto ac42dad8de [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-26 18:27:06 -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
Rolf Bjarne Kvinge 4a2236f7e0 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-23 15:37:06 +02:00
Alex Soto 10059f1add [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-22 15:44:42 -04:00
Rolf Bjarne Kvinge 1867b421e6 [tests] Improve exception message a little bit. 2020-07-22 14:25:47 +02:00
Alex Soto 772e6518e6 [xcode11.6] Initial bump to support Xcode 11.6 Beta 1 2020-07-18 18:19:53 -04:00
Chris Hamons 5657a63539
Add support for arbitrary extensions to be bundled in XI/XM apps (#9048)
- 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-16 10:13:15 -05:00
Rolf Bjarne Kvinge 85f0424a55 [tests] AppDomain.DefineDynamicAssembly doesn't exist in .NET, so exclude it from the build. 2020-06-30 18:41:20 +02:00
Sebastien Pouliot f427b5e91d
[xcode12] Bump for beta 1 (#8935)
Known issues https://github.com/xamarin/xamarin-macios/issues/8943
2020-06-26 14:02:44 -04:00
Rolf Bjarne Kvinge c3bcfac582
Unify code for executing processes. (#8848)
* Create a simple Xamarin.Utils.Execution class that can handle all our
  process execution needs:
    * Captures or streams stdout/stderr (in UTF8).
    * Supports async
    * Supports a timeout
    * Does not depend on any other source file we have, only uses BCL API.
* Have the execution helper classes from mtouch/mmp
  (Xamarin.BundlerDriver.RunCommand) and the tests
  (Xamarin.Tests.ExecutionHelper) use this new class.
* Some simplifications were made:
    * All API that took a string array for the environment now takes a
      Dictionary<string, string>.
    * The Driver.RunCommand methods were split out to a separate file. This
      file also contains a Verbosity field, which is conditioned on not being
      in mtouch nor mmp, which makes including this file from other projects
      simpler (such as bgen - in particular bgen was modified to use this
      Verbosity field instead of its own).
2020-06-18 12:34:07 +02:00
Rolf Bjarne Kvinge 6ced972a68
[msbuild] Add a GetMinimumOSVersion target that reads the app manifest and outputs the MinimumOSVersion. (#8858)
This makes it possible for several other tasks to take the MinimumOSVersion as
direct input, instead of the app manifest's path. Previously the app manifest
(Info.plist) was loaded and parsed in each task, slightly differently in each
place, and in addition there are differences between macOS and other
platforms, which made it even worse. This code refactoring also made it
possible to remove an error code which wasn't necessary anymore.

This task also computes the default MinimumOSVersion if none is specified in
the app manifest.

There is one breaking change: a library project could previously specify an
inexistent Info.plist, and it would build fine. This will now result in a
"Error loading 'Info.plist': File not found" error. This is trivial to fix:
just remove the Info.plist from the project file (or an alternative solution
could be to condition the inclusion of the Info.plist in the project file on
the existence of the Info.plist).

New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@a1bc6f3 [Xamarin.MacDev] Split IAppleSdkVersion.TryParse in two methods. (#73)

Diff: 45c5a680e2..a1bc6f39b3
2020-06-16 17:40:04 +02:00
Rolf Bjarne Kvinge 75341a9f20
[msbuild/tests] Set MSBUILD_EXE_PATH when running unit tests from within VS. Fixes #5042. (#8846)
Also fix several tests to work when executed from within VS due to some difference

There's also a change to the MtouchTask: lookup of framework assemblies won't
succeed anymore if the path to the assembly is just an unrooted filename
(which may happen to be a file in the current directory (as a test proved
accidentally) - in which case it will never be a framework assembly).

Unfortunately this won't make all tests pass, around 20 tests will still fail with:

     #RunTarget-ErrorCount
    	The "GetReferenceNearestTargetFrameworkTask" task could not be instantiated from the assembly "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/NuGet.Build.Tasks.dll". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. Specified cast is not valid.
    	The "GetReferenceNearestTargetFrameworkTask" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name.
      Expected: 0
      But was:  2

but I couldn't figure out how to fix these errors.

Fixes https://github.com/xamarin/xamarin-macios/issues/5042.
2020-06-15 09:16:39 +02:00
Rolf Bjarne Kvinge 374f2cf293
[tools] Fix printing failed command to print the actual arguments instead of the list itself. (#8749)
Fixes this:

    Process exited with code 1, command:
    /Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tools/xibuild/xibuild System.Collections.Generic.List`1[System.String]
2020-06-04 16:40:37 +02:00
Rolf Bjarne Kvinge 3589a3b99d [dotnet] Improve tests to verify that the linker has (or hasn't) run. 2020-06-02 16:00:04 +02:00
Rolf Bjarne Kvinge aec9c93bee
[dotnet] Add tests for our various platforms. (#8708)
* [tests] Add a unit test project to test our net5 support.

* [tests] Fix clearing environment variables when launching processes.

* [tests] Add net5 macOS test app.

* [tests] Add net5 tvOS test app.

* [tests] Add net5 watchOS test app.

* [msbuild] Exclude CreateAppBundleDependsOn from net5 builds as well.

* [msbuild] We're not required to know the signing identity to figure out the app extension bundle name.
2020-05-29 17:58:34 +02:00
Rolf Bjarne Kvinge 952037b7a3
[tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Rolf Bjarne Kvinge 2926083d20
[runtime/mmp] Put libxammac and xamarin headers for Xamarin.Mac in the same directory as the corresponding files for Xamarin.iOS. (#8542)
That's in /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/SDKs/Xamarin.macOS.sdk/[lib|include]

This allows for a bit more code share between mtouch and mmp.
2020-05-08 13:04:32 +02:00
Rolf Bjarne Kvinge da5c5a0ce6 [tests] Remove the mcs variation of tests that run with both mcs and csc.
There's no need to test mcs code anymore.
2020-04-17 13:52:28 +02:00
Rolf Bjarne Kvinge e4f8460277
[mmp/mtouch] Share more code. (#8394)
* Rearrange files in Xamarin.Mac a bit to ease code sharing between mmp and
  mtouch, by putting mono's static and dynamic libraries in
  /Library/Frameworks/Xamarin.Mac.framework/Versions/Current/Sdks/Xamarin.macOS.sdk
  to match how Xamarin.iOS does it.

* Don't use 'usr' as an intermediate directory. This removes another special
  case.

* Share many of the functions and properties that return specific directories,
  and document (as comments) what each function/property is supposed to
  return.
2020-04-16 14:19:45 +02:00
Rolf Bjarne Kvinge 00d39b9b6d
[tests] NugetRestore should only restore, not build. (#8360)
"msbuild /restore" will run nuget restore, then build. "msbuild /t:Restore"
will just run the Restore target, which should just restore.

This becomes significant when we later try to do "msbuild build", and expect
warnings to show up. If we previously built the project unintentionally, those
warnings won't show up because nothing will actually be built.
2020-04-13 17:44:17 +02:00
Sebastien Pouliot 15938de198
[generator] Add C#8 nullability into generated code (#7570) (#8333)
Goals
* Reflect Apple nullability annotations in our bindings using C#8
* No warnings when building bindings

Non-Goals
* Update (add or fix) `[NullAllowed]` to match Apple headers (next phase)
* Make the generator or internal code fully nullable aware (`nowarn` is used)

Notes
* Apple's own annotations are not 100% accurate :(
* Where known issue exists we have _fixed_ our attributes to match reality :)
* We also do additional null-checks internally that might seems not required (better safe than sorry).
2020-04-10 12:38:14 -04:00
Sebastien Pouliot a5ac0ea102
[generator] Add C#8 nullability into generated code (#7570)
Goals
* Reflect Apple nullability annotations in our bindings using C#8
* No warnings when building bindings

Non-Goals
* Update (add or fix) `[NullAllowed]` to match Apple headers (next phase)
* Make the generator or internal code fully nullable aware (`nowarn` is used)

Notes
* Apple's own annotations are not 100% accurate :(
* Where known issue exists we have _fixed_ our attributes to match reality :)
* We also do additional null-checks internally that might seems not required (better safe than sorry).
2020-04-09 09:29:28 -04:00
Rolf Bjarne Kvinge 58f0a0a2c0
[tests] Fix building 'test.config' by passing 'test.config' as an argument to make and not as the working directory to the process. (#8315) 2020-04-08 16:20:21 +02:00
Alex Soto 3ff3e07ebe Merge remote-tracking branch 'xamarin/d16-5-xcode11.4' 2020-03-26 19:59:14 -04:00
Rolf Bjarne Kvinge 4d7186028e
[mtouch/mmp] Improve target framework code. (#8137)
* Unify target framework code between mtouch and mmp.
* Simplify the code in mmp: have three possible valid target frameworks for
  most of code, and add special code to handle setting any other valid target
  frameworks to redirect to one of those three valid target frameworks (and
  warn if given any of those valid, but not "main", target frameworks). Any
  other code can then depend on the target framework having exactly one of
  those specific values, which means we can make IsUnified* variables
  convenience properties instead.
* Unify a bit more of the argument parsing code between mtouch and mmp, since
  that made a few other things easier.
* Add TargetFramework.IsValidFramework to have one validation implementation.
* Move the implementation of TargetFramework.MonoFrameworkDirectory to mmp
  itself, it's not really related to the target framework.
* Remove Driver.IsUnified and IsClassic from mmp, they're not used anymore.
* Formally deprecate --xamarin-[full|system]-framework in mmp, they've really been deprecated for many years.
* Remove LinkerOptions.TargetFramework, it's not used anymore.
* Get rid of mmp's userTargetFramework fried, it's duplicated with the
  targetFramework field.
* Add a few tests, and tweak others a bit.

Breaking changes:

* Both mtouch and mmp require --target-framework now. The only direct
  consumers should be the MSBuild tasks, which already pass --target-framework
  all the time. This simplifies code, and removes assumptions.
2020-03-19 09:28:09 +01:00
Rolf Bjarne Kvinge 57db46af17
[tests] Don't assume test assemblies are at a specific distance from the root directory. (#8066)
The RootPath finds the top '.git' directory, which should be good enough
always, so use that implementation instead.
2020-03-09 16:44:29 +01:00
Alex Soto f5b3a6f1c4
Merge remote-tracking branch 'xamarin/xcode11.4' into d16-5-xcode11.4 2020-03-08 13:16:04 -04:00
Sebastien Pouliot bdd39b529e
[mtouch][mmp] Add a `--warn-on-type-ref=X` option (#8038)
Using this option it's possible to test for the presence of a type
reference in both pre-linked and post-linked assemblies.

This makes it possible to detect if
* a 3rd party assemblies are using some specific type you would like to avoid;
* a type reference has been removed during the build (e.g. linker)

Notes:
* Custom attributes are encoded differently and not included in the assembly type references metadata.
* Assembly that define a type `X` do not have a reference (but the definition) of the type (and won't be reported).

If either the pre or post-linked warnings are not useful then it's possible
 to add `-nowarn:150x` to exclude the results.

E.g.
* `-nowarn:1502` would not report references in pre-linked assemblies;
* `-nowarn:1503` would not report references in post-linked assemblies;

Finally `-warnaserror:150x` can be used to stop a build that would not
satisfy either the pre or post-linked condition.

* `-warnaserror:1502` would not report references in pre-linked assemblies;
* `-warnaserror:1503` would not report references in post-linked assemblies;

_side note_ this was first done on `d16-6` to ease backports as `master`
has multiple changes for localization. A similar PR will be done for
`master` once merged.
2020-03-04 17:28:39 -05:00
Alex Soto ac8fb30f5d
[xcode11.4] Initial commit for Xcode 11.4 Beta 3 support (#8034)
* [xcode11.4] Initial commit for Xcode 11.4 Beta 3 support

* [monotouch-test] Adjust `TextFieldTest.EmptySelection` to 13.4 changes
2020-03-04 11:24:02 -05:00
Alex Soto 709a90599e Merge remote-tracking branch 'xamarin/xcode11.4' into d16-5-xcode11.4-merge 2020-03-03 10:57:24 -05:00
Sebastien Pouliot d83e13edf1
[mtouch][mmp] Add a `--warn-on-type-ref=X` option (#7949)
Using this option it's possible to test for the presence of a type
reference in both pre-linked and post-linked assemblies.

This makes it possible to detect if
* a 3rd party assemblies are using some specific type you would like to avoid;
* a type reference has been removed during the build (e.g. linker)

Notes:
* Custom attributes are encoded differently and not included in the assembly type references metadata.
* Assembly that define a type `X` do not have a reference (but the definition) of the type (and won't be reported).

If either the pre or post-linked warnings are not useful then it's possible
 to add `-nowarn:150x` to exclude the results.

E.g.
* `-nowarn:1502` would not report references in pre-linked assemblies;
* `-nowarn:1503` would not report references in post-linked assemblies;

Finally `-warnaserror:150x` can be used to stop a build that would not
satisfy either the pre or post-linked condition.

* `-warnaserror:1502` would not report references in pre-linked assemblies;
* `-warnaserror:1503` would not report references in post-linked assemblies;

_side note_ same as https://github.com/xamarin/xamarin-macios/pull/7925
except that this one uses the localized mtouch/mmp errors only in master (so far)
2020-02-20 22:25:23 -05:00
Sebastien Pouliot 1ce5eeb3dc
[mtouch][mmp] Fix possible exception when logging strings with `{x}` (#7941)
We can end up with a format that has `{x}` inside it and no argument. If
this is logged (which depends on verbosity level) then we end up with an
uncaught exceptions and either `MT0000` or `MM0000` errors.

This happens in #7904 due to other, unrelated, issues (a variable is not
expanded) but this can happen in other circumstances, e.g. a file could
be named `{x}.cs`.

The easy fix is to use the right `Console.WriteLine` overload if there
are no arguments provided. This is always good since it avoid an non
required call to `String.Format`.

Fixes https://github.com/xamarin/xamarin-macios/issues/7904
2020-02-20 14:52:25 -05:00
Rolf Bjarne Kvinge f9d9f6becf
[tests] Simulator dylibs can either have min OS version 7.0 or 8.0. Fixes xamarin/maccore#2153. (#7895)
Fixes https://github.com/xamarin/maccore/issues/2153.
2020-02-14 20:20:55 +01:00
Rolf Bjarne Kvinge c517281f1c
Make the smcs script obsolete, and don't use it in tests anymore. (#7878)
Don't remove the entire script, because I believe there's code out there that
checks for the existence of the smcs script to determine whether Xamarin.iOS
is installed or not.
2020-02-13 08:37:52 +01:00
Alex Soto cee4b5e5a1
[xcode11.4] Add xcode 11.4 b1 initial support (#7805)
* [xcode11.4] Add xcode 11.4 b1 initial support

* [xtro] re-enable PDFKit

* Disable watchOS and fix xtro

Unfortunately watchOS simulator hangs when we try to deploy to it
and it keeps our tests timing out. Disabling for now until we
can investigate more.

Disables PDFKit on xtro in macOS

* [jenkins] Switch to use the catalina bot group (#7819)

* Bump maccore to get fix for launching the simulator for watch apps.

New commits in xamarin/maccore:

* xamarin/maccore@546270c8f9 [Xamarin.Hosting] Fix the name of the notification we get when the simulator has launched. (#2145)

Diff: 55957e908d..546270c8f9

* [tests] Diable watch due to time out, enable 10,15,4 in intro, fix min version

* Bump macios-binaries to get updated binary mlaunch as well.

New commits in xamarin/macios-binaries:

* xamarin/macios-binaries@f8c6e63 Bump mlaunch to xamarin/maccore@546270c8f9

Diff: eb6980e8b6..f8c6e63228

* [msbuild] Reflect ibtool changes in our tests

Looks like Apple reverted some changes introduces in Xcode 11
in ibtool, for more context see xamarin/xamarin-macios#6970

* [mtouch] Workaround strange behavior of realpath.

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-02-11 20:25:43 -05:00
Rolf Bjarne Kvinge 29b9e75db9
Remove code that refers to /Developer/MonoTouch. (#7840)
It's about time.
2020-02-11 15:26:15 +01:00
monojenkins 01ff50a27c [d16-5] [Makefile] Make csc strict and fix some small errors. (#7671)
Make csc to bee more strict when compiling the projects and mix some
small errors we had in the bindings.

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


Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-01-06 16:53:22 -05:00
Manuel de la Pena 8a52fcd812
[Makefile] Make csc strict and fix some small errors. (#7665)
* [Makefile] Make csc strict and fix some small errors.

Make csc to bee more strict when compiling the projects and mix some
small errors we had in the bindings.

Fixes: https://github.com/xamarin/xamarin-macios/issues/5398
2020-01-02 13:57:22 -05:00
Alex Soto 9ac17bdbcf
Merge remote-tracking branch 'xamarin/xcode11.3' into master-xcode11.3 2019-12-17 19:25:11 -05:00
Alex Soto 01c1d04877
Merge remote-tracking branch 'xamarin/xcode11.3' into d16-5 2019-12-17 18:56:12 -05:00
Rolf Bjarne Kvinge f7212e7dc5
[introspection] UIMenuController's default ctor stopped working in iOS 13.3. Fixes xamarin/maccore#2067. (#7458)
* [introspection] UIMenuController's default ctor stopped working in iOS 13.3. Fixes xamarin/maccore#2067.

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

* [tests] Add support for comparing 3-part system version strings to watchOS.
2019-11-20 13:45:01 -05:00
Vincent Dondain 44fd06324a Merge master into d16-5 2019-11-08 10:21:12 -05:00
Vincent Dondain a558d84457 Merge branch 'xcode11.2' into master-merge-xcode11.2 2019-11-05 15:25:49 -05:00
Vincent Dondain ec3c01d131 Merge branch 'xcode11.2' into d16-4-xcode11.2-merge 2019-11-01 17:11:44 -04:00
Alexander Köplinger e8409f2834 [tests] Remove confusing values for old Xcode versions (#5806)
Xcode 5 to 7 are obsolete, we don't need those values in the test config anymore.
2019-10-29 12:02:22 -04:00
Rolf Bjarne Kvinge ec62a8dd51
[tests] Fix tests after a modification to our dummy x86-64 slice in our shipping libraries. Fixes xamarin/maccore#2026. (#7241)
Previously we only had a single dynamic library that was used as the dummy
slice, but there may be a static library instead. So teach the tests about
that static library.

Fixes these test failures:

    1) Failed : Xamarin.Tests.ProductTests.MinOSVersion(iOS,MiniPhoneOS,IOS,True)
      Unexpected build version command in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/MonoTouch.iphoneos.sdk/usr/lib/libmono-profiler-log.a (x86-64-slice.o)
      Expected: IOS or 0
      But was:  MacOS
      at Xamarin.Tests.ProductTests.MinOSVersion (Xamarin.Tests.Profile profile, Xamarin.MachO+LoadCommands load_command, Xamarin.MachO+Platform platform, System.Boolean device) [0x00000] in <a0c772db19e5407bb3edc34b20e04476>:0

    2) Failed : Xamarin.Tests.ProductTests.MinOSVersion(watchOS,MinwatchOS,WatchOS,True)
      Unexpected build version command in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchOS.sdk/usr/lib/libmono-profiler-log.a (x86-64-slice.o)
      Expected: WatchOS or 0
      But was:  MacOS
      at Xamarin.Tests.ProductTests.MinOSVersion (Xamarin.Tests.Profile profile, Xamarin.MachO+LoadCommands load_command, Xamarin.MachO+Platform platform, System.Boolean device) [0x00000] in <a0c772db19e5407bb3edc34b20e04476>:0

    3) Failed : Xamarin.Tests.ProductTests.MinOSVersion(tvOS,MintvOS,TvOS,True)
      Unexpected build version command in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.AppleTVOS.sdk/usr/lib/libmono-profiler-log.a (x86-64-slice.o)
      Expected: TvOS or 0
      But was:  MacOS
      at Xamarin.Tests.ProductTests.MinOSVersion (Xamarin.Tests.Profile profile, Xamarin.MachO+LoadCommands load_command, Xamarin.MachO+Platform platform, System.Boolean device) [0x00000] in <a0c772db19e5407bb3edc34b20e04476>:0

Fixes https://github.com/xamarin/maccore/issues/2026.
2019-10-17 07:25:47 +02:00
Vincent Dondain 5c102d920f
Bump for Xcode 11.2 beta 2 (#7223) 2019-10-15 11:18:29 -04:00
Vincent Dondain 61d0e1809f Merge remote-tracking branch 'origin/master' into master-merge-d16-4 2019-10-14 18:17:35 -04:00
Rolf Bjarne Kvinge a8fdf6db6e
Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process. (#7177)
* Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process.

mono changed how quotes should be escaped when passed to
System.Diagnostic.Process, so we need to change accordingly.

The main difference is that single quotes don't have to be escaped anymore.

This solves problems like this:

    System.ComponentModel.Win32Exception : ApplicationName='nuget', CommandLine='restore '/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories/ios-samples/WorkingWithTables/Part 3 - Customizing a Table\'s appearance/3 - CellCustomTable/CellCustomTable.sln' -Verbosity detailed -SolutionDir '/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories/ios-samples/WorkingWithTables/Part 3 - Customizing a Table\'s appearance/3 - CellCustomTable'', CurrentDirectory='/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories', Native error= Cannot find the specified file
      at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0029f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2019-08/external/bockbuild/builds/mono-x64/mcs/class/System/System.Diagnostics/Process.cs:778

ref: https://github.com/mono/mono/pull/15047

* Rework process arguments to pass arrays/lists around instead of quoted strings.

And then only convert to a string at the very end when we create the Process
instance.

In the future there will be a ProcessStartInfo.ArgumentList property we can
use to give the original array/list of arguments directly to the BCL so that
we can avoid quoting at all. These changes gets us almost all the way there
already (except that the ArgumentList property isn't available quite yet).

We also have to bump to target framework version v4.7.2 from v4.5 in several
places because of 'Array.Empty<T> ()' which is now used in more places.

* Parse linker flags from LinkWith attributes.

* [sampletester] Bump to v4.7.2 for Array.Empty<T> ().

* Fix typo.

* Rename GetVerbosity -> AddVerbosity.

* Remove unnecessary string interpolation.

* Remove unused variable.

* [mtouch] Simplify code a bit.

* Use implicitly typed arrays.
2019-10-14 16:18:46 +02:00
Vincent Dondain a3076f29a3 Merge branch 'xcode11.1' into d16-4 2019-10-07 21:46:13 -04:00
Manuel de la Pena 718f57f7ad
[Tests] Ignore some tests when using the interpreter (#7158)
Some tests do fail with the interpreter on tvOS. Ignoring them only
there.

Fixes https://github.com/xamarin/maccore/issues/1909
2019-10-02 18:12:20 -04:00
Rolf Bjarne Kvinge 4d5d38be02
Drop the Xcode 9.4 dependency. (#7044) (#7135)
* Drop the Xcode 9.4 dependency. (#7044)

* Drop the Xcode 9.4 dependency.

Also bump mono to get the removal of the mac32 binaries.

New commits in mono/mono:

* mono/mono@beb9a1b182 [sdks] Remove the mac32 build.
* mono/mono@747a919a06 [ci] Make ios/mac sdks archive URL more predictable
* mono/mono@114013096e [ci] Build iOS/Mac Mono sdks archive using Xcode 11
* mono/mono@10a24f3ea1 Implement WriteCore and ReadCore in DeflateStream
* mono/mono@a925846b1f [offsets-tool] Install clang into the user-specific python directory. (#16933)
* mono/mono@fe64a4765e [2019-06] Bump msbuild and sdk versions to 3.0.1xx latest (#16870)
* mono/mono@7293597b90 [corlib] Fix building nunit-lite twice (#16910)
* mono/mono@1648e88687 Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16896)
* mono/mono@a6b5187d76 [metadata] Fix leaks when handling a few attributes (#16675) (#16851)
* mono/mono@7da9a041b3 [2019-06] Bump to mono/corefx@e79cf5b
* mono/mono@2b7050bdf3 [2019-06] Add RenamedEvent* to FSW sources from CoreFX (#16758)
* mono/mono@4f5ed502c6 [msbuild] pick up p4 versions
* mono/mono@f04ee2219d [2019-06][msbuid][roslyn] Bump msbuild and roslyn-binaries to pick up dotnet 3.0.100-p9 toolset
* mono/mono@6b4b99e571 Vtable [i] can be null so this should be check before use it. Fixes #16712

Diff: 7af64d1ebe..beb9a1b182

* [tests] Add a fat macOS dylib for testing purposes.

Add a binary version of a fat macOS dylib (because we can't create one when we
need it since we can't create 32-bit slice anymore).

It was created like this (in tests/test-libraries):

	$ cat test.m
	int theUltimateAnswer ()
	{
		return 42;
	}

	$ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz  -arch i386
	$ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib

* [tests] Adjust XM tests to XM not having fat dylibs anymore.

* [tests] Adjust product tests to some libraries not being fat anymore.

* [tests] Don't treat an Xcode with the same major version number as old.

Fixes an issue in the MT0091 test, where it would fail on tvOS because the
test wanted to use an older Xcode, and we could end up returning Xcode 11.0
when the current Xcode is 11.1. Since the test depends on using the OS SDK as
it was designed for (technically using an OS SDK earlier than the latest), it
ended up failing because while the iOS SDK was bumped in Xcode 11.1, the tvOS
SDK was not.
2019-10-01 16:18:28 +02:00
Rolf Bjarne Kvinge ea829b5a3f [tests] Remove workaround for xamarin/maccore#1996.
Fixes https://github.com/xamarin/maccore/issues/1996.
2019-09-30 13:30:28 -04:00
Rolf Bjarne Kvinge 979eb13ab2 [tests] Remove workaround for xamarin/maccore#1996.
Fixes https://github.com/xamarin/maccore/issues/1996.
2019-09-30 15:14:23 +02:00
Alex Soto cd5917650e
[mono] Bump mono to match android (#7104)
* [mono] Bump mono to match android

4546440471...c99adb97ed

* [tests] Add workaround for xamarin/maccore#1996.
2019-09-26 08:39:49 -04:00
Rolf Bjarne Kvinge 2adecee3d9
Drop the Xcode 9.4 dependency. (#7044)
* Drop the Xcode 9.4 dependency.

Also bump mono to get the removal of the mac32 binaries.

New commits in mono/mono:

* mono/mono@70d6903053 [2019-08] [merp] Use a separate program as the hang supervisor. (#16900)
* mono/mono@4bff2b6370 [offsets-tool] Install clang into the user-specific python directory.
* mono/mono@81894ec8ca Implement WriteCore and ReadCore in DeflateStream
* mono/mono@bfbf823ca1 [ci] Remove more XCODE32_DIR usages (#16964)
* mono/mono@ce01b20a4d Add net_4.8.xml to EXTRA_DIST and bump binary-reference-assemblies again
* mono/mono@7a587d7fa6 Add .NET 4.8 reference assemblies (#16912)
* mono/mono@35e454a8f6 [sdks] Remove the mac32 build. (#16936)
* mono/mono@75eb342f53 [2019-08] [System] Make FileSystemWatcher backend non-static (#16926)
* mono/mono@5881981f79 [2019-08] [mini] Add missing membars when initializing rgctx entries (#16909)
* mono/mono@6290b6cd6e Temporarily disable embedded ppdb data decompression (#16911)
* mono/mono@a0e7f9eaf2 [2019-08] [arm64_32] make "Debug Mode" work on Watch series 4 with --interpreter (#16886)
* mono/mono@6275840a7f Rename bundle identifier for the various Mono.frameworks we create for Xamarin.iOS. Fixes xamarin/xamarin-macios#7005. (#16901)
* mono/mono@25f6093283 [corlib] Fix building nunit-lite twice (#16895)
* mono/mono@7ec17ba1be [2019-08] [android sdk] Add aprofutil tool (#16884)
* mono/mono@f755f3b539 [metadata] Fix leaks when handling a few attributes (#16850)
* mono/mono@5f9a2db39b [2019-08] Fix infrequent hangs in test-runner. (#16854)
* mono/mono@f31f5ea1f1 [2019-08] [threads] do not convert NULL thread name (#16828)
* mono/mono@20308e6f87 [aot] Do not wrap tool_prefix path when calling strip (#16820)
* mono/mono@cecda47c48 [aprofutil] Add -p and -f options
* mono/mono@824cc12ac3 Bump to mono/corefx@e79cf5b
* mono/mono@b77dc06a7e [aprofutil] Install the tool correctly (#16112)
* mono/mono@1848d78d60 [aotprof-tool] Initial import of AOT profiler tool (#15384)
* mono/mono@da0086e304 [2019-08] Add RenamedEvent* to FSW sources from CoreFX (#16756)
* mono/mono@0297b21b03 [msbuild][roslyn] Bump msbuild and roslyn to pull in new versions (#16768)
* mono/mono@40631e3b9e [2019-08] [aot] move method_addresses to data.rel.so section to avoid text relocations (#16751)
* mono/mono@68b77674e2 Vtable [i] can be null so this should be check before use it. Fixes #16712
* mono/mono@4a0b4f41ed [mini] publish global patches after JitInfo has been added
* mono/mono@7a1f63fde6 [debugger][android] It was not initialising seq_points on MonoCompile on Android, so when was compiling dynamic methods, seq_points wasn't created and we got the assert when try to single step.

Diff: 29b1ac19c9..70d6903053

* [tests] Add a fat macOS dylib for testing purposes.

Add a binary version of a fat macOS dylib (because we can't create one when we
need it since we can't create 32-bit slice anymore).

It was created like this (in tests/test-libraries):

	$ cat test.m
	int theUltimateAnswer ()
	{
		return 42;
	}

	$ /Applications/Xcode94.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang test.m -olibtest.i386.dylib -shared -isysroot /Applications/Xcode94.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Foundation -framework CoreLocation -lz  -arch i386
	$ lipo -create libtest.i386.dylib .libs/macos/libtest.dylib -output libtest-fat.dylib

* [tests] Adjust XM tests to XM not having fat dylibs anymore.

* [tests] Adjust product tests to some libraries not being fat anymore.

* One more test fix.
2019-09-24 13:40:18 +02:00
Rolf Bjarne Kvinge df523c8b18 Merge remote-tracking branch 'origin/xcode11' into d16-3. 2019-09-17 08:30:12 +02:00
Rolf Bjarne Kvinge 303aa0a649 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Alex Soto b02da292bf
[corebluetooth] Update for Xcode 11 GM (#6990)
This should let us provide a nicer API for the GM change about
`CBManager authorization` moving from an instance to a static
property (in all but iOS 13.0 / watchOS 6.0)
2019-09-12 13:40:46 -04:00
Rolf Bjarne Kvinge f6e0531197 Merge xcode11 into d16-3. 2019-09-12 08:29:02 +02:00
Rolf Bjarne Kvinge 0008c20abf
Implement notarization. (#6928)
* Add a dummy x86_64 slice to all our native libraries that don't have one. (#6848)

Apple's notarization tool has a bug where they incorrectly flag Mach-O
binaries without an x86_64 slice, so make sure all our libraries have one.

* Jenkinsfile notarization (#6869)

* Add in notarization script for xamarin.mac/xamarin.iOS

* Flatten the list to get rid of the braces

* Add in keychain password

* Add login.keychain back in to access codesigning certificates

* Always sign pkgs, upload notarized copies

* Enable ios notarization and make notarized pkgs public

* Make notarization non-fatal

* Publish GH statuses for notarized PKGs

* Don't forget to declare URI variables for notarized pkgs

* report proper package links

* [jenkins] Improve package reporting.

* Use dummy function name which our tests won't complain about.
2019-09-09 00:34:11 -07:00
Rolf Bjarne Kvinge 0b4fc12f32 [tests] Fix several issues that show up in the mtouch and introspection tests on macOS 10.15. (#6929)
* [introspection] Fix several issues that show up on macOS 10.15.

* [tests][mtouch] Fix a few tests according to recent changes.
2019-09-06 20:57:40 -04:00
Rolf Bjarne Kvinge 08809f5bf7
[d16-3] Implement notarization. (#6927)
* Add a dummy x86_64 slice to all our native libraries that don't have one. (#6848)

Apple's notarization tool has a bug where they incorrectly flag Mach-O
binaries without an x86_64 slice, so make sure all our libraries have one.

* Jenkinsfile notarization (#6869)

* Add in notarization script for xamarin.mac/xamarin.iOS

* Flatten the list to get rid of the braces

* Add in keychain password

* Add login.keychain back in to access codesigning certificates

* Always sign pkgs, upload notarized copies

* Enable ios notarization and make notarized pkgs public

* Make notarization non-fatal

* Publish GH statuses for notarized PKGs

* Don't forget to declare URI variables for notarized pkgs

* report proper package links

* [jenkins] Improve package reporting.

* Use dummy function name which our tests won't complain about.
2019-09-06 05:35:12 -07:00
Rolf Bjarne Kvinge 007f1e6882
[tests] Skip font manager test in OS versions where it crashes due to bugs in the OS. (#6894)
Calls to CTFontManagerRegisterFontDescriptors with a null callback will crash
unless on iOS 13.1, so don't run this test on earlier OS versions.

Also update AssertXcodeVersion to cope with Xcode 11.1, which is unfortunately
just guesswork until an actual Xcode 11.1 is released (currently we can't
distinguish between iOS 13.0 and iOS 13.1 using the Xcode version, because
Xcode 11b7 supports them both, so for now we assume there will be an Xcode
11.1 which will support iOS 13.1).
2019-09-03 05:43:01 -07:00
Rolf Bjarne Kvinge f3fbbd7047
Add a dummy x86_64 slice to all our native libraries that don't have one. (#6848)
Apple's notarization tool has a bug where they incorrectly flag Mach-O
binaries without an x86_64 slice, so make sure all our libraries have one.
2019-08-26 09:51:50 -07:00
Manuel de la Pena eb262cb2f6
[Tests] Pass a parameter to avoid a NRE. (#6832) 2019-08-23 19:53:14 +02:00
Vincent Dondain 37e7023a0a
[tests] Add check for bluetooth permission (#6796) 2019-08-21 06:40:56 -04:00
Manuel de la Pena 55a95cff87
[Tests] Allow to ignore tests that fail on the interpreter. (#6802)
There are some failures that only happen in the interpreter. We add a
TestRuntime method that allow to check if the interpreter is used.
2019-08-21 10:54:19 +02:00
Sebastien Pouliot 4b61850243
[xcode11] Bump for beta 6 (#6798)
AVFoundation crash added to https://github.com/xamarin/xamarin-macios/issues/6212
2019-08-20 10:06:18 -04:00
Rolf Bjarne Kvinge d4192a59f0
[xcode11] Remove the WatchKit framework from iOS while keeping API stability. Fixes #6492. (#6503)
* [WatchKit] Remove this framework for iOS while keeping backwards compatibility. Fixes #6492.

* Copy all generated sources and modify them to throw PlatformNotSupported exceptions.
* Adjust some existing source code to also throw PlatformNotSupported exceptions.
* Sprinkle Obsolete attributes generously.
* Stop generating code for the WatchKit framework for iOS.

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

* [introspection] Adjust test.

* [mtouch] Don't link with WatchKit, and show a warning if we detect code that want to use WatchKit.

* [xtro] Remove WatchKit for iOS.

* [introspection] Don't check obsoleted NSString fields for null.

There's probably a reason the field was obsoleted.

* [introspection] Add exception for the WatchKit framework.

* [xtro] Ignore obsolete enums.

There's probably a reason they're obsoleted.

In particular it solves a confusion between WKWebKit.WKErrorCode and
WatchKit.WKErrorCode: for iOS, the latter is obsoleted, and this way we always
process the former instead.

* [mtouch] Adjust wording for MT4178 to be more accurate.

* [WatchKit] Make more API obsolete/hidden.

Two classes managed to slip past the first time.

* [tests] Adjust test after WatchKit removal.
2019-08-14 17:46:55 +02:00
Alex Soto d10d7f0370
[xcode11] Bump to Xcode 11 Beta 5 (#6684)
* [xcode11] Bump to Xcode 11 Beta 5
2019-07-30 14:16:44 -04:00
Jo Shields a29ae8e6df Bump to mono:2019-06 (#6196)
* Use the commonly used casing for `MSBuildSDKsPath` property

Handle "incorrectly" cased msbuild property names

msbuild property names are case insensitive. While generating the custom
app.config, in `SetToolsetProperty(..)` we try to update the property if
it already exists. But the name lookup was case sensitive, thus causing
the lookup to fail, resulting in two entries for the same property name
differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`.

* [mtouch] Whitelist new Brotli native symbols in Xamarin.Tests.Misc.PublicSymbols test

* [mtouch] Better assert in NoLLVMFailuresInWatchOS() test

We'd list the "LLVM failed" messages before even though the AOT might've crashed and the list is meaningless. Assert the exit code before that.

* [mtouch] Use new LLVM even for 32bit targets

See https://github.com/mono/mono/issues/14841 and https://github.com/mono/mono/issues/9621

* [mtouch] Work around slow LLVM in "don't link" test

See https://github.com/mono/mono/issues/14843

* Remove useless conditional

* Remove LLVM36 from Makefile

* [watch4] set right min version for arm64_32 based watch devices (#6307)

Fixes the confusion around `libmono-native*` (see for example ce5ba1e41d (commitcomment-33834491) ) when building with `MONO_BUILD_FROM_SOURCE=1`.

* reflect watchos64_32_version_min change from mono sdk

* Move mono hash info to mk/mono.mk so that existing scripts work.

* Add Makefile dependency on mono.mk where necessary

With 3e7bc29ade the Mono hash was moved from Make.config to mono.mk.

We need to add a Makefile dependency on this file wherever Make.config was used to track a Mono dependency.

* [tests] Copy mk/mono.mk to the XM test package.

* [tests] Update minOS version test after consolidating min watchOS versions everywhere.

Fixes this mtouch and mmptest failure:

    1) Failed : Xamarin.Tests.ProductTests.MinOSVersion(watchOS,MinwatchOS,WatchOSSimulator,False)
      Failures
      Expected: <empty>
      But was:  < "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (mono-runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (bindings-generated-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (shared-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (runtime-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-invoke-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (xamarin-support-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (nsstring-localization-debug.arm64_32.o).", "Unexpected minOS version (expected 2.0.0, alternatively 2.0.0, found 5.1.0) in /Users/builder/jenkins/workspace/xamarin-macios/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/SDKs/Xamarin.WatchSimulator.sdk/usr/lib/libxamarin-debug.a (trampolines-varargs-debug.arm64_32.o)."... >

* [mmp] Fix make clean target

It needs an -r to remove directories:

```
rm: bin: is a directory
rm: obj: is a directory
```

* Add new xamarin_timezone_get_local_name() to a few more places
2019-07-16 17:24:00 +02:00
Rolf Bjarne Kvinge a495077533
[xcode11] Stop building/shipping 32-bit Xamarin.Mac bits. Partial fix for #6300. (#6393)
This includes:

* 32-bit version of Xamarin.Mac.dll and OpenTK.dll
* XamMac.dll and XamMac.CFNetwork.dll
* 32-bit versions of the runtime libraries (libxammac.a and friends).
* 32-bit version of the partial static library for Xamarin.Mac.
* Classic support in the generator.

We still ship a few Classic files so that Visual Studio for Mac continue to detect that Xamarin.Mac is installed (otherwise VSfM won't open Classic projects, which makes it impossible to use the migration wizard).

This makes our build slightly faster.

Partial fix for #6300.
2019-07-15 10:19:24 -07:00
Rolf Bjarne Kvinge 121f04ce3d
[tests] Improve handling of permission dialogs. Fixes xamarin/maccore#1856. (#6544)
* macOS 10.15 starts putting up permission dialogs we can't automatically
  dismiss anymore, so start honoring the 'IncludeSystemPermissionTests' option
  for macOS tests.
* Improve the 'IncludeSystemPermissionTests' option to have three states: if
  set (either true or false), that takes precedence, but if not set, we now
  don't run any tests that require permission dialogs on macOS or on device if
  we're running in CI. Tests executed locally will still put up dialogs, both
  on macOS and on device.
* This needed a few changes to the html report, since the
  'IncludeSystemPermissionTests' is exposed in the UI and the code didn't
  handle the three different states.
* Update a few tests to check for permission to the contacts.

Fixes https://github.com/xamarin/maccore/issues/1856.
2019-07-12 07:05:57 -07:00
Rolf Bjarne Kvinge 920e2b7c13
[mmptest] Modify the Unified_HelloWorld_ShouldHaveNoWarnings test to not fail if the branch name contains 'warning'. Fixes xamarin/maccore#1404. (#6445)
Asserting that the entire build output never contains 'warning' fails if git's
branch name contains 'warning', because Jenkins adds environment variables
with the git branch name (and environment variables are printed during the
build).

So instead parse the build output, and assert that we don't get any mmp
warnings.

Fixes https://github.com/xamarin/maccore/issues/1404.
2019-06-28 07:32:25 +02:00
Rolf Bjarne Kvinge cc96963371
[xcode11] Merge d16-2. (#6446)
* [tests] Handle Xcodes without proper versions by ignoring them. Fixes xamarin/maccore#1768. (#6386)

This can happen if an Xcode hasn't been completely/successfully installed or
removed.

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

* [CoreGraphics] Fix lifetime of delegates passed to CGPatternCreate. (#6368)

We may get callbacks after the managed CGPattern instance has been
disposed/garbage collected, so make sure our delegates survives that long.

Since the delegates don't need any instance state, just make them static.
2019-06-28 07:31:46 +02:00
Rolf Bjarne Kvinge a036c4ef2b
[tests] Handle Xcodes without proper versions by ignoring them. Fixes xamarin/maccore#1768. (#6364)
This can happen if an Xcode hasn't been completely/successfully installed or
removed.

Fixes https://github.com/xamarin/maccore/issues/1768.
2019-06-19 16:12:00 +02:00
Rolf Bjarne Kvinge 626a859a46
[xcode11] Fix several issues to make the mtouch tests pass. Fixes #6259. (#6332)
* [tests] Minor refactor to get better Xcode version parsing.

* Rename Configuration.XcodeVersion to XcodeVersionString.
* Add Configuration.XcodeVersion a parsed Version instane of XcodeString.

* [tests] Ignore all 'MT0099: Not linking with WatchKit because Xcode 11 beta 1' warnings in tests.

* [tests] Adjust min OS version tests for Xcode 11b1.

* [tests] Adjust tests for changes in 'nm' output.

* [tests] Adjust tests for name changes in Clang.

* [tests] Adjust tests for changes in ld warning format.

* [msbuild] 'metal' and 'metallib' aren't in PATH anymore, so use xcrun to execute them.

* [msbuild] Fix DevicePlatformBinDir for the Metal and MetalLib targets on iOS.

Also set the SDKROOT variable, otherwise metal and metallib don't work
properly, and revert the previous attempt at a fix (use xcrun).

* [tests] Simplify version parsing code to not version parse anymore.

* [tests] Add FIXME for once Apple fixes the WatchKit disappearance.
2019-06-19 07:20:02 +02:00
Rolf Bjarne Kvinge 1d85078962 [monotouch-test] Adjust tests to cope with changes in Xcode 11 beta 1. 2019-06-14 20:02:27 +02:00
Sebastien Pouliot dd142561a1 [tests] Add support to check for Xcode 11.0 and macOS 10.15 from tests/attributes 2019-06-12 00:26:23 -04:00
Rolf Bjarne Kvinge 7d67e0585c
[tests] Ignore BaseOptimizeGeneratedCodeTest.SetupBlockPerfTest when doing CI. Fixes xamarin/maccore#649. (#6183)
The BaseOptimizeGeneratedCodeTest.SetupBlockPerfTest test is randomly failing
fairly often now, which means it turns CI builds red.

So disable it, but since I don't like disabling tests I've only disabled it
when doing CI. Hopefully we'll find out if there are any regressions when
running tests locally.

Fixes https://github.com/xamarin/maccore/issues/649.
2019-06-03 07:54:30 -07:00
Rolf Bjarne Kvinge 72d7a8ad9b Merge remote-tracking branch 'origin/master' into binary-artifacts 2019-05-30 07:25:03 +02:00
Manuel de la Pena 76c2804298 [XHarness] Do clean after mtouch build tests. (#6161)
The BCL projects do share the directory. This means that if we do not
clean before building we could have unknown side effects.

Fixes: https://github.com/xamarin/xamarin-macios/issues/6157
2019-05-29 22:24:52 -07:00
Alexander Köplinger 8627c4311a Merge remote-tracking branch 'upstream/master' into binary-artifacts 2019-05-24 20:27:09 +02:00
Alexander Köplinger a239560d99 Use correct min version for libmono-native-compat in ProductTests 2019-05-24 01:36:38 +02:00
Sebastien Pouliot fc5b9e24d4
[mmp] Ignore, by default, frameworks that cause rejection from App Store. Fix #6039 (#6107)
So far this only applies to `QTKit`...

XM will now, by default, avoid natively link with QTKit unless it's
instructed to so explicitly using `--link-prohibited-frameworks`

ref: https://github.com/xamarin/xamarin-macios/issues/6039
2019-05-23 15:59:40 -05:00
Manuel de la Pena 8f97e80ef3
[XHarness] Fix mtouch tests to use the new style bcl tests. (#6093)
Touch tests had a dependency on the old style bel tests, we now use the new style to test it.
2019-05-23 07:59:40 -07:00
Rolf Bjarne Kvinge a2e9b599fe
[CoreFoundation] Fix ownership of objects returned from CFHTTPMessageCreate* P/Invokes. (#6091)
* [CoreFoundation] Fix ownership of objects returned from CFHTTPMessageCreate* P/Invokes.

* [Tests] Fix 'nint' 32 bits build

* [tests] Fix XM/Classic build.
2019-05-22 22:52:46 -07:00
Rolf Bjarne Kvinge c870d3303d [tests][mtouch] Adjust Xamarin.Tests.ProductTests.MinOSVersion for watchOS/arm64_32 slices. 2019-05-22 08:12:10 +02:00
Rolf Bjarne Kvinge 5cab1e8d57 [tests][mtouch] Adjust minOS version test for arm64_32. 2019-05-22 08:12:06 +02:00
monojenkins daf5006281 [d16-2] [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects. (#6035)
* [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects.

Fixes https://github.com/mono/mono/issues/13483 :

```
@akoeplinger: Since we moved types from Mono.Android.dll and
Xamarin.iOS/WatchOS/TVOS.dll to System.Drawing.Common.dll user projects
would fail to compile. We need to add some msbuild logic to add a
reference to the assembly automatically.
```

* [msbuild] Implement the same fix for XM projects as well.

* [msbuild] Update Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* tests.

We're including a new assembly, which means the
Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* must be updated
accordingly.

Also modify these tests so that test assert that fails lists the actual
assembly that's missing, i.e. instead of this:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
         #1
      Expected: 6
      But was:  7

we now print:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
         References
      Expected: equivalent to < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
      But was:  < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Drawing.Common.dll", "System.Xml.dll", "Xamarin.iOS.dll" >

* [tests] Adjust Xamarin.MMP.Tests.AssemblyReferencesTests.ShouldNotAllowReference_ToSystemDrawing.

The test was verifying that referencing System.Drawing.dll and trying to use
System.Drawing.RectangleF would fail to compile (because System.Drawing.dll
shouldn't be resolved in this case).

The addition of System.Drawing.Common.dll breaks this assumption, because now
we ship System.Drawing.RectangleF, so the code that was supposed to fail to
compile works just fine instead.

So modify the test to verify that there's no System.Drawing.dll in the final
bundle.

* Remove workarounds for mono/mono#13483.

* [msbuild] Create a way out if automatically referencing System.Drawing.Common.dll causes problems.

* [msbuild] Adjust variable name and boolean logic according to review.
2019-05-10 16:16:01 +02:00
Rolf Bjarne Kvinge e3fc04a8a3 [tests][mtouch] Adjust Xamarin.Tests.ProductTests.MinOSVersion for watchOS/arm64_32 slices. 2019-05-10 11:28:22 +02:00
Rolf Bjarne Kvinge 76c2361965 [tests][mtouch] Adjust minOS version test for arm64_32. 2019-05-10 11:28:22 +02:00
Ankit Jain 3a7bdc0a13 [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects. (#6011)
* [msbuild] Add reference to `System.Drawing.Common.dll` to XI projects.

Fixes https://github.com/mono/mono/issues/13483 :

```
@akoeplinger: Since we moved types from Mono.Android.dll and
Xamarin.iOS/WatchOS/TVOS.dll to System.Drawing.Common.dll user projects
would fail to compile. We need to add some msbuild logic to add a
reference to the assembly automatically.
```

* [msbuild] Implement the same fix for XM projects as well.

* [msbuild] Update Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* tests.

We're including a new assembly, which means the
Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_* must be updated
accordingly.

Also modify these tests so that test assert that fails lists the actual
assembly that's missing, i.e. instead of this:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
         #1
      Expected: 6
      But was:  7

we now print:

    1) Test Failure : Xamarin.iOS.Tasks.TargetTests.GetReferencedAssemblies_Executable
         References
      Expected: equivalent to < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Xml.dll", "Xamarin.iOS.dll" >
      But was:  < "mscorlib.dll", "MyLibrary.dll", "System.Core.dll", "System.dll", "System.Drawing.Common.dll", "System.Xml.dll", "Xamarin.iOS.dll" >

* [tests] Adjust Xamarin.MMP.Tests.AssemblyReferencesTests.ShouldNotAllowReference_ToSystemDrawing.

The test was verifying that referencing System.Drawing.dll and trying to use
System.Drawing.RectangleF would fail to compile (because System.Drawing.dll
shouldn't be resolved in this case).

The addition of System.Drawing.Common.dll breaks this assumption, because now
we ship System.Drawing.RectangleF, so the code that was supposed to fail to
compile works just fine instead.

So modify the test to verify that there's no System.Drawing.dll in the final
bundle.

* Remove workarounds for mono/mono#13483.

* [msbuild] Create a way out if automatically referencing System.Drawing.Common.dll causes problems.

* [msbuild] Adjust variable name and boolean logic according to review.
2019-05-10 01:20:52 +02:00
Alexander Köplinger 7f717f01ae
Merge pull request #5563 from xamarin/mono-2019-02
Bump to mono:2019-02
2019-04-25 19:24:35 +02:00
Rolf Bjarne Kvinge bd457212d5
[tests] Add sample tester. (#5870)
* [tests] Add sample tester.

Add a unit project that looks for iOS/macOS/tvOS sample projects in several
repositories, and builds them all.

* [tests][sampletester] Remove known issue which has now been fixed.

* [tests] Only run sample tests on CI in Azure Devops.

* Remove the possibility of automatically running the sample tests with
  xharness (so the sample tests won't run on PR bots or internal bots when the
  'run-all-tests' label is added). It's still possible to run the sample tests
  manually from the xharness web UI.

* Automatically trigger the sample test run in Azure Devops if the
  'run-sample-tests' label is applied to a PR (and that PR is executed on
  internal Jenkins).

* Fix typo.

* Fix path.

* Verbose output to track down scheduling failure.

* Bump maccore to get improved debug spew.

Diff: f527c9c526..f89d74b165

* [tests][sampletester] Fix build for TodoWCF.
2019-04-25 17:18:43 +02:00
Alexander Köplinger 0da0bcaaae Merge remote-tracking branch 'upstream/master' into mono-2019-02 2019-04-17 11:29:35 +02:00
William Kent dc8e07f678 Add macOS Xcode archive support (#5862)
* Initial commit of ArchiveTaskBase for macOS

* Fix namespace

* Add concrete Archive task

* Add Archive target to Xamarin.Mac.Common.targets

* Remove TODOs for non-applicable items

* Add more properties to archive Info.plist

* Add more parameters to Archive task

* Set the ArchiveDir output parameter

* Move ITunesSourceFiles parameter

* Add test

* Fix msbuild mistakes preventing archive from working

* Reorder ApplicationProperties to be at top like iOS

* Add note

* Improve error handling

* Fix archive to be loadable in Xcode

* 4 spaces to tabs

* More space -> tab
2019-04-15 15:20:18 -05:00
Sebastien Pouliot 1664cf6426 Merge branch 'master' into mono-2019-02 2019-04-05 15:53:37 -05:00
Sebastien Pouliot fad23e95b2
Small fixlets to select better overloads / unneeded parameters (#5844) 2019-04-05 09:43:22 -05:00
Alexander Köplinger 067cbf0a28 Merge remote-tracking branch 'upstream/master' into mono-2019-02
# Conflicts:
#	tools/mmp/driver.cs
2019-04-05 11:19:11 +02:00
Vincent Dondain 86d1b42ad2 Merge branch 'xcode10.2' into master-merge-xcode10.2 2019-04-03 13:57:31 -04:00
Alexander Köplinger 1079592cd1 tests: Default to using csc instead of mcs 2019-03-25 19:56:27 +01:00
Rolf Bjarne Kvinge 99e727c90b
Merge pull request #4904 from xamarin/mono-2018-10
Bump to mono:2018-10
2019-03-08 11:06:50 +01:00
Rolf Bjarne Kvinge 8887b615d1
[CoreGraphics] Make CGPattern inherit from NativeObject, and add a CGPattern test. (#5734)
* [CoreGraphics] Make CGPattern inherit from NativeObject, and add a CGPattern test.

* Make test work on all platforms.
2019-03-07 16:49:12 +01:00
Rolf Bjarne Kvinge 221f3e4a37 Merge remote-tracking branch 'origin/master' into mono-2018-10 2019-03-01 09:35:53 +01:00
Rolf Bjarne Kvinge 590524243c
Improve MachO support to read LC_BUILD_VERSION and static libraries. (#5685)
* MachO.cs: Support reading LC_BUILD_VERSION

Newer SDKs set this instead of LC_VERSION_MIN_*

* MachO.cs: Add support for reading Mach-O files inside ar archives.

* [tests] Augment ProductTests.MinOSVersion to test static libraries as well.

* Adjust enum field names to match our naming scheme.
2019-03-01 08:00:53 +01:00
Alexander Köplinger 1e9de96789 Merge branch 'master' into mono-2018-10 2019-02-24 10:20:44 +01:00
Chris Hamons 5680a39c77
[xm] Support UseHardenendRuntime in code signing (#5536)
- Solves SDK portion of https://github.com/xamarin/xamarin-macios/issues/4288
2019-02-22 09:06:58 -06:00
Alexander Köplinger 75ea3ca9bc Merge branch 'master' into mono-2018-10
# Conflicts:
#	external/mono
#	tests/xharness/Extensions.cs
2019-02-18 18:04:06 +01:00
Rolf Bjarne Kvinge 95b89d62f3
[tests] Don't put command output in exception message. (#5606)
It can make it very hard to get an overview of test reports, if failing
commands have a lot of output.
2019-02-14 16:33:46 +01:00
Alexander Köplinger ea1e8b0572 MachO.cs: Support reading LC_BUILD_VERSION
Newer SDKs set this instead of LC_VERSION_MIN_*
2019-02-13 03:19:14 +01:00
Rolf Bjarne Kvinge 5385f44021 [xharness] Some style/debug fixes. 2019-02-11 13:49:38 +01:00
Rolf Bjarne Kvinge e29de11c04
Merge pull request #5568 from rolfbjarne/issue-5553-xcode10.2
[build] Make sure -mmacosx-version-min is passed to the mono build. Fixes #5553
2019-02-11 12:25:07 +01:00