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

5628 Коммитов

Автор SHA1 Сообщение Дата
Chris Hamons 5680a39c77
[xm] Support UseHardenendRuntime in code signing (#5536)
- Solves SDK portion of https://github.com/xamarin/xamarin-macios/issues/4288
2019-02-22 09:06:58 -06:00
Rolf Bjarne Kvinge 1a3a3fbade
Add tool to download and install simulators, and use it to provision the iOS 10.3 simulator if needed. Fixes maccore#1442. (#5645)
* [siminstaller] Added tool to install simulators from the command line.

* Auto-provision the iOS 10.3 simulator.
2019-02-22 10:39:16 +01:00
Rolf Bjarne Kvinge e5724788b6
[xharness] Improve rendering of newlines and tabs in html report. (#5648) 2019-02-22 09:59:30 +01:00
Rolf Bjarne Kvinge 4a69a8c238
[mtouch] Compile .bc files into .o files before passing them to the clang. (#5651)
Clang will automatically compile .bc files into object code if needed, but
it's done serially. If we do the compilation ourselves, it'll be parallelized.

This makes the dontlink tests build in half the time when building for watchOS
/ Release (it drops from ~15 minutes to ~7 minutes).
2019-02-22 09:57:20 +01:00
Rolf Bjarne Kvinge 156e8995fa
[xharness] Use existing (and pre-defined) defines for bitcode platforms. (#5650)
It's harder to forget setting the define if it's already set by default.

Fixes the mini tests on watchOS device:

    [FAIL] JitTests.Exceptions : System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation.
    ----> System.ExecutionEngineException : Attempting to JIT compile method 'ExceptionTests:test_1_basic_filter_catch ()' while running in aot-only mode. See https://docs.microsoft.com/xamarin/ios/internals/limitations for more information.

since BITCODE wasn't defined everywhere it needed to be.
2019-02-21 18:08:33 +01:00
Rolf Bjarne Kvinge d19620c35f
[mtouch] Pass outfile= to the AOT compiler when compiling to full llvm as well. (#5647)
The AOT compiler uses the 'outfile' as the base for a temporary .bc file. If
it's not set, the path to the assembly is used as the base instead. This does
not work if we compile the same assembly to multiple architectures (for
instance armv7k+arm64_32), because the temporary file will clash between those
AOT compilations.

This is not a problem for iOS (armv7+armv7s) because we don't compile to
bitcode (.bc files) on iOS.
2019-02-21 16:38:30 +01:00
Rolf Bjarne Kvinge 81038fc319
[mtouch] Hide linker warning about mismatched watchOS versions. (#5646) 2019-02-21 15:44:17 +01:00
Rolf Bjarne Kvinge 2ff07b6f3a
[mtouch] Don't use the native linker to create fat executables. (#5629)
* [mtouch] Don't use the native linker to create fat executables.

Don't use the native linker to create fat executables, instead link each
architecture separately, and then manually lipo everything together at the
end. This requires a few changes since we need to keep track of the linker
flags per architecture.

The problem is that bitcode files (.bc) do not correspond with a particular
architecture, so the linker can't distinguish between .bc files for armv7k and
.bc files for arm64_32. So if we pass all together to the linker, the linker
will add all .bc files to both architectures, thus duplicating everything (and
the linking fails with duplicate symbols errors).

* [mtouch] Fix building symlinked simulator executables.

* [mtouch] Fix several assumptions about each Target only producing a single executable.
2019-02-21 14:39:02 +01:00
Sebastien Pouliot 3517433f7f
Bump mono to head of 2018-08 (#5641) 2019-02-21 08:35:13 -05:00
Sebastien Pouliot 4028977b66
[linker] Fix sealer to handle method overrides (#5643)
The current code did not consider that overrides could be swept later,
if unused/unmarked by the linker, so we were missing opportunities to
make methods as final.
2019-02-21 08:24:53 -05:00
Rolf Bjarne Kvinge 5f33d73077
[mtouch] Automatically install when building the csproj. (#5637)
I keep forgetting to run 'make mtouch' after changing mtouch, and then
expecting a test project to pick up the changes.
2019-02-20 15:13:27 +01:00
Rolf Bjarne Kvinge cf6771e612
[xharness] Improve app installation on device. (#5628)
* Instead of calculating a timeout based on the app size and an estimated
  transfer speed, keep transferring as long as mlaunch outputs something to
  stdout. The actual transfer speed can vary a lot, in particular if
  installing to multiple nearby watches simultaneously.

* Improve progress text in the html report during installation to include more
  statistics for the impatient.
2019-02-20 06:33:30 +01:00
Rolf Bjarne Kvinge 3a1ac0e31f
[xharness] Do not include actual bitcode when building watch extensions. (#5627)
It makes watch extensions very big, and extremely slow to upload, when we have
no use for the bitcode since we won't publish anything.
2019-02-20 06:30:57 +01:00
Rolf Bjarne Kvinge bfab0ee22a
[mtouch] Fix --dot:<path> to honor the path passed. (#5626)
Also change output to use the full path to files as nodes, instead of just the
filename, and instead use a label to set what's shown to just the filename.

This makes the graph correct when we have multiple files with the same name,
but different paths.
2019-02-20 06:30:08 +01:00
Rolf Bjarne Kvinge ffda8b93ba
[mtouch] Remove MT0028, since it's only applicable if iOS deployment target is < 4.2. (#5625) 2019-02-20 06:29:52 +01:00
Rolf Bjarne Kvinge 2339a410b3
[xharness] Add UI option to disable auto-clean for successful test runs. (#5621)
By default xharness will clean the project after a successful test run (which
can be required if running many device tests without enormous amounts of disk
space).

However, sometimes this can be annoying, in particular if trying to re-run a
particular test manually.

So add an option in the UI to make cleaning optional.
2019-02-18 16:57:07 +01:00
Rolf Bjarne Kvinge b0975fb7c1
[xharness] Add commands to only build tests. (#5620)
Sometimes you just want to build.
2019-02-18 16:42:39 +01:00
Rolf Bjarne Kvinge abe12c18a3
[tests] Allow various usages in today container app. (#5619)
These usages are copied from the monotouch-test Info.plist. They make watchOS
test apps not crash on device when these usages are required.
2019-02-18 16:38:42 +01:00
Emanuel Fernandez Dell'Oca c4a1f42bec [msbuild] Fixes NativeExecutable MTouch output prop for VS (#5576)
Since the Output property was being set on each call to the MTouch task despite it changed or not VS was generating that file on Windows on each run, which breaks incremental builds. Now, we're setting it only if the executable file changed or was just created.

Bug 785284 - .dSym is not properly generated unless configuration is Release
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/785284
2019-02-18 09:11:21 -05:00
Sebastien Pouliot dd029d93f5
Bump mono to head to 2018-08 (#5616)
Commit list for mono/mono:

* mono/mono@de14ec6c78 [2018-08] Add more detailed reporting for exceptions  (#13012)

Diff: b041669258...de14ec6c78
2019-02-18 09:10:22 -05:00
Vincent Dondain 8c9b61a975
[OpenGL] Fix MonoMacGameView .ctor when hardware acceleration isn't available (#5614)
- Fixes #4417: [XM] Add a `Create` method for the 'AppKit.NSOpenGLPixelFormat' type
  (https://github.com/xamarin/xamarin-macios/issues/4417)
- Doing `new MonoMacGameView (ContentView.Frame)` on CI fails because hardware acceleration isn't available.
  One of our samples had that code: a41f4387dc/MacOpenTK/MacOpenTK/MainWindow.cs (L40)
  This made some QA sample tests fail.
2019-02-15 09:50:35 -05:00
Alexander Köplinger d8b97ad15e Fix NUnit.ConsoleRunner version in Makefiles (#5610)
It was updated to 3.9.0 in https://github.com/xamarin/xamarin-macios/pull/5538 but a few hardcoded 3.5.0 in the Makefiles were missed
2019-02-15 07:38:21 +01:00
Rolf Bjarne Kvinge 011d91e093
[mtouch] Document --optimize=remove-unsupported-il-for-bitcode in mtouch --help. (#5609) 2019-02-14 18:36:29 +01:00
Rolf Bjarne Kvinge 95b89d62f3
[tests] Don't put command output in exception message. (#5606)
It can make it very hard to get an overview of test reports, if failing
commands have a lot of output.
2019-02-14 16:33:46 +01:00
Rolf Bjarne Kvinge 2bc18499b5
[mtouch] Quote MONO_PATH if needed in debug spew. (#5607)
Makes c&p commands easier.
2019-02-14 16:33:18 +01:00
Alexander Köplinger 3974db63c3 [xharness] Fix bug in Simulators.LoadAsync() (#5605)
The "Gizmo" and "Companion" are child elements, not attributes on the SimDevicePair.

Also replaced the custom Distinct() implementation with a comparer which can be used with standard LINQ.
2019-02-14 13:54:31 +01:00
Alex Soto ab2709fb76
[AppKit] Add NullAllowed attribute to NSScrollView.DocumentView (#5602)
Fixes #5601
2019-02-13 09:17:53 -05:00
Sebastien Pouliot f607bfca74
Bump mono to head of 2018-08 (#5600)
Commit list for mono/mono:

* mono/mono@b041669258 [ci] Bump bockbuild to get fontconfig download url fix
* mono/mono@d2e33f5f5c [2018-08] [interp] Add method to seq_points table after we finish registering it (#12906)
* mono/mono@32f1873983 [interp] Fix ldelema (#12930)
* mono/mono@bbf2394619 [ci] Support building the OSX .pkg on private Jenkins
* mono/mono@98810acba1 [runtime] Fix building older runtimes with newer system Mono (#12574)
* mono/mono@d946a25079 [2018-08] [runtime] Fix mono_pe_file_map logging (#12897)
* mono/mono@4d2b7f8b01 Merge pull request #12858 from monojenkins/backport-pr-12856-to-2018-08
* mono/mono@89fe6abeef [arm64] encode offset within stack slot for r4 in gsharedvt descriptor (#12885)
* mono/mono@9d21a2bb15 [Registry] Prevent crash due to background thread facing problems in the file system

Diff: 163f45d81c...b041669258
2019-02-13 08:34:12 -05:00
Rolf Bjarne Kvinge 3484ebbf08
[monotouch-test] ARImageTrackingConfiguration is iOS 12+, so protect accordingly. (#5594) 2019-02-13 13:49:17 +01:00
Rolf Bjarne Kvinge e76033f398
[xharness] Don't create 32-bit iOS interpreter variations, since the interpreter doesn't work on 32-bit iOS (yet). (#5597) 2019-02-13 13:47:12 +01:00
Rolf Bjarne Kvinge 7a46e2da25
[xharness] Don't try to autorefresh when loading from file:// urls. (#5590) 2019-02-13 13:29:04 +01:00
Rolf Bjarne Kvinge 7e67e7123d
[bcl-test-importer] Fix compiler warning about unused variable. (#5591)
Fixes this warning:

    tools/bcl-test-importer/BCLTestImporter/BCLTestProjectGenerator.cs(19,17): warning CS0414: The field 'BCLTestProjectGenerator.iOSReleasePattern' is assigned but its value is never used
2019-02-13 13:28:43 +01:00
Rolf Bjarne Kvinge c58487b2da
[xharness] Ignore duplicated device pairs. (#5592)
According to simctl this shouldn't be possible (you get an error if you try),
but it happened on my system somehow, so cope with it.
2019-02-13 13:26:53 +01:00
Rolf Bjarne Kvinge e3fd461999
[xharness] Make the right queue list stay at the right when there's long text on the left. (#5593)
Previously the queue at the right would move to the top (above the test list)
if a node with a lot of text in the test list was expanded. This is annoying
(since things would move out of view unexpectedly), so change the css so that
the queue on the right stays on the right no matter what.

This also required reordering the left and right divs in the html, which is
most of the diff.
2019-02-13 13:25:11 +01:00
Manuel de la Pena e470035431
[Tests] Add some extra info to better debug next time test fails. (#5598)
We have issue https://github.com/xamarin/maccore/issues/701 that states
that there is no exception. Get the received response to check against
null and help debug the issue next time it happens in the CI bots.
2019-02-13 12:22:24 +01:00
Manuel de la Pena 46728f0c6e
[Tests] Do not fail with timeouts. Fixes #1332 (#5596)
The bots sometimes have issues with the network. We do not want red
builds due to a problem in the connection. Lets set the test to
inclonclusive since we cannot assert the headers that have been sent.

Fixes https://github.com/xamarin/maccore/issues/1332
2019-02-12 19:27:23 +01:00
Rolf Bjarne Kvinge ee6876bcd5
[tests] Tweak a few linker tests to work in all scenarios. (#5580)
* Improve logic with regards to app extensions vs normal apps: not only
  watchOS apps are extensions. This fixes a test failure when running the
  tests as a today extension.
* Finding fault clauses in the IL only works if we haven't stripped away the
  IL. This fixes a test failure when running the tests in release mode.
2019-02-11 17:36:28 +01:00
Rolf Bjarne Kvinge 53f77d6fcd
[xharness] Refactor a bit to use async code for the test listener instead of a thread pool thread. (#5581)
This fixes an issue where we'd consume a thread pool thread until the launch
timeout if the app launched, but the test run never started (it crashed at
launch for instance).
2019-02-11 17:36:13 +01:00
Rolf Bjarne Kvinge d02c9bc8e0
Add a Runtime.IsARM64CallingConvention property. (#5569)
* Add a Runtime.IsARM64CallingConvention property.

Determining whether we should use the ARM64 calling convention in P/Invokes
gets more complicated with ARM64_32 (which for our purposes is a 32-bit
architecture).

So add a property on the Runtime class to avoid code duplication, and teach
the linker to optimize any calls to this property to a constant value whenever
possible (and the method is marked as optimizable).

Also change our code to use this new property, and make the corresponding
methods optimizable.

Some shuffling in mmp was required, which meant a little bit more code is now
shared between mtouch and mmp.

* Coding style.

* Test tweaks.

* Improve comment.

* Document new optimization

* Move ILReader to shared linker test code location.

* Disable inlining on armv7k.

* Change IsARM64CallingConvention to a read-only field.

We can give the AOT compiler a constant value for a read-only field, so that
the AOT compiler optimizes away the call to the field by using the constant
value.

This commit does not implement this change for the AOT compiler, but using a
read-only field makes it easy to implement it in the future.
2019-02-11 17:29:13 +01:00
Rolf Bjarne Kvinge 485e565ef3
[builds] Simplify and speed up build a bit. (#5582)
There's no need to use 'true' to create a recipe that does nothing: a single
semi-colon is enough (and for the install-tools* and build-tools64 targets I
don't see a need for an empty recipe in any case). This saves ~2.2k 'true'
subprocesses during a make with everything already built (and a second of
build time; a rebuild in builds/ when everything is already built now takes
~2s on my machine instead of ~3s).
2019-02-11 17:28:42 +01:00
Rolf Bjarne Kvinge a7ae3821e2
Bump maccore to get ruby fix. (#5578)
Diff: 5ee0405f3a...a5782e3dc7
2019-02-11 07:51:43 +01:00
Sebastien Pouliot c28937e502
[tests] Ignore UIPreviewInteraction failing selectors (#5573)
Part of 0344842a6b in `xcode10.2` branch

This happens on the latest iOS 12.1.x - but not in the 12.1 simulators
shipped with the current Xcode 10.1 stable release.

However people can hit this error while running tests on (updated)
devices so it's best to include the fix on master.
2019-02-07 23:17:34 -05:00
Alexander Köplinger 9af5f5a64a Skip CoreNFCLibrary in ApiTypoTest.ConstantsCheck on iPad (#5571)
The test was complaining about CoreNFCLibrary on my iPad.

NFC is not supported on any iPad devices at the moment: https://stackoverflow.com/questions/51532544/is-it-possible-to-use-nfc-on-the-ipad
2019-02-07 23:17:19 -05:00
Curtis Wensley 0bd51045e3 Add NSUrl.IsFileReferenceUrl (#5562)
* Add NSUrl.IsFileReferenceUrl

* Fix Xtro tests
2019-02-07 19:50:57 -05:00
Rolf Bjarne Kvinge 79ec1cc660
[tests] Ignore monotouch-tests that fail with bitcode. (#5566)
This is already a reported bug in mono (and has been for a while).
2019-02-07 16:01:50 +01:00
Rolf Bjarne Kvinge 0d7489bf71
[generator] Code simplification. (#5567)
No need for an if statement if the code is equal in both the true and false path.
2019-02-07 16:01:12 +01:00
Rolf Bjarne Kvinge a28fad5df3
Merge pull request #5556 from rolfbjarne/issue-5553
[build] Make sure -mmacosx-version-min is passed to the mono build. Fixes #5553.
2019-02-07 13:04:45 +01:00
Rolf Bjarne Kvinge b32ac08c6d
[mtouch] Simplify & unify lipo code. (#5558) 2019-02-07 13:04:19 +01:00
Manuel de la Pena e84e027f10
[Foundation] Ensure that we do not block when in the background without a background session.
The mono threadpool gets into an unknown state when the application goes
into the background. This fix allows the task that are inflight to be
canceled when the app goes to the background allowing the application
not to hang and letting the developer retyr the request.

If a developer needs to work with the app in the background, he should
be using a background session, this fix just ensures that we are left in
a known state but does not mean that developers should use this kind of
sessions.

The MessageHandler class is just used in Mac OS X and does not have the
idea of the app going to the background, therefore the fix is not needd
in that handler.
2019-02-07 12:53:13 +01:00
Rolf Bjarne Kvinge 30ba923b20 [tests] Share some more code between mmp and mtouch tests. 2019-02-07 08:33:42 +01:00