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

6340 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 0434104a92
[xharness] A test fails if there are either errors or failures. (#6129) 2019-05-24 03:34:52 -07:00
Manuel de la Pena 9fa35569d1
[XHarness] Re-enable corlbi tests on Mac Full and Modern (#6121)
Tests are readded from the test dll from mono (xunit)

Fixes: https://github.com/xamarin/maccore/issues/1203
2019-05-24 01:29:30 -07:00
Manuel de la Pena f2188f9652
[XHarness] Fix exception when the result line is null. (#6122)
Fixes: https://github.com/xamarin/maccore/issues/1643
2019-05-24 01:25:00 -07:00
Rolf Bjarne Kvinge 25b5d36ddd
[tests] Don't make the mscorlib tests exit upon suspend. (#6115)
It means that on watchOS they'll exit if the screen turns off.

I have no idea why we set it up like this in the first place, it's been like
this since we created the mscorlib tests ([1]).

[1]: 76e15036e8
2019-05-24 00:37:25 -07:00
Marius Ungureanu 14bd63afa0 [CoreFoundation] Add tests for CFUrl retain count (#6101) 2019-05-23 22:36:54 -07:00
Rolf Bjarne Kvinge 7df24cc925
[xharness] Don't try to find simulators for ignored tests. (#6116)
Trying to find a simulator will mark the test as a failure if the simulator
couldn't be found, and we don't want that to happen to ignored tests.

This should fix an issue where xharness seems to try to run the 32-bit
simulator tests when asked to run only device tests.
2019-05-23 22:25:06 -07:00
Rolf Bjarne Kvinge 28f853b3f7
[xharness] Overwrite any existing html reports instead of throwing an exception if a report already exists. (#6117)
If a report already exists, it's probably because a previous attempt failed
for some reason. This is no reason to not try again, overwriting the previous
attempt.
2019-05-23 22:24:35 -07: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
Rolf Bjarne Kvinge fc5067ee67
[xharness] Don't use a dash in the bundle identifer for watchOS projects. (#6114)
It causes problems with the mscorlib test project, which can't be launched properly.

I'm not sure what's the underlying cause, but here are some of the symptoms:

* The watch app actually shows up fine on the device, but:
* mlaunch isn't notified about the new process, so it thinks the app didn't
  launch.
* The new process doesn't receive any environment variables we try to give it,
  which for instance means that it won't auto-start the tests upon launch.
* If we ask mlaunch to attach with lldb, mlaunch will ask watchOS to launch
  the process in a suspended state while lldb attaches. Yet the watch app
  shows up on the device as if not asked to be suspended upon launch.

It seems that the dash (I assume, because I haven't investigated this very
deeply, I just happened to find a solution that worked) makes watchOS launch
the app as if tapped, instead of launched from an IDE.

The strangest part is that this only happens with the mscorlib test project,
not any of the other test projects we run on the watch, and they all have
dashes in their bundle identifiers... yet replacing the dash with another
character (underscore, letter, removing it altogether) all made things work as
expected.
2019-05-23 10:19:35 -07:00
Chris Hamons a989607747
[appkit] Add NullAllowed to AppKit Tooltip properties (#6113)
- https://github.com/xamarin/xamarin-macios/issues/6108
2019-05-23 11:52:53 -05:00
Rolf Bjarne Kvinge b14c66a191
[xharness] Don't include debug variations when the debug configuration isn't supported. (#6112) 2019-05-23 08:32:29 -07: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
Sebastien Pouliot 54e6940cbe
[foundation] Add custom trust/certificate validation to NSUrlSessionHandler. Fix #4170 (#6103)
Basic application (size) for doing an `HttpClient.GetAsync`, release/llvm, 64bits only

- NSUrlSessionHandler (master): 6.4 MB
- NSUrlSessionHandler (PR#5936): 7.7 MB
- NSUrlSessionHandler (this PR): 6.4 MB

The size increase occurs because of the reference to .net `X509*` types.
This brings a lot of additional code, including managed cryptographic
code, inside the application - even when the feature is **not** used.

The solution is to expose an API that only use native (OS) types, which
are mostly already part of the application. This has a very low impact
on existing applications.

It's still possible to hook back to .NET validation if needed (it should
not in most cases) but, in this case, the extra price will only be
_paid_ if used (and can be lower if the code is needed by something else
from the application).

In comparison using other `HttpClient` handler produce app sizes of

- HttpClientHandler (managed): 10.4 MB
- CFNetworkHandler: 6.8 MB

Based on/supersede https://github.com/xamarin/xamarin-macios/pull/5733
Fix https://github.com/xamarin/xamarin-macios/issues/4170
2019-05-23 08:09:10 -04:00
Manuel de la Pena 8e57754ded
[XHarness] Improve xml parsing. Fixes #6072 (#6099)
The entire Xml parsing code has been changed to make the following
improvements:

1. Simplify the logic.
2. Ensure that the tests are not added more than once in the human text
log.
3. Do not use the APIs that load the entire tests into memory. XmlReader
is used to read the file and parse the results.

Fixes: https://github.com/xamarin/xamarin-macios/issues/6072
Fixes: https://github.com/xamarin/maccore/issues/1632
2019-05-23 01:04:37 -07:00
Rolf Bjarne Kvinge dbc9157945
[xharness] Don't report tests whose device were not found if there were no such tests. (#6102) 2019-05-22 23:19:41 -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
Chris Hamons 733171280e
[msbuild] Add non-ui version of com.apple.AudioUnit-UI in lists (#6098)
- https://github.com/xamarin/xamarin-macios/issues/6087
- We have a list of supported extensions, we just didn't include the non-ui flavor
2019-05-22 08:14:51 -05:00
Chris Hamons aba6f02d7e
[mac] Add NSSegmentedCell.SetTooltip NullAllowed (#6096)
- https://github.com/xamarin/xamarin-macios/issues/6044
2019-05-22 08:12:56 -05:00
Rolf Bjarne Kvinge 4d4215e25c
[apidiff] Fix a few issues with the apidiff when the mono hash or api diff url changes. (#6084)
* [apidiff] Add rule to get mono-api-info.exe and mono-api-html.exe.

This fixes an issue when bumping mono: when bumping mono, the already
downloaded mono archive isn't applicable (because we've changed to the
previous commit, which has the previous mono hash, whose archive hasn't been
downloaded).

So add a rule to get mono-api-info.exe and mono-api-html.exe, by downloading
the current mono archive.

* [apidiff] Change the name of the unzip stamp and download dir to contain the hash.

This way the logic doesn't get confused when the hash changes (or there's an
old unzip stamp in the directory), and things are downloaded again as
expected.

* [apidiff] Make make not delete temporary files.

Things end up confused if temporary files have been removed by make, but our
stamp file that the temporary files are still there is present.

* [apidiff] No need to make everything depend on the bundled zip.

If everything that needs the bundled zip already depends on it.

* [apidiff] Restore original hash before calculating api diff.

This makes it less annoying when the api diff calculation changes, because
with the previous behavior they were impossible to test in a PR, since any
changes wouldn't take effect until after the PR was merged.
2019-05-22 05:41:18 -07:00
Marius Ungureanu aa18ad3f92 [CFUrl] Fix leaks of CFUrl instances. (#6090)
Create methods give ownership of the object, so in this case, owns=true. Prevents leak of CFUrl
2019-05-21 22:43:47 -07:00
Rolf Bjarne Kvinge 14510d3be3
Merge pull request #6040 from rolfbjarne/arm64_32-v3
Implement support for ARM64_32. Fixes #4864.
2019-05-21 22:23:43 -07:00
Rolf Bjarne Kvinge 885ed0d4b9
[jenkins] Adjust global timeout. (#6092)
We have a 13-hour timeout for running the tests [1], but that won't work if
the timeout for the entire Jenkins pipeline is lower, so adjust the timeout
for the entire Jenkins pipeline to be more than the sum of all the nested
timeouts.

[1] 94fe39b118 (diff-68c8473bbe1d4346ecff3d74522a31f8R675)
2019-05-21 21:58:42 -07:00
Rolf Bjarne Kvinge 835daf1f60 Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-21 07:53:23 +02:00
Rolf Bjarne Kvinge 6b1d01535e Bump mono.
New commits in mono/mono:

* mono/mono@16c6ac81b3 [interp] disable inlining for built-in types (#14531)

Diff: 1ce13bb09d..16c6ac81b3
2019-05-21 07:44:59 +02:00
Manuel de la Pena b8824524b2
[XHarness] Remove the old style bcl tests. (#6083) 2019-05-20 16:58:45 -07:00
Rolf Bjarne Kvinge a9372793a7 Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-20 18:45:19 +02:00
Rolf Bjarne Kvinge b53e39ab36 Bump mono.
New commits in mono/mono:

* mono/mono@1ce13bb09d [arm] one more attempt to fix slotsize issue on llvmonly (#14444) (#14535)
* mono/mono@bb3c9db497 [2019-02] [monodroid] Introduce 'win32 host' BCL build (#14504)
* mono/mono@ca17767758 [sdks] Set PATH in Android Windows SDK pipeline job (#14519)
* mono/mono@1cb80e7ecf [sdks] Set win-amd64 CI_TAGS for windows pipeline step (#14516)
* mono/mono@c857c27d2e [2019-02][sdks] Build Android SDK on Windows (#14472)
* mono/mono@ab378434b9 [2019-02][ci] Add Android Windows (Release) archive job to pipeline (#14503)
* mono/mono@06c3f55312 [sdks] Lipo arm64_32 binaries for watchOS
* mono/mono@0f69e27153 [sdks] Use -pathmap CSC option for iOS/Mac
* mono/mono@69fae70242 [WinForms] Related Forms closing issue (#13717)
* mono/mono@4fa246df3f [2019-02] [WinForms] fix EditingCellFormattedValue getter and setter for bool value (#14437)
* mono/mono@a55d1c9377 [2019-02] TextInfo.ChangeCase should not use CultureInfo.CurrentCulture (#14438)
* mono/mono@b41578079e [2019-02] Revert "[System] Add FSEvent FileSystemWatcher to monotouch BCL profile" (#14448)
* mono/mono@09429597dc [metadata] use handle stack in mono_runtime_object_init_handle (#14445)
* mono/mono@77ddc3abc1 [arm64] set MONO_ARCH_HAVE_UNWIND_BACKTRACE for watch4 (#14452)

Diff: f1aa58d9a9..1ce13bb09d
2019-05-20 18:43:39 +02:00
Manuel de la Pena 4db4e09e7e
[Xharness] Add support to pass extra arguments to the test bcl apps. (#6082)
Allow to add extra mtouch arguments to the bcl test applications to configure them. This will allow to pass required specific settings that some tests have, for example, for the linker.
2019-05-20 09:35:22 -07:00
Rolf Bjarne Kvinge 5b4b398ae6 [tests] Link NUnit/XUnit watchOS extensions.
Makes them much smaller.
2019-05-20 18:00:18 +02:00
Rolf Bjarne Kvinge 21b8690818 [tests] Fix reporting back to xharness for watchOS NUnit/XUnit tests.
* Choose the first hostname for the HttpTextWriter if there are multiple hosts.
* Open the HttpTextWriter before writing to it.
* Don't overwrite the http writer with another writer immediately after creating it.
* Close the HttpTextWriter when done writing.
* Wait for the HttpTextWriter to complete the final http request before exiting.
2019-05-20 18:00:18 +02:00
Rolf Bjarne Kvinge eab32da266 [monotouch-test] Don't go completely overboard when trying to fill the GC's nursery. 2019-05-20 18:00:18 +02:00
Rolf Bjarne Kvinge 1e31ea2f83 Fix whitespace. 2019-05-20 18:00:18 +02:00
Manuel de la Pena 94fe39b118
[XHarness] Do use the test dlls from the mono downloads. (#6055)
This updates the project generation. We cannot yet fully remove the submodule because:

* We are missing the xunit dlls which should be added in the SDK.
* We have not yet remove all the old style tests. Would make the PR huge, better to deal with it in a diff PR.
* The xunit CoreLib tests have issues loading all the tests, needs some extra work and again, the PR is already large.

Fixes: xamarin/maccore#1199
Fixes: xamarin/maccore#1204
Fixes: xamarin/maccore#1209
Fixes: xamarin/maccore#1510
2019-05-19 14:55:14 -07:00
Rolf Bjarne Kvinge 2d34cb259b Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-17 14:53:15 -07:00
Rolf Bjarne Kvinge 6ff6d313a2
[xharness] Don't run monotouch-test/interpreter for now. (#6067)
Works around https://github.com/xamarin/maccore/issues/1613.
2019-05-17 14:48:31 -07:00
Rolf Bjarne Kvinge 6b650d8364
[sample tests] Fix variable calculation to calculate once. (#6061)
Use simply expanded variable as test result filename, so that it's only
calculated once. This avoids ending up with different filenames when the
timestamp in the filename changes between calculations, such as:

    Results (nunit3) saved as /Users/vsts/agent/2.150.3/work/1/s/tests/sampletester/TestResult-20190511-100657.xml
    warning: failed to load external entity "TestResult-20190511-100658.xml"
    unable to parse TestResult-20190511-100658.xml
    make: *** [run-tests] Error 6
2019-05-17 09:21:00 -07:00
Ankit Jain 7dddfb657c [xibuild] Fix incorrect mscorlib.dll being used (#6068)
* [xibuild] Fix incorrect mscorlib.dll being used

The `GuiUnit_NET_4_5` project, when built with `xibuild` uses the wrong `mscorlib.dll`.

From https://github.com/xamarin/xamarin-macios/issues/5760#issuecomment-472457202 :

```
- mscorlib.dll is being used from mono/4.5 and the other system assemblies are from mono/4.5-api
- GuiNet* project is built with xibuild

What is happening here is:

	xibuild sets[1] `SetToolsetProperty ("TargetFrameworkRootPath", FrameworksDirectory + Path.DirectorySeparatorChar);`
	which points to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks`.
	This causes $(FrameworkPathOverride) to be set[2] to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETFramework/v4.5`,
	but that doesn't have a mscorlib.dll, so it gets reset[3] to /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5/.

	If we don't set TargetFrameworkRoothPath, then we get `FrameworkPathOverride = /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api`,
	causing `_ExplicitReference=/Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api/mscorlib.dll`(correct one) to be used.
```

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

1. https://github.com/xamarin/xamarin-macios/blob/master/tools/xibuild/Main.cs#L209
2. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L79
3. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L84

* Revert "Workaround https://github.com/xamarin/xamarin-macios/issues/5760 in generator csproj"

This reverts commit 9bd927bb7f.

The previous commit for xibuild removes the need for this.
2019-05-17 09:12:05 -07:00
Rolf Bjarne Kvinge d84c3a0892
[xharness] 'Skipped' really meant 'DeviceNotFound', so rename things to avoid confusion. (#6066) 2019-05-17 08:59:33 -07:00
Manuel de la Pena a1c19733d8
[XHarness] Ignore corlib on tvOS until mono fixes the test dlls. (#6063)
Test dlls are wrong so we will ignore them until mono fixes them.

Fixes: https://github.com/xamarin/maccore/issues/1611
Mono issue: https://github.com/mono/mono/issues/14497
2019-05-17 08:41:18 -07:00
Rolf Bjarne Kvinge 47beab425d Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-16 15:26:15 -07:00
Rolf Bjarne Kvinge b6f735c26b [xharness] Rework arm64_32 variations a bit so that they're not always enabled.
We don't want to try to run arm64_32 tests on bots that don't have devices
attached, so make sure they follow the logic of other device tests.
2019-05-16 15:24:51 -07:00
Chris Hamons 155bb924de
Revert "[launcher] Pass --use-map-jit to mono on XM app startup" (#6051)
- This reverts commit 2278512aba.
- This is no longer necessary due to https://github.com/mono/mono/pull/14395
2019-05-16 15:09:02 -07:00
Sebastien Pouliot 5fbf721957
[mmp] Fix compiler warning (#6064)
```
Tuning.cs(300,8): warning CS0108: 'LoadOptionalReferencesStep.ProcessReferences(AssemblyDefinition)' hides inherited member 'LoadReferencesStep.ProcessReferences(AssemblyDefinition)'. Use the new keyword if hiding was intended. [/Users/poupou/git/master/xamarin-macios/tools/mmp/mmp.csproj]
```

it's not virtual and it's not being called back annyway.
2019-05-16 16:44:08 -05:00
Manuel de la Pena eb64b377bb
[Xharness] Remove the System bcl tests on tvOS (#6062)
Until mono fixes the test dlls, we are ignoring the tests.

Silences: https://github.com/xamarin/maccore/issues/1610
2019-05-16 13:07:38 -07:00
Manuel de la Pena c9692c8e34
[XHarness] Support binlogs for the tests projects. Fixes #1604 (#6056)
Generate binlogs to ensure that we can easily debug msbuild failures.
2019-05-16 13:06:44 -07:00
Manuel de la Pena f2948b268e
[XHarness] Show when we have a watch HE0038 error. (#6060)
To simplify the life of the monitorer, if we get a crash with a HE0038
we will propagate the result to the html and will provide a link to the
issue so that it is easy to report it.
2019-05-16 13:05:19 -07:00
Sebastien Pouliot 4cfca09260
[foundation] Expose AllowsCellularAccess on NSUrlSessionHandler (#6059)
This property was always set to `true` but it can be useful to turn it
off (and that was not easy with the existing implementation)
2019-05-16 14:20:06 -05:00
Manuel de la Pena 762146a95c
[XHarness] Ignore IO flacky tests in devices too. (#6057) 2019-05-16 10:15:11 -07:00
Sebastien Pouliot 2121b703cd
[linker] Add the custom attributes removal step as an configurable optimization. Fix #3655 (#6049)
This allows the optimization to be disabled in cases where one, or
many, a custom attribute(s) are required by the application at runtime.

While not ideal disabling this single step is much better than disabling
linking for the whole application.

A better approach is described in https://github.com/xamarin/xamarin-macios/issues/6048
but this configuration optimization makes sense independently of it.

Fix https://github.com/xamarin/xamarin-macios/issues/3655
2019-05-16 09:16:32 -07:00
Sebastien Pouliot c481aac216
[apidiff] Add q quick'n'dirty script to produce a diff between any two bundle.zip (#6050)
Use for producing API diff for release notes without waiting for a PR,
bots and/or approvals...

Also useful to produce API diff between any versions, not just between
the current revision and a baseline (last stable).
2019-05-15 12:46:38 -05:00