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

26 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 536f0a1ab7
[runtime] Add support for additional type encodings. Fixes #18562. (#20521)
Fixes https://github.com/xamarin/xamarin-macios/issues/18562.
2024-05-23 16:21:43 +02:00
Rolf Bjarne Kvinge 6dc1f4c69b
[msbuild/dotnet] Automatically link with Swift's system libraries if a binding project has the IsSwift=true property. (#20546)
Add support for the LinkWithSwiftSystemLibraries metadata to specify whether a native library is a Swift library, in which case we'll automatically set the `LinkWithSwiftSystemLibraries` MSBuild property to `true`.

Also add a test.
2024-05-20 20:17:29 +02:00
Rolf Bjarne Kvinge b51bcfa531
[tests] Fix all the remaining warnings in monotouch-test, EmbeddedResources and bindings-test. (#19722)
And also make sure we don't introduce any new warnings by making them errors.
2024-01-08 07:41:48 +01:00
Rolf Bjarne Kvinge c1f25e6f66
[tests] Ignore numerous warnings in the EmbeddedResources, bindings-test and monotouch-test test projects. (#19692)
This cuts down a lot of the warnings we get when building monotouch-test, in
particular the availability warnings, which we don't care about since these
are test projects.
2023-12-22 08:03:27 +01: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 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 30436599f2
[tests] Remove a few duplicated package references. (#16613)
The NUnitLite package is already included in the shared-dotnet.csproj file,
which these projects import.
2022-11-07 16:50:39 +01:00
Rolf Bjarne Kvinge a1d0b6eba9
Make our local .NET the default .NET for the build. (#15086)
Make our local .NET the default .NET (in the root's global.json), and then if
a directory wants to use the system .NET, then that directory would have to
opt-in (using its own global.json).

This way we don't have to copy global.json/NuGet.config files around to run
tests with the correct .NET setup.
2022-06-07 10:11:02 +02:00
Rolf Bjarne Kvinge a46afd0147
[tests] Use 'BundledNETCoreAppTargetFrameworkVersion' to specify the .NET version in the project files. (#14666)
This way we don't have to update all these files when moving to .NET 7.
2022-04-06 20:58:20 +02:00
Rolf Bjarne Kvinge bc2a5e2251
[xharness] Inline the dotnet-shared.csproj file as well when inlining shared imports. (#13514)
This fixes a problem where we'd build the same project reference from
dotnet-shared.csproj in parallel, and each build would stomp on eachother
(because we'll now clone the project references in dotnet-shared.csproj).

This als required updating project files to use MSBuildThisFileDirectory
instead of MSBuildProjectDirectory, which makes it easier for xharness to
inline/process these files, because MSBuildThisFileDirectory is easy to know
when processing a file, while MSBuildProjectDirectory depends on the calling
project, which complicates matters significantly.

A fix in MonoTouch.Dialog was also required.

New commits in migueldeicaza/MonoTouch.Dialog:

* migueldeicaza/MonoTouch.Dialog@59fbf5b [dotnet] Shared project files don't need the DefaultTargets/ToolsVersion/xmlns attributes.

Diff: 4d0e0a9a5f..59fbf5bb1b

Fixes https://github.com/xamarin/maccore/issues/2527.
2021-12-16 19:01:39 +01:00
Rolf Bjarne Kvinge 941507525e
[tests] Unify .NET test projects (#13474)
* Make the .NET project files for BundleResources and EmbeddedResources follow
  the pattern of all the other test projects.
* Move the LangVersion and AllowUnsafeBlocks propertieso to the shared project
  file.
2021-12-01 20:00:14 +01:00
Rolf Bjarne Kvinge 78f52e2fc2
[msbuild/tests] Add support for xcframeworks with static libraries in them. (#13459)
* [tests] Create a libtest.xcframework and libtest2.xcframework

* [tests] Make bindings-test and bindings-test2 use an xcframework instead of plain static library

* [msbuild] Add support for xcframeworks with static libraries in them.

* List the frameworks libtest needs.

* [tests] Update .NET unit tests according to test project changes.

* [tests] Add new test to verify that packing an old-style binding project doesn't work.
2021-11-30 18:19:22 +01:00
Rolf Bjarne Kvinge 85a9791b51
[tests] Some improvements for the bindings-test2 project for .NET. (#13447)
* Remove the watchOS project, we don't support watchOS for .NET at the moment.
* Rename shared.targets to shared.csproj to match all the other test projects.
* Move a bit more code into the shared project file (shared.csproj).
* Add a Makefile for each platform.
2021-11-26 07:22:34 +01:00
Rolf Bjarne Kvinge 66e596e9d9
[tests] Change TestRuntime.CheckSystemVersion to take a ApplePlatform value instead of a PlatformName enum. (#13350)
The PlatformName enum will be removed from .NET soon.
2021-11-15 08:06:36 +01: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 5b4301f129
[tests] Add .NET makefiles for bindings-test. (#12712) 2021-09-16 08:20:35 +02:00
Rolf Bjarne Kvinge 77a838ac70
[tests] Rework the bindings-test and fsharplibrary test projects to follow the pattern of the other .NET test projects. (#12431)
* [tests] Make fsharplibrary follow the pattern of the rest.

* [tests] Make bindings-test follow the pattern of the rest.
2021-08-14 08:09:10 +02:00
Rolf Bjarne Kvinge d9ec37ca2d
[tests] Build a macOS/arm64 version of libtest. (#11364)
Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2021-04-29 13:41:52 +02:00
Rolf Bjarne Kvinge a97d95b0f9 [tests] Add test projects for .NET 6/Mac Catalyst. 2021-02-23 07:59:13 +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 062352ccae [tests] Use 'Microsoft.NET.Sdk' instead of 'Microsoft.<platform>.Sdk'. 2020-10-16 14:27:57 +02:00
Rolf Bjarne Kvinge d2788511b6
[dotnet] Use net5.0-[ios|tvos|watchos|macos] TargetFrameworks. (#9532)
* [dotnet] Set TargetPlatformSupported when the right TargetPlatformIdentifier is used.

* [dotnet] Generate a list of valid OS versions for each platform, and add it to the SupportedTargetPlatform item group.

The generated files: https://gist.github.com/rolfbjarne/765c4e4b38b1b017380c9378d9666317

* [dotnet] Define and set the default platform version if it's not set in the TargetFramework variable.

* [dotnet] Switch to using the new-style TargetFramework values.

This includes bumping spouliot/Touch.Unit to get new-style TargetFramework values for Touch.Client.

* spouliot/Touch.Unit@89afaf7 [Touch.Client] Use the right TargetFrameworks for watchOS and macOS as well. (#92)
* spouliot/Touch.Unit@fd0e576 [Touch.Client] Use the right TargetFrameworks. (#91)
* spouliot/Touch.Unit@40f47db [Touch.Client] Add a macOS and watchOS version for .NET. (#90)
* spouliot/Touch.Unit@1d4b8c0 Add .gitignore for NuGet.config and global.json. (#89)
* spouliot/Touch.Unit@49441f3 Call `mlaunch` instead of `mtouch` (#88)
* spouliot/Touch.Unit@b157cf4 Fix a few markdown issues found by markdownlint. (#87)

Diff: d7f55a6167..89afaf7e05

* [dotnet] Document the script that generates the lists of the target platform versions a little bit better.

* [dotnet] Make the [Platform]SupportedTargetPlatform variables public.

This matches how Android and Windows do it:

* https://github.com/xamarin/xamarin-android/pull/5007
* 18ee4eac8b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.WindowsSupportedTargetPlatforms.props

* [xharness] Update the TargetFramework value when creating project variations.
2020-08-31 09:27:19 +02:00
Rolf Bjarne Kvinge 6186e98de8 [tests] Fix binding project file path 2020-08-14 18:33:28 +02:00
Rolf Bjarne Kvinge d883eb4725 [tests] Add a tvOS and watchOS version of the bindings-test project for .NET 2020-08-10 16:12:42 +02:00
Rolf Bjarne Kvinge 43d234de52 [tests] Add a macOS version of the bindings-test project for .NET
This required disabling some Xamarin.Mac-specific binding code in .NET mode.
2020-08-10 16:12:42 +02:00
Rolf Bjarne Kvinge 89e5bb15f7 [tests] Port bindings-test to .NET 2020-08-10 16:12:41 +02:00