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

2262 Коммитов

Автор SHA1 Сообщение Дата
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 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
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 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
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
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 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
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 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 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
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 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 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
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
Manuel de la Pena 40c998e264
[XHarness] Add XUnit category filtering. (#5455)
Provide the ability to filter per categories in the xunit runner and add the default categories for Mac, iOS, TvOS and WatchOS.
2019-01-28 17:47:36 +01:00
Vincent Dondain f2ab1f6daf
[tests] Ignore failing GestureRecognizerTest for now (#5486)
- WIP PR https://github.com/xamarin/xamarin-macios/pull/5462 more investigation needed so ignore test which is preventing green builds
2019-01-28 10:07:06 -05:00
Rolf Bjarne Kvinge af30117abc
[tests] Automatically build the mtouch test assembly when needed. (#5496) 2019-01-28 15:05:42 +01:00
Rolf Bjarne Kvinge be504be9ac
[mtouch] Properly deserialize cached Objective-C class symbols. Fixes #5467. (#5468)
Deserialize cached Objective-C class symbols to match how the objects looked
before serialization. This means storing the Objective-C class name in the
Symbol.ObjectiveCName field, and not the Symbol.Name field.

Fixes https://github.com/xamarin/xamarin-macios/issues/5467.
2019-01-24 15:08:50 +01:00
Sebastien Pouliot 1c881549a3
[generator] Warn if [NullAllowed] is used on methods. Fixes #4416 (#5464)
The `[NullAllowed]` attribute should not be allowed on methods but it
could break existing binding projects.

Historically it was used on property setters. However using the attribute
on _other_ methods can be misleading, e.g. should it apply to all
parameters, the return value... and its presence/action can be
misinterpreted in code reviews leading to binding bugs.

reference: https://github.com/xamarin/xamarin-macios/issues/5416
2019-01-24 08:57:46 -05:00
Manuel de la Pena 6c12862d3e
[XHarness] Remove not needed ignore file. (#5456)
Since we support filtering via categories, we do not longer need the
ignore file in these tests.
2019-01-24 13:11:11 +01:00
Manuel de la Pena debcee412c
[XHarness] Clean the System.Net.Http ignore file. (#5459)
Since we support categories, there is a test that does not longer needs
to be ignored in ios and tvos but needs to be in watchos (we do not yet
have the correct test assembly for the platform).
2019-01-24 13:10:40 +01:00
Manuel de la Pena 5165f1cdde
[Xharness] Remove not longer needed System.Service.Model.Web ignore file. (#5460)
Since we support categories, the file is not longer needed since the
failing tests are part of an ignored category.
2019-01-23 12:28:54 +01:00
Manuel de la Pena 99bda10aa4
[XHarness] Clean the System.Data ignore. (#5458)
Since we support filtering there are a number of tests that were ignore
that are part of a ignored category, therefore, they are not needed in
the file.
2019-01-23 10:17:46 +01:00
Manuel de la Pena 02f65cc119
[XHarness] Remove not needed ignore file for System.Transactions. (#5457)
Since we support filtering via categories, we do not longer need the
ignore file in these tests.
2019-01-22 23:24:44 +01:00
Manuel de la Pena a71f421a67
[XHarness] Reneable Sytem.Security tests on iOS, TvOS and WatchOS. (#5421)
Reneable the tests and ignore those failing ones.

Fixes  https://github.com/xamarin/maccore/issues/1139
2019-01-22 23:18:45 +01:00
Manuel de la Pena a97dddf6db
[XHarness] Remove not needed dll from the test templates. (#5454) 2019-01-22 17:49:03 +01:00
Sebastien Pouliot 91250bb615
[generator] Fix BI0000 when no argument semantics are present on a property. Fixes #5444 (#5451)
This can happen if a `[Wrap]` is used on the property getter (and setter)
instead of directly on the property.

In such condition we can safely assume that no dirty check is needed and
can continue with, unmodified, generation (using the wrapped content).

reference: https://github.com/xamarin/xamarin-macios/issues/5444
2019-01-22 09:52:39 -05:00
Manuel de la Pena d9dcc9ae21
[XHarness] Add support for filtering categories in NUnit. (#5446) 2019-01-22 14:59:36 +01:00
Rolf Bjarne Kvinge ab12d72419
[tests] Adjust DispatchBlock tests according to minimum OS. (#5435)
* [tests] Adjust DispatchBlock tests according to minimum OS.

* [tests] Fix monotouch-test build.
2019-01-21 07:49:28 +01:00
Philippe Creytens 2b271cb997 [coremedia] Add BaseFontSizePercentageRelativeToVideoHeight to CMTextMarkupAttributes. Fixes #5429
reference: https://github.com/xamarin/xamarin-macios/issues/5429
2019-01-18 09:09:42 -05:00
Bernhard Urban 269ccd1495
[xharness] recognize newer watches (#5419)
* [xharness] recognize newer watches

* s/iPod/Watch/
2019-01-18 14:00:01 +01:00