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

79 Коммитов

Автор SHA1 Сообщение Дата
Haritha Mohan f39489fe60
[Vision] Update Xcode 15 support (#19412)
This commit adds some missing bindings and fixes up some of the previous
API that were incorrectly bound with Vector4 instead of Matrix4.

A sample app using some of these latest bindings can be found here:
https://github.com/haritha-mohan/vision-analyzer

Contributes to https://github.com/xamarin/maccore/issues/2719, though
the manual testing ended up not being necessary still helped catch a few
bugs and showcases some of the latest work done for this Xcode release.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2024-01-02 15:17:57 -05:00
Rolf Bjarne Kvinge ad7996ee7b
Add the .NET TFM as a constant to the generated SdkVersions.cs from our Makefile variables. (#19401)
This way we can avoid hardcoding the TFM in a few more places.
2023-11-08 13:36:50 +01:00
Rolf Bjarne Kvinge 6f1c0ea534 [net8.0] Merge main into net8.0. 2023-06-08 13:32:48 +02:00
Rolf Bjarne Kvinge b59587a0cd
[tests] Rework TestRuntime.RunAsync. (#18391)
* Move all the RunAsync logic to the TestRuntime class, instead of having some
  in TestRuntime and some in AppDelegate.
* Create a unified Task-based implementation for all platforms, optionally showing
  a UI on the platforms where we can do that.
* Remove all the overloads that took a DateTime timeout, and instead only use a
  TimeSpan timeout. This simplified some of the code.
* The new Task-based implementation will capture any exceptions (and rethrow most
  of them) from the tasks we're waiting for, so no need to do that in each RunAsync
  caller. This simplifies the testing code a lot for some tests.
* Add a new TryRunAsync method that will return (instead of rethrowing) any exceptions.
  This simplifies some of the testing code (which verifies the correct exception,
  or ignores the test in case of some exceptions).
* The new Task-based implementation will bubble up any NUnit exceptions, which
  means that the tasks we're waiting for can call NUnit's Assert and the right thing
  happens (in particular Assert.Ignore will actually ignore the test).
2023-06-06 21:36:49 +02:00
Rolf Bjarne Kvinge 50cc0bedbe [net8.0] Merge main into net8.0. 2023-05-17 08:28:14 +02:00
Rolf Bjarne Kvinge cdac4507a2
[devops] Stop building test dependencies on each test run. (#18096)
Stop building the test dependencies on each test run, and instead use the archived test dependencies we have from the main build:

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

Building the test dependencies takes ~10 minutes for each test run, so this saves
about that time for each test run.
2023-05-15 18:41:49 +02:00
Rolf Bjarne Kvinge 6e10fd5d27 [net8.0] Merge main into net8.0. 2023-03-14 10:12:55 +01:00
Alex Soto 91781715a9
[CI] [siminstaller] Bump bots to use the Ventura and make siminstaller more resilient (#17760)
## siminstaller

We are getting a `System.IO.IOException: Resource busy`
when trying to detach with hdiutil on Ventura. When reaching
this spot we are really done with the mounted resource so
let's force detaching and in the event that it fails let's
just log since at this point the simulator is installed.

## CI

Bump bots to use the Ventura images, and Add `macOSName`
parameter to our yaml templates.

`macOSName` maps to the `macOS.Name` capability in our bots, this
way we can set the macOS name we want to use on the bots in bot build and tests.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2023-03-14 07:27:00 +01:00
Rolf Bjarne Kvinge 07afcf9e97 [net8.0] Merge main into net8.0. 2023-03-07 18:12:02 +01:00
Rolf Bjarne Kvinge 63e6d9b4e8
[src] Commit some of the response files. (#17718)
We'll soon build and run tests on Windows, and some tests use these response files,
so it makes building these tests on Windows easier if we don't have to re-create
the response files (our generation logic is all written in make, which is not the
easiest on Windows).
2023-03-07 17:32:27 +01:00
Rolf Bjarne Kvinge c54f623141 [tests] Remove 32-bit architectures and logic from project files.
Additionally remove a lot of 64-bit-specific configurations
(Debug64/Release64) as well, and just make the default configurations
(Debug/Release) be 64-bit.
2023-02-02 16:30:29 +01:00
Rolf Bjarne Kvinge 94a3903df7 [tests] Bump min OS versions in all tests. 2023-02-02 16:30:28 +01:00
dustin-wojciechowski 51bee958f0
Added GPSLatitudeRef and GPSLongitudeRef to CGImagePropertiesGPS. (#17166)
Fixes #17162

Added GPSLatitudeRef and GPSLongitudeRef to CGImagePropertiesGPS. 
Added new photo to all resources folders that has GPS data. 
Created new test that reads GPS information off a photo and verifies that it is correct.

---------

Co-authored-by: GitHub Actions Autoformatter <github-actions-autoformatter@xamarin.com>
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2023-01-28 09:31:25 -08:00
Rolf Bjarne Kvinge 4453d773ce
[tests] Unify code related to how to load test assemblies. (#17111)
Unify a lot of code related to how to load test assemblies.

This resulted in adding a couple of test assemblies to monotouch-test when executed on macOS (this was a bug), and this also required adapting some of those tests to work correctly on macOS.
2023-01-13 22:20:47 +01:00
Rolf Bjarne Kvinge 480a6ed844
[src/runtime] Fix lookup of RID-specific satellite resources. Fixes #16847. (#17117)
If we're creating a universal app, and here are satellite assemblies that are not
identical across all RuntimeIdentifiers, those assemblies will be stored in a RuntimeIdentifier-specific
subdirectory during the build.

Unfortunately we didn't know how to find those assemblies at runtime, causing localizations
in universal apps to not work.

This change will:

* Add support for looking in the directory where RID-specific satellite assemblies
  are stored.
* Add an assembly resolution event handler to our CoreCLR bridge so that we can
  execute our custom lookup code.
* Add an assembly resource lookup test to monotouch-test.
* Add a macOS + Mac Catalyst variation of monotouch-test to xharness that triggers
  the bug (a universal test app).

Fixes https://github.com/xamarin/xamarin-macios/issues/16847.
2023-01-13 21:58:34 +01:00
Rolf Bjarne Kvinge e54019a336
[dotnet] Make it possible to specify the registrar using a 'Registrar' property in MSBuild. (#15483)
Co-authored-by: Marius Ungureanu <therzok@gmail.com>
2022-08-18 17:21:48 +02:00
Rolf Bjarne Kvinge 42c1c66a14
[SceneKit] Fix SCNMatrix4 in .NET. Fixes #15094. (#15160)
When we changed SCNMatrix4 to be column-major instead of row-major in .NET, there
were several other related changes we should have done but didn't do. In particular
we should have made transformation operations based on column-vectors instead of
row-vectors.

In legacy Xamarin, a vector would be transformed by a transformation matrix by doing
matrix multiplication like this:

    [ x y z w] * [ 11 21 31 41 ]
                 | 12 22 32 42 |
                 | 13 23 33 43 |
                 [ 14 24 34 41 ]

In this case the vector is a row-vector, and it's the left operand in the multiplication.
When using column-major matrices, we want to use column-vectors, where the vector
is the right operand, like this:

    [ 11 21 31 41 ] * [ x ]
    | 12 22 32 42 |   | y |
    | 13 23 33 43 |   | z |
    [ 14 24 34 41 ]   [ w ]

This affects numerous APIs in SCNMatrix4, SCNVector3 and SCNVector4:

* The M## fields have been changed to make the first number the column and the
  second number the row, to reflect that it's a column-major matrix (this is
  also how it's defined in the native SCNMatrix4 type).
* Functions that return a transformation matrix have been modified to return column-vector
  transformers. Technically this means that these matrices are transposed compared
  to legacy Xamarin. The functions involved are:
    * CreateFromAxisAngle
    * CreateRotation[X|Y|Z]
    * CreateTranslation
    * CreatePerspectiveFieldOfView
    * CreatePerspectiveOffCenter
    * Rotate
    * LookAt
* Combining two column-vector transforming transformation matrices is done by multiplying
  them in the reverse order, so the Mult function (and the multiplication operator)
  have been modified to multiply the given matrices in the opposite order (this matches
  how the SCNMatrix4Mult function does it). To make things clearer I've changed the
  parameter names for XAMCORE_5_0.
* Functions that transform a vector using a transformation matrix have been modified
  to do a column-vector transformation instead of a row-vector transformation. This
  involves the following functions:
    * SCNVector3.TransformVector
    * SCNVector3.TransformNormal
    * SCNVector3.TransformNormalInverse
    * SCNVector3.TransformPosition
    * SCNVector4.Transform
* Numerous new tests.

Fixes https://github.com/xamarin/xamarin-macios/issues/15094.
2022-06-17 20:17:05 +02:00
Rolf Bjarne Kvinge 3d904dae2c
[tests] A few test fixes to make testing system installs better. (#14652)
* Make the custom-type-assembly library build using assemblies relative to
  MAC_DESTDIR, instead of poking into $(TOP)/_mac-build (for legacy Xamarin).
* Build the custom-type-assembly using a project file for .NET (and use our
  local .NET).
* Change the default for [IOS|MAC]_DESTDIR when TESTS_USE_SYSTEM is set to
  point to the system installation.
* Make sure 'MSBuildSDKsPath' isn't set when building the custom-type-assembly
  (set by xibuild), it breaks a lot of things.
2022-04-06 08:35:25 +02:00
Manuel de la Pena e07b7bef79
[CI] Move tests outside of the build machine. (#14105)
Move the execution of tests to a diff bot to be compliant with the latests EO.
2022-03-10 23:36:37 -05:00
Rolf Bjarne Kvinge 63de01c21c
[tests] Fix packaging of Xamarin.Mac tests. (#12776)
I recently deleted the generated makefile support for building and running our
test suites. It turned out that it was used for building the packaged
Xamarin.Mac tests, so it wasn't as unused as I thought.

So fix the building and packaging of Xamarin.Mac tests to not use the
(non-existent) makefile targets, but instead replicate it with manual make
code.

Also take the opportunity to add packaging and execution of the .NET versions
of these test suites we execute on other macOS versions (both for macOS and
the Mac Catalyst).

* [devops] Use stricter matching when finding the Xamarin.Mac pkg link.

Otherwise the branch name in any package could end up matching the pattern we
were looking for:

	XM_PACKAGE=https://bosstoragemirror.blob.core.windows.net/wrench/tests-package-xamarin-mac-tests/15759261d425ae08494b0a26862a0b1356c5f8ec/5268864/package/Microsoft.iOS.Bundle.15.0.101-ci.tests-package-xamarin-mac-tests.68.pkg

is just clearly wrong.
2021-10-06 08:10:07 +02:00
Rolf Bjarne Kvinge 34772d23bc
[Runtime] Don't skip dynamic user type checking as long as dynamic registration is supported. (#11588)
When checking whether a type is a user type or not, we might have to do a
dynamic check if the dynamic registrar is available. Otherwise we may run into
a situation where the static registrar ran during the app build, but then the
app loaded additional assemblies at runtime, and those assemblies contained
user types that were registered using the dynamic registrar, so the static
registrar doesn't know about those custom types (in other words: we need to
check at runtime).
2021-05-18 16:28:09 +02:00
Rolf Bjarne Kvinge c398519565 [tests] Add an ARM64 configuration of xammac tests. 2021-05-11 15:54:39 +02:00
Rolf Bjarne Kvinge 68e67835f1
[xammac tests] Add Bluetooth description in the Info.plist. (#11496)
Otherwise the test app crashes when running within lldb.
2021-05-11 15:54:24 +02:00
Rolf Bjarne Kvinge 93bbfe7a86
[tests] Merge apitest into xammac_tests. (#10276)
* [apitest] Sanitize files by adding missing eols.

* [apitest] Add #if __MACOS__ to all test files.

In preparation for the move into monotouchtest.

* [apitest] Move test files into monotouchtest.

* [tests] Remove the apitest project.

* [monotouch-test] Remove MessagingMac.cs, it's not needed.

* [xammac-tests] Add file PlatformInfo.cs to the build.

* [xammac-tests] Move files into monotouch-test.

* [monotouch-test] Rename test class to not clash with another test class of the same (Objective-C) name.

* [tests] How did this ever work?

Answer: it never did.

* [monotouch-test] Remove duplicated test code.

* [xammac-tests] Define DYNAMIC_REGISTRAR when we're using the dynamic registrar.

* [monotouch-test] Adjust the BundleTest.TestGetBundleId test to cope with having multiple apps for the same bundle id.

* [monotouch-test] Ignore a test that doesn't work with the static registrar (due to a bug in the static registrar).
2020-12-18 11:45:06 +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 9cbde483a9
[tests] Set DEVELOPER_DIR when calling xcrun manually. (#9859)
This fixes build problems that may occur when the various versions of Xcode
(system Xcode, VSMac Xcode, '/Applications/Xcode.app' symlink) don't agree on
which Xcode is THE Xcode:

    CustomMetalSmelting:
      Creating directory "bin/iPhone/Debug-unified/monotouchtest.app".
      xcrun -sdk iphoneos metal -c Resources/fragmentShader.metal -o obj/iPhone/Debug-unified//fragmentShader.air -mios-version-min=11.0
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEWatchSupportUI.ideplugin (com.apple.dt.IDEWatchSupportUI) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEWatchSupportCore.ideplugin (com.apple.dt.IDEWatchSupportCore) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IBCocoaTouchBuildSupport.ideplugin (com.apple.dt.IDE.IBCocoaTouchBuildSupport) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for GPUDebuggerOSXSupport.ideplugin (com.apple.dt.gpu.GPUDebuggerOSXSupport) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEOSXSupportCore.ideplugin (com.apple.dt.IDE.IDEOSXSupportCore) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEOSXSupportUI.ideplugin (com.apple.dt.IDE.IDEOSXSupportUI) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IBAppleTVBuildSupport.ideplugin (com.apple.dt.IDE.IBAppleTVBuildSupport) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEInterfaceBuilderAppleTVIntegration.ideplugin (com.apple.dt.IDE.IDEInterfaceBuilderAppleTVIntegration) not present
      2020-10-14 09:09:03.985 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEInterfaceBuilderWatchKitIntegration.ideplugin (com.apple.dt.IDE.IDEInterfaceBuilderWatchKitIntegration) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEInterfaceBuilderWatchKitBuildSupport.ideplugin (com.apple.dt.IDE.IDEInterfaceBuilderWatchKitBuildSupport) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for GPUDebuggertvOSSupport.ideplugin (com.apple.dt.gpu.GPUDebuggertvOSSupport) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEAppleTVSupportUI.ideplugin (com.apple.dt.IDEAppleTVSupportUI) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEAppleTVSupportCore.ideplugin (com.apple.dt.IDEAppleTVSupportCore) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for DVTAppleTVSupportCore.dvtplugin (com.apple.dt.DVTAppleTVSupportCore) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for GPUDebuggeriOSSupport.ideplugin (com.apple.dt.gpu.GPUDebuggeriOSSupport) not present
      2020-10-14 09:09:03.986 xcodebuild[59510:1676867] [MT] DVTPlugInManager: Required plug-in compatibility UUID C80A9C11-3902-4885-944E-A035869BA910 for IDEiOSPlatformSupportCore.ideplugin (com.apple.dt.IDEiOSPlatformSupportCore) not present
      2020-10-14 09:09:04.081 xcodebuild[59510:1676867] [MT] DVTPlatform: Required content for platform watchOS is missing.
      Domain: DVTFoundationErrorDomain
      Code: 4
      Recovery Suggestion: Please reinstall Xcode.
      --
      No Xcode.DVTFoundation.ExtendedPlatformInfo extension found for platform with identifier com.apple.platform.watchos
      Domain: DVTExtendedPlatformInfoErrorDomain
      Code: 2
      --
    xcodebuild : error : Initialization failed. [[...]/xamarin-macios/tests/monotouch-test/monotouch-test.csproj]
      	Reason: Required content for platform watchOS is missing.
    xcrun : error : sh -c '/Applications/Xcode_11.7.0.app/Contents/Developer/usr/bin/xcodebuild -sdk iphoneos -find metal 2> /dev/null' failed with exit code 17920: (null) (errno=No such file or directory) [[...]/xamarin-macios/tests/monotouch-test/monotouch-test.csproj]
    xcrun : error : unable to find utility "metal", not a developer tool or in PATH [[...]/xamarin-macios/tests/monotouch-test/monotouch-test.csproj]
    [...]/xamarin-macios/tests/monotouch-test/monotouch-test.csproj(385,5): error MSB3073: The command "xcrun -sdk iphoneos metal -c Resources/fragmentShader.metal -o obj/iPhone/Debug-unified//fragmentShader.air -mios-version-min=11.0" exited with code 72.
2020-10-14 19:19:00 +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
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
Rolf Bjarne Kvinge 96615bbd67 [tests] The upstream NUnitLine isn't linker safe, so add an xml file to make sure linking doesn't remove too much.
In particular NUnit uses reflection to get a private method, and the linker removes
the corresponding private method:

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

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

Some care needs to be taken to make sure xharness is still able to clone these project
files.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 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 cff47214ec [tests] Move bindings-test[-mac].csproj to their own directory. 2020-07-21 17:24:15 +02:00
Manuel de la Pena c568f42571
[Tests] Add missing resource needed by tests. Fixes #2248 (#8954)
New test that did not consider that tests are shared with mac os x.

fixes: #2248
2020-06-25 11:58:41 -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 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02: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 5b7ea53e2e [monotouch-test] Fix ProxyTest according to changed behavior in iOS 13.
In iOS 13 it's no longer possible to get PACs from file:// urls (this is
explained in the release notes, so it's expected). So launch a local
httpserver and serve the PAC that way.
2019-09-16 15:21:29 +02:00
Rolf Bjarne Kvinge c7522b3a71 Fix broken merge. 2019-09-16 15:21:24 +02:00
Rolf Bjarne Kvinge 2c66d68277 Fix a few merge breakages. 2019-09-16 15:20:59 +02:00
Rolf Bjarne Kvinge 303aa0a649 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Rolf Bjarne Kvinge 18321c6069
[xammac_tests] Fix a few issues after the latest beta. Fixes xamarin/maccore#1886. (#6575)
* [monotouch-test] Adjust EventKitCalendarTest for the latest Xcode 11 beta (3). Partial fix for xamarin/maccore#1886.
 
Partial fix for https://github.com/xamarin/maccore/issues/1886.

* [xammac_tests] Add missing resources files. Partial fix for xamarin/maccore#1886.

Partial fix for https://github.com/xamarin/maccore/issues/1886.

Fixes https://github.com/xamarin/maccore/issues/1886.
2019-07-12 09:12:10 -07:00
Jonathan CONTE 9f0a3104b1 [appkit] Add signatures to NSGridView.Create and deprecate the actual one. Fixes #6232. (#6453)
Fixes https://github.com/xamarin/xamarin-macios/issues/6232
2019-07-07 22:36:12 -07:00
Rolf Bjarne Kvinge 6e5ec5b5a4
[tests] Ignore all compiler warnings in apitest, introspection, monotouch-test and xammac tests. (#6430)
Nobody cares about them anyway, and they keep filling my terminal with useless
text.
2019-06-27 15:34:36 +02:00
Rolf Bjarne Kvinge 2fe7377003
[tests] Remove 32-bit Xamarin.Mac tests (both Classic and Unified). (#6301)
* [tests] Remove 32-bit Xamarin.Mac tests (both Classic and Unified).

We're removing support for 32-bit Xamarin.Mac apps (#6300), which means we
don't need to run the tests anymore.

This part of the implementation for #6300, I'm starting with the tests because
some of our XM/Classic tests are failing and making the bots unnecessarily red
(since we'll remove XM/Classic support anyway). Also CI will be faster if we
don't run these tests.

* [mmptest] Fix build.

* [tests] Fix build for mono-native-mac.csproj.
2019-06-17 08:03:58 +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
Rolf Bjarne Kvinge 96517671f6 [Metal] Sprinkle [return: Release] on all 'new*' selectors. Fixes #5941.
Also add tests for all the API I could figure out how to use.

Fixes https://github.com/xamarin/xamarin-macios/issues/5941.
2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 0ce0010824
[Metal] Sprinkle [return: Release] on all 'new*' selectors. Fixes #5941. (#6159)
* [Metal] Sprinkle [return: Release] on all 'new*' selectors. Fixes #5941.

Also add tests for all the API I could figure out how to use.

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

* [tests] MTLFunctionConstantValues didn't have a default ctor until Xcode 9.

* [tests] Use a higher offset when calling MTLBuffer.CreateTexture to try to comply with the requirements for the API.

Hopefully fixes this assertion:

> 07:42:06.7701360 validateStrideTextureParameters:1512: failed assertion `Linear texture: bytesPerRow (64) must be aligned to 256 bytes'

which doesn't happen on my machine.

* Fix whitespace.

* Simplify nested usings.

* Fix availability correctly.
2019-05-29 22:06:14 -07: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
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 39c61cca88 REVERTME: Add workaround for missing System.Drawing.Common reference 2019-03-20 01:32:48 +01:00
Rolf Bjarne Kvinge 23b7847066 Merge remote-tracking branch 'origin/master' into mono-2018-08 2018-11-26 08:05:36 +01:00