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

5606 Коммитов

Автор SHA1 Сообщение Дата
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
Rolf Bjarne Kvinge 135507957f
[linker] Remove non-bitcode compatible code, and show a warning. (#5551)
* [linker] Remove non-bitcode compatible code, and show a warning.

Remove code not currently compatible with bitcode and replace it with an
exception instead (otherwise we'll assert at runtime).

Also show a warning when we detect this.

This is quite helpful when looking at watch device test runs to filter out
failures we already know about.

This fixes point #2 in #4763.

* Improve documentation.

* Simplify linker code by using a substep.

* Fix whitespace issues.

* Improve reporting.

* Add support for reporting more than one MT2105 at the same time when making
  the errors instead of warnings.
* Only report MT2105 for methods that haven't been linked away.
* Format the error message nicer for properties.

* Tweak a bit for warning tests to pass.

* Use ExceptionalSubStep to provide better error information.

* Adjust where linker warnings/errors are reported from to avoid a NullReferenceException.
2019-02-07 07:57:01 +01:00
Sebastien Pouliot 34f2968366
Bump maccore to head of master (#5565) 2019-02-06 22:40:31 -05:00
Sebastien Pouliot 2c3fd9b781
Bump mono to head of 2018-08 (#5560)
Commit list for mono/mono:

* mono/mono@163f45d81c [corlib] Fix GetFrames_AsyncCalls test not to block
* mono/mono@208d5a5f1b Avoid recursive extracting redundant frames from captured traces.
* mono/mono@bcc1b83e82 Add back missing stack frames to mono MERP reports (#12741)
* mono/mono@7a3ce9849f Bump corert
* mono/mono@13204572a4 [arm/ios] workaround for faulty vcmp.f64 insn

Diff: 2359cba40e...163f45d81c
2019-02-06 14:09:05 -05:00
Manuel de la Pena b87be1576b
[Foundation] Remove possible race condition with the NSUrlSessionHandler. Fixes #5511 (#5557)
The SendAsync method in the NSUtlSessionHandler is not handling the
cancellation token correctly. Moving the Register to nearly the end of
the method (just before returning the task) ensures that if we got a
already cancelled token, we execute in a sync manner the cleanup.

Using the IsCancellationRequested in this method is less optimal
because we would have to check several times:

1. When SencAsync receives the token and before it creates the inflight
data.
2. When we are going to resume the data. Since we might have created the
inflight data and at that point an other thread cancelled the request.

Fixes: https://github.com/xamarin/xamarin-macios/issues/5511
2019-02-06 17:00:44 +01:00
Rolf Bjarne Kvinge 6c6afbccb2
Always set variables to allow for downloading mono package. (#5559)
Even if we don't end up using those variable during a normal build (when
building from source), it can still be useful that commands like `make download`
continue to work.

It also fixes a make warning:

    Making all in builds
    Makefile:16: warning: overriding commands for target `downloads/'
    Makefile:9: warning: ignoring old commands for target `downloads/'
2019-02-06 15:47:32 +01:00
Rolf Bjarne Kvinge 22c8ca5090
[docs] Make PreserveSmartEnumConversionsSubStep use unique error codes and improve ExceptionalSubStep error documentation. (#5555)
* Make PreserveSmartEnumConversionsSubStep use error codes that are not
  already used elsewhere: this isn't obvious at first, but all
  ExceptionalSubStep errors use a range of error numbers (10 numbers from NNN0
  to NNN9), so we need to reserve that entire range. In this case there were
  other errors using some of the numbers of the range for PreserveSmartEnumConversionsSubStep.
* Make sure there are anchor links for all the variations of each ExceptionalSubStep error.
2019-02-06 15:31:49 +01:00
Rolf Bjarne Kvinge a6b870c781 Check if device build is available before running device tests. 2019-02-06 15:24:08 +01:00
Rolf Bjarne Kvinge bcbc838fd3 [build] Make sure -mmacosx-version-min is passed to the mono build. Fixes #5553.
Also add a test.

Fixes https://github.com/xamarin/xamarin-macios/issues/5553.
2019-02-06 10:28:02 +01:00
Rolf Bjarne Kvinge 6b0f9fbf07 [tests] Re-use tools/common/MachO.cs in mtouch/mmp tests. 2019-02-06 10:24:46 +01:00
Rolf Bjarne Kvinge ce72a51938 [MachO]: Implement reading min OS load commands. 2019-02-06 09:48:42 +01:00
Rolf Bjarne Kvinge 6bc475e624
[xharness] Rework BCL test importation to not bail out completely if something went wrong. (#5540)
Rework BCL test importation to generate projects that won't compile instead of
giving up completely in case of generation failure.

This means that xharness can still be used for non-BCL tests even if the
generation of the BCL tests fail.
2019-02-05 12:55:46 +01:00
Rolf Bjarne Kvinge 65e35b13f6
[introspection] Don't report each broken P/Invoke more than once. (#5539) 2019-02-04 15:22:19 +01:00
Rolf Bjarne Kvinge 6af4f139c2
[tests] Use latest version of NUnit for test projects to get support for parallelized tests. (#5538)
* [tests] Use latest version of NUnit for test projects to get support for parallelized tests.

* [xharness] Automatically find the correct nunit-console executable for NUnit tests.
2019-02-04 15:22:00 +01:00
Rolf Bjarne Kvinge 736cb90ac6
[mtouch/mmp] Avoid a few clang warnings in the generated pinvoke code. (#5541) 2019-02-04 15:20:44 +01:00
Rolf Bjarne Kvinge db01babe71
[tests] Set the correct environment variables when executing msbuild from the mtouch tests. (#5534)
This is usually not a problem, because these variables are already set when
running from the command-line or xharness. However, it shows up when running
tests directly from VSfM.
2019-02-04 07:59:29 +01:00
Sebastien Pouliot cf86b3e1ef
[mtouch] Use the 'repl' assemblies when the interpreter is enabled (#5535) 2019-02-01 15:55:27 -05:00
Rolf Bjarne Kvinge fa09467f8a
[msbuild] Add space to arguments when adding a newline at the end as well. (#5533)
Example (previous behavior):

    args.Add ("-a");
    args.AddLine ("-b")
    args.Add ("-c");

would result in:

    -a-b
    -c

which is obviously not correct.

New result:

    -a -b
    -c

which is much better.
2019-02-01 20:31:13 +01:00
Rolf Bjarne Kvinge 703058f99b
[msbuild] Use AddLine when adding --interpreter to mtouch arguments. (#5532)
So that it matches the rest if the arguments.
2019-02-01 20:21:08 +01:00
Rolf Bjarne Kvinge 510bb0b1cd
[mtouch] Add logging overloads that don't format the input. (#5525)
Sometimes we just Log a string without any format arguments. This works fine,
until the string comes from the user, and happen to contain braces, in which
case an invalid format exception is thrown.

Adding Log overloads that doesn't take format arguments (nor formats its
input) avoids this problem.
2019-02-01 07:43:15 +01:00
Rolf Bjarne Kvinge 204361d62e
[xharness] Simplify code slightly. (#5506) 2019-01-31 18:28:38 +01:00
Marius Ungureanu b357624861
[NSString] Add overloads which are optimized for substring handling (#5517)
* [NSString] Add overloads which are optimized for substring handling

Fixes #5134
2019-01-31 19:09:13 +02:00
Sebastien Pouliot faee79b2d9
Bump mono to head of 2018-08 (#5521)
Commit list for mono/mono:

* mono/mono@2359cba40e [coop] Fix deadlock when unwinding
* mono/mono@a4956c837e [2018-08] Native Crash Stability Fix Batch (#12565)
* mono/mono@d4d4fb7987 [eglib]Fix memory leak in `g_find_program_in_path()`. #11615.
* mono/mono@9939c1a656 [System]Fix race condition in `SystemDependencyProvider.Initialize()`. #12538.
* mono/mono@b0c4390d60 [runtime] Don't probe aot cache on android
* mono/mono@725ba2a252 Fix https://github.com/mono/mono/issues/12461.
* mono/mono@1dee62626d [2018-08 Android,AOT] Support dumping AOT offsets with Android NDK r17+ (#12454) (#12465)
* mono/mono@146c8191fb [x86] Set the LLVM data layout.
* mono/mono@5d3077c7bc [arm] Set the LLVM data layout, without it, opt seems to make incorrect optimizations.
* mono/mono@5266e6a8f1 [2018-08][debugger][backport] Fix crash when there is a generic struct with a field that is an enumerator (#12410)
* mono/mono@0d988bc696 Bump API snapshot submodule
* mono/mono@e6285d015b Bump corefx

Diff: 51c4f45402...2359cba40e
2019-01-30 16:50:28 -05:00