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

7604 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge b0242cfe48
[msbuild] Fix MT4174 warning for the MyWatchKit2IntentsExtension test project. (#7842)
Fixes:

> MyWatchKit2IntentsExtension/IntentHandler.cs(36): warning MT4174: Unable to locate the block to delegate conversion method for the method MyWatchKit2IntentsExtension.IntentHandler.ResolveRecipients's parameter #2. [MyWatchKit2Extension/MyWatchKit2Extension.csproj]

The method signature probably changed from a beta release to the corresponding
stable release, and this method was never updated.
2020-02-11 15:27:08 +01: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
Manuel de la Pena bd171282cf
[XHarness] USe static variables for common test names. (#7837)
One of the reason why we lost the TestReport was because the xml added
from the new code did not use the same name for the log as the expected
one (https://github.com/xamarin/xamarin-macios/pull/7835/files#diff-03773861bcef485bf343300f31b60b0eR374).

If we are going to be using the description as a way to decide what is
going to be done with it, lets use static vars so that we do not have
logs added with the wrong name.
2020-02-11 06:42:21 -05:00
Manuel de la Pena 072c262b9b
[XHarness] Do write the TestReport when we have xUnit results. (#7835)
Add code to write the TestReport when we have xunit results. Also
refactored code for the NUnit format to not use LINQ, it will use less
memory and in the future we can move to async (not now since it might
raise other problems).

fixes: https://github.com/xamarin/xamarin-macios/issues/7826
2020-02-10 21:44:33 -05:00
Manuel de la Pena aed935a918
[Jenkins] Do not notarize on PRs. (#7836)
It was added as a backup and has not been needed. With the updates to
catalina it makes builds fail on CI.
2020-02-10 19:25:44 -05:00
Sebastien Pouliot 7cbf90c5c6
[tests] Add cecil-based unit tests (#7825)
Only one to start... it's been discussed before but we generally
found other ways to do them. Let's continue to pick the best place
but we now have more options :)
2020-02-10 17:23:12 -05:00
Rolf Bjarne Kvinge 4c496a87ed
[msbuild] Make sure DeviceSpecificOutputPath is a relative path. (#7832)
It might be absolute at least sometimes when building with dotnet, and making
sure it's always a relative path simplifies the code.
2020-02-10 22:31:18 +01:00
Rolf Bjarne Kvinge 999ba8e278
[builds] Make sure downloaded files have a newer timestamp than any other file from previous builds. (#7833)
This makes sure we actually use the new files we downloaded.
2020-02-10 22:30:52 +01:00
Marius Ungureanu f841b1eb51
Use sizeof instead of Marshal.Sizeof (#7558) 2020-02-10 14:41:31 -05:00
Sebastien Pouliot f0e80eb11e
[objcruntime] Fix CS0105 warning in Registrar.cs (#7821)
```
src/ObjCRuntime/Registrar.cs(57,7): warning CS0105: The using directive for 'Xamarin.Bundler' appeared previously in this namespace
```
2020-02-10 08:11:54 -05:00
Sebastien Pouliot 482a63dc56
Update sampletester docs and fix typos (#7822) 2020-02-10 08:10:40 -05:00
Manuel de la Pena f27d428773
[Harness] Just try to generate the report when is NUnit. 2020-02-07 20:23:04 -05:00
Manuel de la Pena c169895499 [Harness] Just try to generate the report when is NUnit.
Use the xml parsing helper methods to decide if the xml can be parsed
and if we will be able to generate the report. That way we avoid an
exception that makes the CI noise.
2020-02-07 17:00:26 -05:00
Sebastien Pouliot afe664fd95
[jenkins] Switch to use the catalina bot group (#7819) 2020-02-07 13:02:15 -05:00
Manuel de la Pena c6650dfb14
[master] Bump mono to pickup needed nunitlite changes. (#7812)
* [master] Bump mono to pickup needed nunitlite changes.

Commits are:

* [interp] context can be uninitialized for get_resume_state callback (#18535) mono/mono@455cf7d
* [2019-12] [debugger] Native thread not executing managed code considered as terminated (#18504) mono/mono@a979811
* [jit] Compute has_references correctly for gshared types whose constraint is a generic valuetype. Also emit write barriers correctly for these types. (#18562) mono/mono@f9e5a6d
* [2019-12] Bump msbuild to track mono-2019-10 (#18577) mono/mono@01be275
* [runtime] Disable lldb backtrace display on osx, it hangs on attaching in lldb. (#18591) mono/mono@ef8188a
* configure.ac: remove AC_SEARCH_LIBS for libintl (#18595)  mono/mono@e55302c
* Bump bockbuild for Pango patch 1e2d68b
* [corlib] Split corlib xunit tests even more for iOS (#18620)  mono/mono@8b72dbb
* [2019-12] [merp] MONO_DEBUG=no-gdb-stacktrace shouldn't disable MERP (#18611) mono/mono@4c93e38
* [aot] Avoid inflating gparams with byreflike types during generic sharing. (#18682) mono/mono@0011444
* Update deprecated query parameter to header (#18705) mono/mono@e65846b
* [NUnitLite] Bump nunitlite submodule. (#18733)  mono/mono@36073a0

Diff: 2edccc52a7...36073a0c74

Other commits need for this to land"


* Add a MONO define so that we get the extensions written for mono.
* Update the sources on iphone to remove the TextUI which is not used.
* BONUS: Remove an annoying warning when compiling NUnitLite
* Update the templates too which are use by xharness.
```
warning CS0659: 'ResultState' overrides Object.Equals(object o) but does not override Object.GetHashCode()
```
2020-02-07 09:56:41 -05:00
Jonathan Peppers bba8fe731f
[msbuild] remove {GAC} from $(AssemblySearchPaths) (#7815)
Fixes: https://developercommunity.visualstudio.com/content/problem/788505/xamarin-found-conflicts-between-different-versions.html
Fixes: http://work.azdo.io/1008385
Context: 73b93c2dc9/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets (L337-L341)

On Windows only, Xamarin.Forms projects hit the build warning:

    Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3277: Found conflicts between different versions of "System.Numerics" that could not be resolved.
    These reference conflicts are listed in the build log when log verbosity is set to detailed.

The difference appears to be the `{GAC}` search path is used on
Windows, but not Mac.

In fact, the output of `<ResolveAssemblyReference/>` on Mac reports:

    Unused locations
        {CandidateAssemblyFiles}
        {HintPathFromItem}
        {Registry:Software/Microsoft/Xamarin.iOS,v1.0,AssemblyFoldersEx}
        {AssemblyFolders}
        {GAC}
        bin/iPhoneSimulator/Debug/
    Used locations
        {TargetFrameworkDirectory}
        {RawFileName}

Compared to Windows:

    Used locations
        {TargetFrameworkDirectory}
        {GAC}
        {RawFileName}

For now, we should just remove `{GAC}` from the list as the safest fix.

Xamarin.Mac is already doing this:

f85556c1e5/msbuild/Xamarin.Mac.Tasks/Xamarin.Mac.Common.props (L121-L125)

Down the road, we could specify only the paths needed for performance
reasons. We have done this recently in Xamarin.Android:

5945e9a779/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets (L382-L386)

* Added a test assertion for this as well.
2020-02-07 08:54:29 -06:00
Waleed Chaudhry f85556c1e5
[mtouch] Fix tests broken by localization (#7798) 2020-02-06 11:14:10 -05:00
Manuel de la Pena 9451dd2e71
Bump TouchUnit to pick up changes neeed for attachments on VSTS. (#7808)
New commits in spouliot/Touch.Unit:

* spouliot/Touch.Unit@8ae0474 [Touch.Server] Included option to skip log file header
* spoulio/Touch.Unitt@c1ddbf3 Corrected the alignment style to utilize tabs vs spaces.
* spouliot/Touch.Unit@a145cac [Xml] Allow to specify the xml formatter to be used in a run. (#55)

Diff: d22825a7d1..8ae0474e9e
2020-02-06 11:05:58 -05:00
Rolf Bjarne Kvinge 5cac2eafd3
[msbuild] Don't add newlines to command line arguments to mmp. (#7806)
Don't separate command-line arguments to mmp with newlines, in dotnet those
newlines are passed to mmp instead of being treated as whitespace, and that
confuses mmp.

Also remove additional and unneeded whitespace in the command line arguments,
the CommandLineArgumentBuilder class already adds whitespace when needed.
2020-02-06 15:34:21 +01:00
Rolf Bjarne Kvinge 9960ee43de
[msbuild] Fix several issues in the MyWatchApp2 test project. (#7804)
* [msbuild] Fix the MyWatchApp2 test project to include resources already present.

Fixes several warnings:

> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The file "Icon-27.5x27.5@2x.png" for the image set "AppIcons" does not exist. [MyWatchApp2/MyWatchApp2.csproj]
> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The file "Icon-86x86@2x.png" for the image set "AppIcons" does not exist. [MyWatchApp2/MyWatchApp2.csproj]
> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The file "Icon-40x40@2x.png" for the image set "AppIcons" does not exist. [MyWatchApp2/MyWatchApp2.csproj]
> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The file "Icon-44x44@2x.png" for the image set "AppIcons" does not exist. [MyWatchApp2/MyWatchApp2.csproj]
> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The file "Icon-24x24@2x.png" for the image set "AppIcons" does not exist. [MyWatchApp2/MyWatchApp2.csproj]
> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The file "Icon-98x98@2x.png" for the image set "AppIcons" does not exist. [MyWatchApp2/MyWatchApp2.csproj]
> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The file "Icon-29x29@2x.png" for the image set "AppIcons" does not exist. [MyWatchApp2/MyWatchApp2.csproj]
> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The file "Icon-29x29@3x.png" for the image set "AppIcons" does not exist. [MyWatchApp2/MyWatchApp2.csproj]

* [msbuild] Add a 1024x1024 icon to the MyWatchApp2 test project.

Fixes this warning:

> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : A 1024x1024 app store icon is required for watchOS apps [MyWatchApp2/MyWatchApp2.csproj]

* [msbuild] Remove the longLook icon entry for MyWatchApp2.

It doesn't seem to be a valid entry, there's no such entry when creating a
watchOS app in Xcode. Additionally it fixes this warning:

> MyWatchApp2/obj/iPhoneSimulator/Debug/actool/cloned-assets/Resources/Images.xcassets : actool warning : The app icon set "AppIcons" has an unassigned child. [MyWatchApp2/MyWatchApp2.csproj]
2020-02-06 07:26:20 +01:00
Manuel de la Pena fe2b014d6a
[XHarness] Refactor xml code to make the AppRunner class cleaner. (#7794)
There is a lot of logic related to xml in the AppRunner making it more
complicated than needed. Move the methods to a hlper class.
2020-02-05 21:23:44 -05:00
Rolf Bjarne Kvinge 346e29397d
[msbuild] Remove unused files. (#7801) 2020-02-05 23:55:11 +01:00
Rolf Bjarne Kvinge 0557f16e6a
[msbuild] Make code a bit more future-proof. (#7790)
According to review of #7706.
2020-02-05 07:29:29 +01:00
Manuel de la Pena 54217496ac
[VSTS] Update ddfun pipeline to upload xml results. (#7796)
Add two new steps that will ensure that the xml is uploaded to vsts.
2020-02-04 18:51:45 -05:00
Sebastien Pouliot 179d29172c
Bump XI/XM versions after d16-6 branching (#7791) 2020-02-04 15:27:45 -05:00
Manuel de la Pena 0144c3b94f
[Xharness] Fix all xml parsing issues and ensure that the xml can be consumed by VSTS. (#7768)
We ping the tcp listener to know that we have a tcp connection, that is
written in the xml logs, which means that parsing will not work. Ignore
the ping, parse xml, and make sure that the xml that will be consume by
vsts is valid.

This PR also fixes https://github.com/xamarin/maccore/issues/827 which does not longer happen.
2020-02-04 11:03:38 -05:00
Waleed Chaudhry ed16e04923
[Localization] Fix mtouch/mmp errors being referenced in mlaunch (#7784) 2020-02-03 15:19:27 -05:00
Rolf Bjarne Kvinge 5c4b339ed3
[mtouch] Auto-change settings where they're honored for extensions. Fixes #7780. (#7781)
When building extensions, we first store all the mtouch arguments in a file
when msbuild builds the extension, and then when msbuild builds the main
project, we load those arguments again and actually build the extension at the
same time as we build the main app.

As such, it's important to make sure that when we reload the extension
arguments we end up with the exact same build configuration as the first time.

Unfortunately that was not the case regarding the interpreter: we
automatically set the 'EnableRepl' value in Main according to whether the
interpreter was enabled or not, but Main is not called after re-loading the
arguments when building extensions.

Fix this by moving the logic that automatically sets 'EnableRepl' to somewhere
that is executed when re-loading arguments when building extensions.

Fixes https://github.com/xamarin/xamarin-macios/issues/7780.
2020-02-03 18:23:34 +01:00
Rolf Bjarne Kvinge 7bdb167ffe
[msbuild] Remove outdated AppStore and Ad-Hoc configurations from test projects. (#7777) 2020-02-03 13:56:49 +01:00
Rolf Bjarne Kvinge b5b74ff1c4
[msbuild] Remove unused csproj variable. (#7778) 2020-02-03 13:56:36 +01:00
Waleed Chaudhry 00985a55e2
[Localization] mtouch/mmp C# (#7710) 2020-01-31 15:02:52 -05:00
Sebastien Pouliot 35c2aff95f
Bump maccore (updated submission runner) (#7776)
New commits in xamarin/maccore:

* xamarin/maccore@4a09135a2d [tests][submissions] Simplify things a bit (less clicks FTW) (#2136)

Diff: 80ebc03ea8..4a09135a2d
2020-01-31 13:25:25 -05:00
Abdülhamit Yilmaz cebc71cad4
[avfoundation] Add AVCaptureVideoStabilizationMode.CinematicExtended enum member (#7774)
See https://developer.apple.com/documentation/avfoundation/avcapturevideostabilizationmode/avcapturevideostabilizationmodecinematicextended?language=objc
2020-01-31 09:29:47 -05:00
Rolf Bjarne Kvinge 65b872e7e9
[xharness] Improve TCC database editing. (#7773)
* Acquire permission for the microphone (the microphone permission dialog is
  not a blocking dialog, which is why things have worked so far).

* Set the last_modified field in the TCC database to now instead of 1970.
  Apparently some permissions time out (kTCCServiceMediaLibrary), which means
  that the last_modified field is important to get right.
2020-01-30 17:54:07 +01:00
Jo Shields f4ebf67d5d
Bump to mono:2019-12 (#7537) 2020-01-30 09:02:49 -05:00
Rolf Bjarne Kvinge 47ebd0d947
[xharness] Fix simctl arguments. (#7772)
* [xharness] Fix simctl arguments.

* Fix another case.
2020-01-30 12:07:02 +01:00
Sebastien Pouliot de8ad75978
[tests][sampletester] Allow project(s) removal (#7766)
Most false positives are (so far) because `nuget restore` fails - both
due to network issues and a mono issue [1].

This PR allows to filter/remove some projects from a solution before
nuget is invoked. This can reduce the number of packages to download
which, beside reducing false positives, is good performance wise.

It also allows some project (e.g. Xappy.iOS) to build even if some other
projects (e.g. Xappy.UWP) in the solution can't be built.

[1] https://github.com/mono/mono/issues/15418
2020-01-29 13:12:09 -05:00
Manuel de la Pena ee1b4a1d99
Bump maccore to set status of device tests. (#7764)
New commits in xamarin/maccore:

* xamarin/maccore@80ebc03 [VSTS] Add a status to pending after we ping VSTS for device tests. (#2135)

Diff: acfea010d8..80ebc03ea8
2020-01-28 20:45:41 -05:00
Alex Soto d66cf8aa52
[SampleTester] Add 4 new samples (#7758)
* [SampleTester] Add 4 new samples

New samples added:

* https://github.com/xamarin/xamarin-forms-samples/tree/master/UserInterface/Xaminals
* https://github.com/davidortinau/Xappy
* https://github.com/Microsoft/SmartHotel360-Mobile
* https://github.com/microsoft/ConferenceVision

* Update new samples known failures

* Add timeout option and removed extra not needed data

* Fix whitespaces...

* Disable Xappy and add CodesignKey option

CodesignKey allows you to use and set it per csproj basis.

Xappy is failing on the UWP csproj, we diable it for now until
we add a way to remove certain projects.

* Update tests/sampletester/ProcessHelper.cs

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

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-01-28 15:40:52 -05:00
Sebastien Pouliot a2a48c4e00
[tests][sampletester] Only provide '/verbosity:diag' one time (#7763) 2020-01-28 14:45:29 -05:00
Manuel de la Pena 7130b16d98
[Xharness] Add workaround when we could not share the internet in bots. (#7755)
Looks like we have issues with the internet sharing in the VSTS bots,
this means that now that we always try to parse the XML on CI, we get an
exception, catch it and do not show the results.

The workaround simply tries to read the xml, if possible, we will parse
it, else deal with the text only log. The fix will show the results, but
it is a workaround for a configuration issue in the CI.
2020-01-28 14:44:34 -05:00
Sebastien Pouliot 238f1e95cd
[src] Add missing availability attributes (#7761)
Minor, it's less helpful (inside the IDE) and it also mean generating
code for 32bits that can't be executed successfully at runtime.
2020-01-27 18:52:30 -05:00
Sebastien Pouliot 9c70de645f
[eventkitui] Remove caching in `EKUIBundle.UIBundle` (#7760)
The existing property implementation use `=` (not `=>`) which means that
the call is executed only once (in the `.cctor`).

```csharp
public static NSBundle UIBundle { get; } = Runtime.GetNSObject<NSBundle> (EventKitUIBundle ());
```

While a shorter syntax (good) it becomes easy to miss the difference
while reviewing pull requests (bad) or later when reading the code.

Also the documentation on `EventKitUIBundle` [1] is unclear. It mention
it's based on _user preferences_ which can be interpreted as something
that change at runtime. This would mean the returned pointer can be
different between calls and that we can't cache it from the static
constructor (since we would only return the original one).

So the correct (safe) code would be:

```csharp
public static NSBundle UIBundle { get; } => Runtime.GetNSObject<NSBundle> (EventKitUIBundle ());
```

but that's still hard to review so the older, self explanatory, syntax is
used.

[1] https://developer.apple.com/documentation/eventkitui/2866511-eventkituibundle?language=objc
2020-01-27 17:34:03 -05:00
Rolf Bjarne Kvinge 23275441af
[msbuild] Copy tests before making changes to them. (#7753)
Copy test projects to a temporary directory before using them for tests. This
makes sure tests don't leave a dirty working tree (because some tests modify
the on-disk test code).

We'll also start running tests using SDK-style project files, and this way
it's much easier to run tests twice, once using the old format and once using
the new format, and then compare the results.

Most of the changes are related to making the test projects and code
relocatable.
2020-01-24 16:15:34 +01:00
Vincent Dondain 3ba75b5e78 Bump maccore to fix DDFun 404 (#7746)
New commits in xamarin/maccore:

* xamarin/maccore@acfea010d8 [vsts-trigger] Don't use the VSTS 'BuildNumber' as if it was the 'BuildId' (#2131)

Diff: e0fa1322c7..acfea010d8
2020-01-24 09:04:20 -05:00
Manuel de la Pena afaaf10d77
[Harness] Unify the CI properties. (#7750)
Unify the harness properties to just look at InCI and remove all the
other ones. There is no real need to have differences between jenkins
and VSTS and Wrench is gone.
2020-01-24 07:47:44 -05:00
Rolf Bjarne Kvinge eb29f4375e
[msbuild] Remove unused conditional compilation directive. (#7747) 2020-01-24 08:59:55 +01:00
Rolf Bjarne Kvinge 197557078f
[msbuild] Don't manually quote, instead rely on CommandLineArgumentBuilder's logic. (#7749)
This fixes an issue related to single quotes and that the fact that mono's behavior
regarding quoting them has changed (by not using single quotes).

This becomes an issue when running with dotnet.
2020-01-24 08:53:13 +01:00
Rolf Bjarne Kvinge 3bad419de3
[msbuild] Remove dependency on Mono.Posix. (#7748)
Mono.Posix comes with a native library, and that makes IL merging much more
complicated, especially when Mono.Posix comes from a nuget. So remove the
Mono.Posix dependency, and instead write the 2 P/Invokes we need manually.
2020-01-24 08:52:22 +01:00
Manuel de la Pena 088dd2a9b2
[XHarness] If in CI, no matter which, use the Xml output. (#7745)
We used to test only on Jenkins, and if the build version had jenkins on
it, rather than doing so, just check if we are in the CI by looking if
BUILD_REVISION is present in the env.
2020-01-23 18:28:12 -05:00