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

44 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena b9a45930ab
[Harness] Remove dead code. (#7990)
We do not longer compile the bcl tests, but we consume them as part or
mono. The old BCL targets and classes are not needed. As you can see,
the lists were empty.
2020-02-26 21:21:09 -05:00
Manuel de la Pena d1eec8b3d0
[Harness] Add extra labels to allow to select a smaller set of tests. (#7937)
It will be nice to be able to have a smaller set of tests to be ran by
xharness. In this commit we add a set of labels to be able to divide the
test in the following groups:

* Xamarin - all tests BUT monotouch.
* Monotouch - just monotouch tests.
* Old BCL - The BCL tests that are based on NUnit
* New BCL - The BCL tests that are based on xUnit.
* mscorlib - Just the test that exercise mscorlib (and the different
groups, mscorlib 1, mscorlib 2 etc..)

This will allow to parallelize the execution of the full test suit in
different agents in VSTS.
2020-02-25 22:47:05 -05:00
Sebastien Pouliot fc9b3fa8ae [xharness] Only run 'dont link' on release configuration (#7662)
The 32bits **debug** binaries are now too big for Apple's native linker
to process, which gives us (non useful) build errors on the bots.

This will still run the release builds configuration of the tests since
they are smaller and still within the limits of the tooling.
2020-01-02 15:06:54 -05:00
Rolf Bjarne Kvinge 303aa0a649 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Rolf Bjarne Kvinge 4893a4a1f5 [xharness] Refactor how mac tests projects are generated. Fixes #6322.
Harness.AutoConfigureMac now loads all the mac test projects both when
configuring and running tests, the only difference is that the test projects
that must be generated are only generated when configuring. This means that
the Harness.MacTestProject list contains the exact same test projects both
when configuring and when running tests.

This made it possible to remove logic to clone (mac) test projects the Jenkins
class (since Harness.MacTestProjects contains all the test projects already).

Consolidate logic to generate (mac) test projects:

* First we generate BCL and mono-native projects from their templates.
* Then we generate Full/System variations of any project that needs it.

This way we can remove logic to generate Full/System variations from the logic
to generate BCL/mono-native projects, which means less duplicated (and less
confusing) code.

To this purpose, significant changes were required:

* MacTestProject.TargetFrameworkFlavor has been modified to contain a bit mask
  of the variations to generate.
* MacMonoNativeInfo has been significantly simplified, and some of the
  generated code has been moved to the actual template instead.
* Some project generation (in MacTarget) to make things work as expected.

Fixes https://github.com/xamarin/xamarin-macios/issues/6322.
2019-06-20 10:48:51 +02:00
Rolf Bjarne Kvinge b5dc6201dd [xharness] Move *TestProject.BCLInfo and *TestProject.MonoNativeInfo to their base class. 2019-06-20 10:36:15 +02:00
Rolf Bjarne Kvinge 9c29746825
[xharness] Add TimeoutMultiplier and multiply mscorlib's timeout by 2. (#6172)
mscorlib has many tests and need some extra time, especially on watchOS, so
bump the timeout by 2 (from 15 to 30 minutes).
2019-05-30 08:40:56 -07:00
Manuel de la Pena 0346e71213 [xharness] Remove mono tests built locally in favor of binary archive binaries (#6141)
* [XHarness] Remove the old style mscorlib tests.

Remove the old style test and replace it with the xunit equivalent which
has more tests and is provided by the mono package.

* Only skip the mscorlib tests on watchOS devices with 32b. Run them anywhere else.
2019-05-28 23:25:01 -07:00
Rolf Bjarne Kvinge 281ea5f97d [xharness] Don't run the mono-native-compat test on ARM64_32.
ARM64_32 only supports the unified native mode.
2019-05-22 08:12:14 +02:00
Rolf Bjarne Kvinge a9372793a7 Merge remote-tracking branch 'origin/master' into arm64_32-v3 2019-05-20 18:45:19 +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 3a72377b70 [xharness] Don't run the mono-native-compat test on ARM64_32.
ARM64_32 only supports the unified native mode.
2019-05-10 11:28:22 +02:00
Manuel de la Pena 1615b28ed1
[XHarness] Reduce the number of test applications for the BCL tests. (#5768)
This commit improves the state of the BCL testing in the following ways:

1. Improve the device tets running. Less apps, faster results.
2. WatchOS apps are left as they were to ensure that we do not have deplouyment/run issues.

We now support the ignore files per assembly name to simplify the
tracking of the ignored tests. All
2019-03-20 12:10:18 +01:00
Alexander Köplinger 97b5aef47e Merge branch 'master' into mono-2018-10 2019-02-28 21:18:49 +01:00
Manuel de la Pena c2967c0d50
[XHarness] Ensure we do a nuget restore on bcl imported tests. Fixes #5383 (#5574)
* [XHarness] Ensure we do a nuget restore on bcl imported tests. Fixes #5383

We need to ensure that a nuget restore is done, otherwise we might have
build issues with missing libs.

Fixes https://github.com/xamarin/xamarin-macios/issues/5383
2019-02-28 18:27:01 +01:00
Alexander Köplinger 8829aa0c39 Merge branch 'master' into mono-2018-10
# Conflicts:
#	tests/xharness/Harness.cs
2019-02-05 21:38:47 +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
Marek Safar aa6fefb1c9 Merge remote-tracking branch 'origin/master' into mono-2018-10 2018-12-17 15:28:08 +01:00
Chris Hamons d7c2a45ca9
Add 'NoBindingEmbedding' style binding project support (#5167)
- Existing binding projects embed the native libraries within the assembly as managed resource
- This does not scale well and has performance implications
- This PR creates a new property, NoBindingEmbedding which when true processes the building and consumption of binding projects differently.
- Existing binding projects are not affected, they will continue as is
- I've written a full XM test suite and ported a subset to iOS. Since iOS only supports checked in projects, and I didn't want to make the existing situation worse by adding more, I only wrote tests that could use the existing test projects.
    -When we complete some form of msbuild testing reform, we'll revisit these tests.
- Remove two files in MyiOSFrameworkBinding that are not used (we use copies elsewhere)
- Remove unnecessary sleep and fix broken touch command
- Output failing test log to console instead of test output
    - VSfM does not handle thousands of lines of test failure message well
- Add ability to generate binding projects with LinkWith
2018-12-12 09:55:57 -05:00
Marek Safar 60d08b8559 Merge branch 'master' into mono-2018-10 2018-11-29 13:41:32 +01:00
Manuel de la Pena 61b2038b3d
[Xharness] Add a workaround to not build the xunit tests when not needed. (#5156)
* [Xharness] Add a workaround to not build the xunit tests when not needed.

This is a workaround that does not use reflection to build the bcl test
projects. We need this until we have complete support of using mono as
an SDK.
2018-11-23 16:02:15 +01:00
Rolf Bjarne Kvinge 50bb4912e1
Revert "[xharness] Only build the BCL tests when we need them. (#5139)" (#5149)
This reverts commit 7277bbcd2b, it breaks building & running the new BCL tests.
2018-11-20 07:06:37 -05:00
Rolf Bjarne Kvinge 7277bbcd2b
[xharness] Only build the BCL tests when we need them. (#5139)
Only build the BCL tests when we need them, because we can't build them when
we're running the device tests (because we don't have a built source tree in
that case).

Since the test assemblies are required when generating the BCL projects, this
means we also delay creating the BCL projects until we need them.
2018-11-19 09:07:35 -05:00
Martin Baulig 6ff0ddd74c [xharness]: Add xharness support for mono-native. 2018-11-14 13:26:30 -05:00
Rolf Bjarne Kvinge 904be25c25
[xharness] Generate a system variant of dont link, and run it using the oldest mono version we support in Jenkins. Fixes #4121. (#4968)
This is an addition to the tests we already run on older macOS bots (and as such will not execute on our PR bots).

Fixes https://github.com/xamarin/xamarin-macios/issues/4121.
2018-10-15 16:51:46 +02:00
Chris Hamons 183cb81583
Disable known failing device tests using xharness (#4884)
- Add the ability to have Build Only tests - https://github.com/xamarin/maccore/issues/1076
- Set mini and the extensions as build only
2018-10-03 08:33:30 -05:00
Rolf Bjarne Kvinge 7ddb263e7d
[xharness] Propagate custom defines to referenced projects as well. Fixes maccore #655. (#3615)
The ProtocolTest test is located in the bindings-test assembly, and it
requires certain conditional compilation defines to be set in order to behave
properly.

With this fix we correctly set these defines when cloning the bindings-test
project (in addition to when we set the defines for the main project, which is
either monotouch-test or linkall for this test).

Fixes https://github.com/xamarin/maccore/issues/655.
2018-02-28 21:55:26 +01:00
Rolf Bjarne Kvinge d973192c57
[xharness] All variants of GuiUnit projects must be special-cased. (#3602)
This fixes an issue where multiple copies of the GuiUnit project would have
the same output directory, causing random problems when building those
projects in parallel.
2018-02-27 10:28:42 +01:00
Rolf Bjarne Kvinge 0e66298a15
[xharness] Clone XM projects. (#3427)
* [tests][xammac] Fix a few path calculations to not be hardcoded.

* [xharness] Clone XM projects.

Cloning projects before building them will also clone project references,
which will make it possible to build multiple projects in parallel, when those
projects have common project references.

Fixes https://github.com/xamarin/maccore/issues/624.

* [xharness] Fix XM project cloning

* Don't clone Classic projects (they're solutions, and xharness doesn't understand them).
* Clonee projects properly when cloning execution tasks.

* [xharness] GuiUnit needs specialized cloning.

The GuiUnit project uses relative paths to write to files outside the project
directory, which means that multiple GuiUnit project files may write to the
same location.

So special-case GuiUnit cloning to make those paths subdirectories of the
project's directory instead.

* [xharness] Process imported targets when cloning projects.

Also make the msbuild-mac's custom targets file independent of the location of
the project file by making all paths relative to the custom targets file.
2018-02-08 14:32:48 +01:00
Rolf Bjarne Kvinge 6fc7b1ea89
[tests] Run dont link, link all and link sdk tests in both Debug and Release in the simulator. Fixes #53181. (#3363)
* [xharness] Add support for running XI projects with different platform configurations.

* [xharness] Run dont link, link all and link sdk tests in both Debug and Release in the simulator. Fixes #53181.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=53181.

* [tests] Fix dont link to always optimize C# code in release mode.

* [tests] No need to weak link GameController anymore in dont link.

This was removed long ago from the Debug configurations, so remove it from the
Release configuration as well.
2018-01-31 14:56:22 +01:00
Rolf Bjarne Kvinge dee0fd984a
[xharness] Run monotouch-test both with and without the static registrar in the simulator. (#3236)
* [xharness] Run monotouch-test both with and without the static registrar in the simulator.

This way we catch (some) problems with the static registrar without having to run on device.

* [xharness] Add comments to explain extra test configurations.

* [xharness] Fix how projects are cloned.

Fix how projects are cloned so that xharness doesn't end up confused when
multiple test tasks share the same build task.

Previously xharness would iterate over all test tasks and modifying their
build tasks, now it will create the build tasks correctly in the first place.
2018-01-18 07:14:07 +01:00
Rolf Bjarne Kvinge 83586f878d
[xharness] Make sure different flavors of XM tests don't build/run from the same path. (#3027)
Change [Intermediate]OutputPath of Xamarin.Mac test projects to include the
project flavor, so that they don't build into (and run from) the same location
(which leads to random and incorrect behavior for at least one of the
flavors).

Fixes https://github.com/xamarin/maccore/issues/584
2017-11-22 16:28:32 +01:00
Chris Hamons 2510b805b2
Add XM Modern to BCL test suite (#2923) 2017-10-27 16:44:22 -05:00
Chris Hamons cdffea44b9 [macos] Fix guiunit error on clean builds by depending on correct copy (#2912)
* [macos] Fix guiunit error on clean builds by depending on correct copy

- From a clean build making a BCL test would error due to the non-mobile guiunit not being built
- This was because the Makefile-mac.inc target was incorrect
- This was because xharness assumed that non variation based targets were always Modern
- However, BCL tests are Full, not Modern

* Code review change

* Swap to var to reduce diff
2017-10-20 17:14:02 +02:00
Rolf Bjarne Kvinge 71a17aa673 [xharness] Add support for generating only specific variations for iOS projects. Fixes #57529 (#2751)
And use it to skip watchOS tests for Mono.Security, since we don't ship Mono.Security.dll for watchOS.

https://bugzilla.xamarin.com/show_bug.cgi?id=57529
2017-09-22 18:04:32 +02:00
Rolf Bjarne Kvinge 4b4e14119d [xharness] Fix generated makefile to avoid generating duplicated targets. Fixes #56492. (#2129)
Rework how the two different xammac configurations are done, so that we don't
generate identical makefile targets for both variations (we'll generate a
single makefile target, and the configuration is selected using an environment
variable).

Fixes these makefile warnings:

Makefile-mac.inc:303: warning: overriding commands for target `build-mac-unified-xammac_tests'
Makefile-mac.inc:287: warning: ignoring old commands for target `build-mac-unified-xammac_tests'
Makefile-mac.inc:307: warning: overriding commands for target `clean-mac-unified-xammac_tests'
Makefile-mac.inc:291: warning: ignoring old commands for target `clean-mac-unified-xammac_tests'
Makefile-mac.inc:310: warning: overriding commands for target `exec-mac-unified-xammac_tests'
Makefile-mac.inc:294: warning: ignoring old commands for target `exec-mac-unified-xammac_tests'
Makefile-mac.inc:313: warning: overriding commands for target `run-mac-unified-xammac_tests'
Makefile-mac.inc:297: warning: ignoring old commands for target `run-mac-unified-xammac_tests'

https://bugzilla.xamarin.com/show_bug.cgi?id=56492
2017-05-25 07:11:36 +02:00
Rolf Bjarne Kvinge d395249480 [xharness] Set the test name correctly so that macOS and iOS variations of the same tests are grouped together in the html report. (#2082)
This affects introspection-ios/introspection-mac (which are now grouped in an
`introspection` test), and dontlink-mac (which now shows up in the `dont link`
tests).
2017-05-10 17:17:39 +02:00
Rolf Bjarne Kvinge 469133a8fd [ObjCRuntime] Remove XM limitation. Fixes #55857. (#2076)
* [ObjCRuntime] Remove XM limitation. Fixes #55857.

I can't remember why I added this limitation, and git history provides now
clues.

Everything compiles without the limitation, and the bug is fixed, so I can't
see a reason not to fix it.

https://bugzilla.xamarin.com/show_bug.cgi?id=55857

* [tests] Run xammac tests both in Debug and Release configurations.
2017-05-10 10:08:56 +02:00
Rolf Bjarne Kvinge 336dc74fa2 [tests] Convert mmp tests to a standard NUnit test library. (#2067)
* [tests] Convert mmp tests to a standard NUnit test library.

* [xharness] Add support for restoring nugets before building projects.

And restore nugets for tests-mac.sln before building mac test projects.
2017-05-08 13:20:01 +02:00
Rolf Bjarne Kvinge 9d672e86ce [xharness] Make the top-level test names identical between iOS and Mac.
Make the top-level test name for equivalent tests between iOS and Mac have the
same name, so that these tests are grouped together.

For instance: we used to have a System-Mac tests and System tests (the latter
being iOS tests), now there are just System tests, and nested inside are both
the Mac and iOS System tests.
2017-02-10 16:39:31 +01:00
Rolf Bjarne Kvinge 8391a3ca39 [xharness] Major rewrite (add server mode, add device support, add today extension support).
* Add a server mode, which launches a web server (and a web page) that can be
  used to interactively run tests and view their results.

* Add support for running test assemblies in a today extension (generating a
  new set of projects, similar to how we generate tvOS/watchOS projects based
  on the iOS project, we now generate a today extension project in addition to
  the tvOS and watchOS projects).

* Load all the different tests (and show them in the html report, although
  they show up as 'ignored'), even for disabled/ignored tests. This makes
  disabled/ignored tests more visible, and also makes it possible to actually
  run them using the embedded web server.

* Add support for running tests on device. Tests will be executed on multiple
  devices simulatenously (any connected devices will be used).
2017-01-05 13:08:48 +01:00
Chris Hamons 6fc5d5b527 [XM] Add 32-bit variants of apitest and introspection and fix bindings (#1234)
* [XM] Add 32-bit variants of apitest and introspection and fix bindings

- Previous to this we were only running 64-bit tests, which caused us
to make mistakes

* Fix cherry-pick to build

* Correctly skip jenkins XM45 when asked

* Fix logic

* Run 32-bit tests on Jenkins

* Fix Jenkins grouping by respecting -32 suffix

* More fixing of jenkins. This time make enum for 32-bit types
2016-11-30 16:38:32 +01:00
Rolf Bjarne Kvinge d9bf0e1728 [xharness] Add support for building and running mac tests on jenkins. 2016-06-15 10:51:14 -07:00
Rolf Bjarne Kvinge d135612f59 [tests] Implement support in xharness for running the simulator tests grouped by simulator, and write out an html report. 2016-06-15 10:51:14 -07:00