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

8649 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 5327564109
[AppKit/UIKit] Merge the definitions of NS[Mutable]ParagraphStyle. (#9261)
* Reduces code duplication.
* Makes the macOS versions thread-safe (the iOS versions have been thread-safe
  for years: 2c6a5303a7).
* A few parameters names were different in the definitions; I chose to keep the ones in Xamarin.iOS, since they looked better.
* Xamarin.Mac had two methods, SetTextBlocks and SetTextLists, in place of an actual property override (for the mutable setter), this was fixed to be an actual property overload, and compat methods were implemented.
* xtro needed an update to cope with multiple static methods for the same selector.
2020-08-04 14:25:24 +02:00
Rolf Bjarne Kvinge 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
Manuel de la Pena 53dcedc060
[DevOps] Add missing envi var to ensure we can set the status of the build. (#9263) 2020-08-03 16:21:52 -04:00
Rolf Bjarne Kvinge 691e8eac7a
[xharness] Improve parsing of NUnitV2 xml reports to fix an issue with failures in parameterized tests. (#9259)
We weren't properly reporting all failures when there were multiple failures
in parameterized tests, because we'd incorrectly skip too many xml nodes when
we were looking for the next test failure.
2020-08-03 18:51:30 +02:00
Rolf Bjarne Kvinge 7e9a60d690
[xharness] Fix main log parsing by not requiring it to come from a file. (#9258)
Not all types of logs have files, but all types of logs have a reader (or will
have soon due to PR #9257).
2020-08-03 18:51:09 +02:00
Rolf Bjarne Kvinge f7cd7d3cad
[xharness] Implement Log.GetReader for all loggers. (#9257)
This makes it easier to write code that parses logs, since that code won't
have to worry about if a particular log supports GetReader or not.
2020-08-03 18:51:01 +02:00
Rolf Bjarne Kvinge 6978026454
[mtouch/mmp] Add a few instructions to the list of instructions that we don't know how to calculate a constant value for. (#9260)
This improves (shrinks) the debug spew when running mtouch or mmp in the IDE.
2020-08-03 18:49:23 +02:00
Rolf Bjarne Kvinge 77771f7893
[xharness] Don't try to parse a build log that doesn't exist. (#9253) 2020-07-31 19:32:33 +02:00
Rolf Bjarne Kvinge 1e6e17cb2d
[xharness] Resolve relative project references using the referencing project's directory. (#9252)
Otherwise it would end up being resolved from the current directory, which is
not dependable.
2020-07-31 16:50:34 +02:00
Rolf Bjarne Kvinge cc06a93976
[xharness] Mark the .NET tests project as a .NET project so that we don't try to call nuget restore on it. (#9251)
* [xharness] Mark the .NET tests project as a .NET project so that we don't try to call nuget restore on it.

* [xharness] Mark the .NET generator project as a .NET project as well.
2020-07-31 16:50:10 +02:00
Rolf Bjarne Kvinge 58e10cbf39
[msbuild] Fix arguments to error logging for GetMinimumOSVersionTask. (#9248)
The filename arguments to the error logging must be strings, otherwise the
wrong logging overload is picked, and the resulting error message makes no
sense.
2020-07-31 15:21:13 +02:00
Rolf Bjarne Kvinge d9295b12ef
[msbuild] Default 'BundlerDebug' to 'true' if no other option is set and we're building for a 'Debug' configuration. (#9247)
It's somewhat of a breaking change, since previously Xamarin.Mac would default
to 'false' if no value was set. It should be exceedingly rare though, since
it's set in all the template projects.

It makes the behavior a bit more intuitive for .NET projects, since then the
values might not be set because of the simplified project files.
2020-07-31 15:21:02 +02:00
Rolf Bjarne Kvinge 30650b5f87
[tests] Switch msbuild-mac and mmptest to use package references. (#9246)
And don't specify the solution path anymore, because we can restore using just
the csproj just fine now.
2020-07-31 15:20:50 +02:00
Rolf Bjarne Kvinge 2d28db26d3
Bump .NET 5 to preview.8.20359.11. (#9243)
There are a few linker fixes we need in this version.
2020-07-31 11:59:45 +02:00
Rolf Bjarne Kvinge e3cb32c23b
[tests] Switch msbuild-mac to use package references. (#9245)
And don't specify the solution path anymore, because we can restore using just
the csproj just fine now.
2020-07-31 11:20:09 +02:00
Rolf Bjarne Kvinge 43102c09bf
[tests] Migrate the sample tests to use package references. (#9244) 2020-07-31 11:19:57 +02:00
Manuel de la Pena ec30ba0f6b
[DevOps] Report the correct bot used. (#9250)
* [DevOps] Report the correct bot used.

The tests are not executed in the same agent that sets the github
status, for that reason, the github comment is not giving the correct
bot name, but the name of the bot that executed the commit message and
not the tests.

Add an output var in the runTests step to set the bot name and pass it
to the comment job in a different bot.

* Update tools/devops/device-tests/scripts/GitHub.psm1

Co-authored-by: Whitney Schmidt <whschm@microsoft.com>

Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-07-30 21:29:02 -04:00
Manuel de la Pena f2ce1b885a
[DevOps] The powershell in Windows is older, we do not support the param. (#9223) 2020-07-30 17:36:21 -04:00
Rolf Bjarne Kvinge 631073dafe
[xharness] Improve restoring NuGets for Xamarin.Mac projects in the makefile by depending on the csproj files in addition to the packages.conf files. (#9242)
Packages are listed in the csproj when we're using package references.

Also only list files in git, otherwise we pick up all the generated project files as well.
2020-07-30 17:00:41 +02:00
Rolf Bjarne Kvinge 28e3e2c5b6
[tests] Migrate Xamarin.Mac template projects to use package references. (#9241) 2020-07-30 16:21:10 +02:00
Rolf Bjarne Kvinge 2e59986723
[tests] Migrate the generator tests to use package references. (#9239) 2020-07-30 16:20:39 +02:00
Rolf Bjarne Kvinge ab90bb7a95
[tests] Migrate the mtouch test project to use package references. (#9238) 2020-07-30 16:19:58 +02:00
Rolf Bjarne Kvinge d304198536
[xharness] Make restoring nugets the default for all test projects. (#9237)
But don't do it for .NET projects, since 'dotnet build' automatically restores.
2020-07-30 16:19:53 +02:00
Rolf Bjarne Kvinge 6d26688d1e
[tests] mmptest doesn't need to include MacTestMain.cs (#9236)
Because mmptest is a library, not an executable.
2020-07-30 16:19:41 +02:00
Rolf Bjarne Kvinge 20517782b6
[AppKit] NSScrollView.DocumentView is an NSView. (#9235)
So correct for XAMCORE_4_0.

https://developer.apple.com/documentation/appkit/nsscrollview/1403485-documentview?language=objc
2020-07-30 16:19:34 +02:00
Rolf Bjarne Kvinge dc2404de51
[tests] Migrate the xtro sharpie project to use package references. (#9240)
This also bumps Mono.Cecil to the latest available version (that way we use
the same version as in other tests).
2020-07-30 16:19:08 +02:00
Manuel de la Pena 77965e03ce
[DevOps] Both labs use the same utility pool, lets keep it in one place. (#9225) 2020-07-30 10:08:14 -04:00
Sebastien Pouliot 3c474a71b5
[security] Simplify SecIdentity2.Certificates property (#9226) 2020-07-29 20:57:08 -04:00
Manuel de la Pena c54065c2cf
[DevOps] If test fail but pipeline builds, set the correct status. (#9161)
Depending on the pipeline run, we should have the following result:

* failed: issues with bots or provisioning (red in the UI)
* partiallySucceeded: no issues with bots but failing tests.
* succeeded: no issues with bots and all tests pass.

This adds a psh cmdlet that allows to set the result AND sets the
correct result when we have test failures.


Co-authored-by: Whitney Schmidt <whschm@microsoft.com>
2020-07-29 16:58:47 -04:00
Marius Ungureanu f4d86a7916
Remove some LINQ usages (#9196)
Contributes to fixing #9019
2020-07-29 08:10:49 +02:00
Matthew Leibowitz 6416d06407
Make sure to Uri escape paths (#9198)
If the path to the project or compiled app has spaces, then the URI
that is generated for the on-demand resources in the
AssetPackManifestTemplate.plist file is invalid

Fixes https://github.com/xamarin/xamarin-macios/issues/8452
2020-07-29 08:07:37 +02:00
Rolf Bjarne Kvinge f6aaa6622e
[xharness] Only have a single project per directory (#9149)
We're starting to use NuGet (packages) more and more, and NuGet stores
information about any package references in the bin/obj directories. This
means that if a directory has multiple project files, NuGet will get quite
confused because it will use the wrong package information half the time.

There are steps that can be taken to make NuGet write its package information
in different directories, but this becomes quite cumbersome to keep
up-to-date, and it's confusing when it breaks. It's much easier to just have a
blanket rule that there shouldn't be more than one project per directory.

However, it did require quite a few changes to xharness to fix assumptions
about where files are located.
2020-07-28 17:31:56 +02:00
Rolf Bjarne Kvinge 84a6b63ffe
[msbuild] Fix automatic stripping of release builds by using the correct variable. (#9202) 2020-07-28 09:12:37 +02:00
Rolf Bjarne Kvinge a3a9cf1558 [tests] Update the list of .apps to package. 2020-07-28 08:42:07 +02:00
Rolf Bjarne Kvinge 815de988d3 [xharness] If we're not generating projects in the Target class, the project path equals the template path. 2020-07-27 11:31:19 +02:00
Rolf Bjarne Kvinge b5a1251592 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-27 11:20:16 +02:00
Rolf Bjarne Kvinge 600c90fa66
[mmp] Remove inexistent file from csproj. (#9180) 2020-07-27 10:39:28 +02:00
Sebastien Pouliot ecedb498c7
[generator] Add nullability `?` when [BindAs] is used with an array type (#9179)
Fix two false positives in AVFoundation.
2020-07-24 11:50:26 -04:00
Rolf Bjarne Kvinge e0986916e5
[xharness] Fix how .NET projects are ignored. (#9168)
* [xharness] Fix how .NET projects are ignored.

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

* Fix compile error.
2020-07-24 14:56:08 +02:00
Rolf Bjarne Kvinge dd1205a222
[jenkins] Make it possible to skip running packaged Xamarin.Mac tests by setting the 'skip-packaged-xamarin-mac-tests' label. (#9170)
Diff is best viewed by ignoring whitespace.
2020-07-24 09:21:31 +02:00
Rolf Bjarne Kvinge 7a7c6f6286
[jenkins] Don't try to publish NuGet packages if there are no NuGet packages. (#9171)
Also clean the package directory before creating any packages, otherwise we
might end up trying to upload packages from the previous build.

Diff best viewed by ignoring whitespace.
2020-07-24 09:21:14 +02:00
Rolf Bjarne Kvinge 4a5dc20338
[dotnet] Only pass a single custom step to the linker. (#9173)
* [dotnet] Only pass a single custom step to the linker.

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

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

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

* [tests] Adjust .NET tests according to new behavior.
2020-07-24 09:20:52 +02:00
monojenkins 25b8cbe22b
[msbuild] Makes the xcarchive folder name culture independent (#9175)
Fixes https://developercommunity.visualstudio.com/content/problem/934833/xamarinforms-cant-create-archive-for-ios.html

Depending on the default language of the running OS this could cause translating AM/PM to symbols that are not supported on folder names on Windows.

For instance, the value of `timestamp` without this change for an user that sets Chinese as it's main language would be `8-18-15 1.31 下午`, where `下午` represent PM.

Co-authored-by: emaf <ema@xamarin.com>
2020-07-24 09:15:47 +02:00
Rolf Bjarne Kvinge 96034db9d1 [xharness] Fix finding Info.plist, and add some tests too. 2020-07-24 09:13:33 +02:00
Manuel de la Pena 5d60d6d1c9
[Devops] Use the deployment pool. (#9160) 2020-07-23 15:50:19 -04:00
Manuel de la Pena 685a616de0
[DevOps] Clean all before we run the tests. (#9172) 2020-07-23 15:45:55 -04:00
Rolf Bjarne Kvinge 8b9bfe2877
[dotnet] Add Verbosity to the linker configuration. (#9169) 2020-07-23 18:07:05 +02:00
Rolf Bjarne Kvinge 570a2e03a1
[test-libraries] Don't include all the dependencies in the ar archives we create. (#9167)
We only want the *.o files in the *.a archives, not the source files (*.m files).
2020-07-23 15:37:39 +02:00
Rolf Bjarne Kvinge 4a2236f7e0 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-23 15:37:06 +02:00
Rolf Bjarne Kvinge 1eb0c2cd3b [tests] Info.plists should be inside LogicalName, not Link.
This makes it possible to simplify a bit more code inside xharness as well.
2020-07-23 15:34:58 +02:00