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

1068 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot 97d2504d51
[tools] Remove MD5 from tooling (#8769)
Note: affected tools are not included in the code shipping inside the SDK

Usage of deprecated cryptographic algorithms is not approved anymore,
even if not used for cryptographic purpose.

MD5 was used to create immutable GUID since it's output is 128bits which
is just what a GUID wants as it's input (16 bytes). The same can be
achieved (even if a bit slower) with a newer/longer hash function

https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1128148
2020-06-04 22:14:13 -04:00
Rolf Bjarne Kvinge aec9c93bee
[dotnet] Add tests for our various platforms. (#8708)
* [tests] Add a unit test project to test our net5 support.

* [tests] Fix clearing environment variables when launching processes.

* [tests] Add net5 macOS test app.

* [tests] Add net5 tvOS test app.

* [tests] Add net5 watchOS test app.

* [msbuild] Exclude CreateAppBundleDependsOn from net5 builds as well.

* [msbuild] We're not required to know the signing identity to figure out the app extension bundle name.
2020-05-29 17:58:34 +02:00
Rolf Bjarne Kvinge bebbeb18a3
[msbuild] Improve xharness and makefiles make it easier to run both iOS and Mac MSBuild tests. (#8709)
It even looks like running the Xamarin.Mac MSBuild tests from the command line
has never worked... so fix that as well.
2020-05-29 17:50:46 +02:00
Rolf Bjarne Kvinge 952037b7a3
[tests] Remove Classic code from all tests. (#8707) 2020-05-29 16:43:06 +02:00
Manuel de la Pena da6e6f2800
[Harness] Move logic to create the device tests our of Jenkins.cs (#8699)
Making Jenkins just orchestrate. Later this class will be testable.
2020-05-28 22:32:48 -04:00
Manuel de la Pena d241d8dae1
[Harness] Create a TestServer that will serve the Xharness page. (#8706)
Move all the logic of the server to its own class to later be able to
add tests in Jenkins (make sure that we do run it) and in the server
itself (check that files are server, correct actions are executed etc..)

At this point Jenkins just creates the tests tasks via other objects and
executes in server mode or not depending on the env.
2020-05-28 12:54:45 -04:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Manuel de la Pena 8b69ddb960
[Harness] Remove logic that builds sim tasks. (#8697)
One step closer to make the Jenkins class just know how to spin the
tasks and what tests are selected. This new class, once we can have a
clean Jenkins class will be testeable.
2020-05-28 09:34:27 -04:00
Manuel de la Pena 46b36b4252
[Harness] Remove not needed private var by Jenkins. (#8698) 2020-05-28 07:44:20 -04:00
Manuel de la Pena 0f3435bff1
[Harness] Fix markdown take two. (#8701)
The grouping of the tasks was moved to the html report. This meant that
the markdown was not getting all the correct tasks. Move the grouping of
the tasks out of the hml report and use it with the markdown so that
both reports have the same data.

Also fixes an issue when tests failed and did not appear correctly in
the comment such as in comment: https://github.com/xamarin/xamarin-macios/pull/8698#issuecomment-635006243
2020-05-28 07:43:54 -04:00
Manuel de la Pena 8d433815c4
[Harness] Fix issues in the markdown when reporting failures. (#8696)
The failures are aggregated tasks, we need to get the, use the key as
the name of the test and use the rest of the data from the ITestTask.
The reason is that the ITestTask.Name was modified by Jenkins.cs to
group them.

fixes: https://github.com/xamarin/xamarin-macios/issues/8695
2020-05-27 17:03:06 -04:00
Rolf Bjarne Kvinge af1323f4c5
[xharness] Always capture stdout/stderr from the simulator to actual files. (#8689)
This avoids confusion when tests are run locally using 'make runner' (and
would print the simulator's stdout/stderr to the terminal) versus when run on
bots (and would write the simulator's stdout/stderr to separate files that
would show up in the html report).
2020-05-27 15:31:20 +02:00
Rolf Bjarne Kvinge a3516c33aa
[xharness] Add crash reports to a logs collection we care about. (#8690)
Add crash reports to a logs collection we care about, instead of to a logs
collection that's promptly forgotten.

This makes sure crash reports actually show up in the html report.
2020-05-27 15:27:32 +02:00
Manuel de la Pena 488bce571e
[Harness] Refactor Hml generation. (#8686)
This is a step towards trying to make the modification of the html
easier for other team members, the are just to small logical changes:

1. Removed the GenerateReportImpl to a HtmlReportWriter.
2. Do not make the HtmlReportWriter call the Marckdown one, the are
independent.

There is room for improvement, since there are some collections
re-calculated. That change will come once we have this out of the way.

At some point, we ought to be able to make changes in the html just be
as hard as they should be (html + css, we are not experts on that).
2020-05-26 22:11:09 -04:00
Manuel de la Pena a512056c95
[Harness] Make sure that the error knowledgebase is used in device runs. (#8682)
The knowledgebase was just added in the simulator case, not in the
device. That meant that the tcp error was not reported.

Also added another possible case of tcp errors to be picked up and be
shown as a known error (device throws a diff error when on airplane
mode).

fixes: https://github.com/xamarin/xamarin-macios/issues/8659
2020-05-26 17:58:44 -04:00
Manuel de la Pena 17e413fa7b
[Harness] Move the logic to reload the simulators outside Jenkins. (#8658)
Following other PRs, try to reduce the work of the Jenkins class to
orchestrate the different classes and move any other logic to classes
with a single concern. Add tests for the new class.
2020-05-25 20:03:04 -04:00
Manuel de la Pena efd7fa6d46
[Harness] Move the resource manager implementation out of Jenkins. (#8660)
Move the resource management out of Jenkins. Add tests to the new class.
2020-05-25 16:10:50 -04:00
Manuel de la Pena 98016a760e
[Harness] Move the periodic command execution logic out of Jenkins. (#8657)
Move the logic out, Jenkins class should just orchestrate all the diff
tasks but should not know how they are executed.
2020-05-25 10:00:57 -04:00
Rolf Bjarne Kvinge d10a387ffa
[tests] Port cecil-tests to new-style csproj. (#8663)
Also switch xharness to build the csproj instead of running the makefile to
build the tests, because that way xharness is able to automatically use the
correct NUnit runner depending on the NUnit version the tests are using.
2020-05-25 14:47:20 +02:00
Rolf Bjarne Kvinge b601c5c62a
[xharness] Make AppBundleInformationParser.ParseFromProject async and make it take an ILog and a IProcessManager. (#8662)
This will be required in a later PR.
2020-05-25 14:47:10 +02:00
Rolf Bjarne Kvinge e73bf6cb29
[xharness] Don't use the MSBuild xml namespace when processing sdk-style projects. (#8647)
* [xharness] Don't use the MSBuild xml namespace when processing sdk-style projects.

The sdk-style projects don't use MSBuild's xml namespace, which means that it
will be added to every node we create if we use it.

* Fix merge conflict resolution failure.
2020-05-25 11:42:41 +02:00
Rolf Bjarne Kvinge eb3c1eeb0f
[xharness] Fix showing unit test failure list and summary when there are many failing tests. (#8649)
We'd check for more than 100 tests in the wrong location, and completely break
out of showing anything at all.
2020-05-25 09:34:01 +02:00
Manuel de la Pena 465ba9b2e7
[Harness] Move the Markdown code out of Jenkins + tests. (#8651)
Move the generation of the markdown out and add tests. Make sure that
the report writes the expected results and specially that it shows the
known issues.
2020-05-21 23:56:30 -04:00
Manuel de la Pena ea514286ba
[Harness] Move the definition of the tasks outside of the jenkins class. (#8635)
Create some enumerables that will state the tests to run, that way, if
new tests need to be added, there will not be a need to edit the
jenkins class.

Add tests to ensure that all the tests are added. That away we will make
sure that tests are not removed by accident.
2020-05-21 12:48:05 -04:00
Manuel de la Pena 406026cd1a
[Harness] When we have a known issue, add it to the markdown. (#8633)
If we have a knonw issue, lets add the message and the link to the
markdown so that the monitoring person does not need to look at the
html page.

fixes: https://github.com/xamarin/xamarin-macios/issues/8625
2020-05-20 21:58:09 -04:00
Manuel de la Pena 37fb9ded52
[Harness] Remove not longer used method. (#8618) 2020-05-19 17:55:05 -04:00
Manuel de la Pena 7d320fb9b6
[Harness] Move GetColor method out of Jekins. (#8616)
Reduce the logic that is not related to the execution of tests out of
jenkins. Add tests.
2020-05-19 15:37:56 -04:00
Manuel de la Pena 02f73a567e
[Harness] Remove methods that are already present in the KnowledgeBase class. (#8619) 2020-05-19 13:57:09 -04:00
Manuel de la Pena 2187eadf05
[Harness] Move the generation of the variations out. (#8611)
Try to make the Jenkins class do a single task. Move the generation of
the variations logic out (which is hard to test atm, but will be doable
in a second round).

Moved some useful methos also out and add tests.
2020-05-19 11:13:31 -04:00
Manuel de la Pena edb4fe8d27
[Harness] Move GitHub to be a VCS interface to simplify testing. (#8579)
Move to be a non static class so that we can later easily test the
TestSelector class.
2020-05-12 16:14:40 -04:00
Manuel de la Pena 52afa11bbd
[Harness] Fix broken tests. (#8551)
Tests are not ran as part of the CI and got borken again. Fix them, will
add them as part of the CI once they land fixed.
2020-05-11 09:52:24 -04:00
Rolf Bjarne Kvinge 1457f8666d
[jenkins] Add support for specifying custom labels using a file. (#8549)
This makes it possible to select what should be done on CI when building a
commit on internal Jenkins (as opposed to when building a pull request, in
which case labels can be set on the pull request).
2020-05-08 15:44:41 +02:00
Manuel de la Pena 0664584f4b
[Harness] Rollback change to use full path. (#8546)
The GetReader from the install log is broken and requires a re-eng.
Rollback to using the fullpath, not as nice, but that way we do not have
exceptions.

We are using issue #8545 to track the actual bug in the logs when we
request a Reader, if the reader cannot be created we should not be
throwing an exception, whats more, that reader should not be null since
otherwise we would not get the install logs.
2020-05-07 20:18:15 -04:00
Manuel de la Pena 531ba21a49
[Harness] Use readers over paths. (#8534)
As issue https://github.com/xamarin/xamarin-macios/issues/8533 states,
not all loggers support the BullPath property, all of them do support
the GetReader one. We move the creation of the failures to use the
readers and reduce the chances of getting an exception.

fixes: https://github.com/xamarin/xamarin-macios/issues/8533
2020-05-06 18:58:10 -04:00
Manuel de la Pena b58bb1b50b
[Harness] Do not use the tunnel bore in the mtouch tests. (#8531)
The change in xamarin/xamarin-macios/@617777ae73ccefdddd5711fe9628243b399492be
forgot to ignore the use of the tunnel in some cases. Is not the root of
the exception, but is the root of the tests failing after that commit.

fixes: https://github.com/xamarin/maccore/issues/2217
2020-05-06 17:34:24 -04:00
Manuel de la Pena 02e09cb655
[Harness] Refactor the selection of the tests out of Jenkins.cs (#8515)
Move the test selection logic out. Tests will land after we refactor the
Github class, which we depend on, to not be static, so that we can test
the different paths.
2020-05-05 15:26:41 -04:00
Manuel de la Pena 16ad7e642d
[Harness] Small refactor to get the knowledge base out of jenkins. (#8502)
* [Harness] Small refactor to get the knowledge base out of jenkins.

Some small changes to make things a little easier to understand:

* Add a new method in case we find known install issues.
* enable nullable, lets go step by step.
* Move logic outside Jenkins.cs
* Add tests! \o/
2020-05-04 15:09:19 -04:00
Manuel de la Pena 617777ae73
[Harness] Add support to create tunnels. (#8446)
* [Harness] Add support to create tunnels.

Add support to create tunnels in case the devices cannot connect to
the host. This option is false by default, which means that unless told
otherwise xharness will try to se a tcp connection over the WiFi.

We are not setting it as default because the devices in DDFun will have
access to an unrestricted network. Nevertheless after this PR we will
create a new one with the following logic:

1. Try to use the tcp connection using the network.
2. If devices cannot connect to the host via the network, fall back to
the tcp tunnel.

This change executes a tunnel process per test application, most of the
cases out of the 150 test application we execute, most of them (maybe 98%
but most % are made up) will pass, and just a few of them will fail. The
reason is that there is a daemon in the OS that gets underwater.

Rather than tryingt o find a hacky way to re-use the tunnel, lets KISS
and if we need to hack that, do it as an enhancement.
2020-05-04 13:21:38 -04:00
Rolf Bjarne Kvinge cb234697f5
[msbuild] Remove the net461 version of the msbuild task assemblies. (#8419)
The netstandard2.0 version has been the default for a few weeks now, and no
problems have been found, so just delete the net461 version.

This speeds up testing a bit, since we won't be testing the net461 version
anymore.
2020-04-20 09:59:22 +02:00
Manuel de la Pena 7a2573a99b
[Harness] Move all common code to the shared lib. (#8389)
Moved all the code that can be shared with the CLI to the common
library. We neede some small changes, but mainly due to namespaces and a
forgotten interface implemenation (was already implemented, was missing
in the class).

This was fun :)
2020-04-17 18:14:55 -04:00
Manuel de la Pena e0b6ff480c
[Harness] Refactor TestProject to be moved to the common lib. (#8388)
Refactor TestProject so that we can move all the tasks to the common
assembly. We had to remove all the references from Harness, that
included the MonoNativeInfo.
2020-04-16 20:20:53 -04:00
Manuel de la Pena a6dcd40c8b
[Harness] Refactor RunDeviceTask. (#8386)
Move most/all of the logic to a helper class so that it later can be
used in the CLI.
2020-04-16 10:25:24 -04:00
Manuel de la Pena 969d5d92ed
[Harness] Generalize the RunTestTask to allow it to be used in the CLI. (#8380)
Move all the logic outside and use it as a Composition pattern, later
this class can be used in the CLI so that we share the logic of building
and tested.
2020-04-14 18:39:58 -04:00
Manuel de la Pena bbffb308e8
[Harness] Donet doest not need to restore. (#8383)
Removed line due to a bad merge, re-add it.
2020-04-14 15:03:12 -04:00
Manuel de la Pena dbc89f01a4
[Harness] Create IBuildToolTask and use it in the RunTestTask. (#8375)
In order to de-couple the RunTestTask from Jenkins, create an interface
to be implemented, which is pass to use as a member (Composition
pattern). In order to do that, do not expose Jenkins as a property of
the interface because it is required just by the base constructor.

Moving the the use an interface meant a lot of small changes that
should have no real effect (the compiler should have caught any possible
issues).
2020-04-14 13:11:55 -04:00
monojenkins 50d3d7bdc2
[Harness] Fix HML report for NUnitTestTasks. (#8379)
PR https://github.com/xamarin/xamarin-macios/pull/8184 removed the
inheritance with TextWriter, therefore the `as` will return null and we
will not generate the Html report. In this particular case, we do not
need an ILog, we just use it to get a path to the correct location,
therefore, we can create the file using the full path and pass it to the
xslt.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8364
2020-04-14 12:03:25 -04:00
monojenkins d76c86f233
[d16-7] [Harness] Ensure that the generator tests are set when we modify the sources. (#8378)
fixes: https://github.com/xamarin/xamarin-macios/issues/8363
2020-04-14 11:33:56 -04:00
Manuel de la Pena c150679630
[Harness] Refactor certain class names to simplify the extraction of the RunTestTask. (#8372)
The initial idea of the refactoring looked nice but as soon as we want
to get the RunTestTask out of jenkins, we have a number of naming
issues. Move the tools to not use the *Task postfix so that it is
cleaner and we can later extra the RunTestTask better.


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-04-14 08:04:35 -04:00
Manuel de la Pena 98d21d742c
[Harness] Ensure that the generator tests are set when we modify the sources. (#8371)
fixes: https://github.com/xamarin/xamarin-macios/issues/8363

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-04-14 07:58:24 -04:00
Manuel de la Pena 5e0131db27
[Harness] Fix HML report for NUnitTestTasks. (#8367)
PR https://github.com/xamarin/xamarin-macios/pull/8184 removed the
inheritance with TextWriter, therefore the `as` will return null and we
will not generate the Html report. In this particular case, we do not
need an ILog, we just use it to get a path to the correct location,
therefore, we can create the file using the full path and pass it to the
xslt.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8364
2020-04-13 13:51:48 -04:00
Rolf Bjarne Kvinge f3ee011797
[xharness] Automatically generate xharness make dependencies. (#8324) 2020-04-13 09:26:55 +02:00
Manuel de la Pena a2f57b38d6
[Harness] Generalize MSBuildTask and DotnetBuildTask. (#8306)
Move all the logic outside of the Jenkins namespace. Rework a little the
inheritance to make it nicer in the constructors.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-04-10 16:50:50 -04:00
Manuel de la Pena e668545555
[Harness] Generalize the BuildProjectTask (#8299)
Use composition to generalize the BuildProjectTask to later reuse it in
the CLI.

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-04-08 20:09:10 -04:00
Manuel de la Pena 5b99859321
[Harness] Move BuildToolTask to a more general namespace. (#8287)
Move the task and use composition so that we can reuse the code. This
will later allow other projects to use the class without the need of
Jenkins or Harness and just implement the base class.



Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-04-08 15:03:33 -04:00
Přemek Vysoký db921689a9
[Harness] Remove launchTimeout parameter from TestReporter, move factories (#8322) 2020-04-08 11:32:47 -04:00
Rolf Bjarne Kvinge 28d97d6b6b
[xharness] Don't overwrite variations. (#8312)
This means different variations of tests won't show up as identical in the
html report.
2020-04-08 16:19:58 +02:00
Rolf Bjarne Kvinge 82f3bacc57
[xharness] .NET projects don't need 'nuget restore', they're always restored automatically. (#8313) 2020-04-08 16:19:52 +02:00
Rolf Bjarne Kvinge da2090c460
[tests] Move mmptest/regression to mmp-regression. (#8314)
dotnet doesn't like projects within projects in the file system, because of
default inclusion behavior, where the top project will want to include the
source files for the nested projects.

There are ways around that, but the easiest is to just make sure there aren't
projects within other project directories.
2020-04-08 16:19:47 +02:00
Rolf Bjarne Kvinge 3d7a38e464
[mtouch/mmp] Use a single SdkVersions.cs in tools/common. (#8318)
No need to have two identical files around.
2020-04-08 16:19:34 +02:00
Rolf Bjarne Kvinge f69ef4f696
Setting an environment variable to null doesn't work in .netcore. (#8316)
There is a difference between mono and .netcore with regards to environment
variables when launching processes.

For the following example:

    process.StartInfo.EnvironmentVariables ["FOO"] = null;

.netcore will launch the process with an empty FOO variable, while mono will
launch the process with no FOO variable set.

So unstead remove the variable from the collection of environment variables
(this works fine even if the collection doesn't contain the variable).

Ref: https://github.com/dotnet/runtime/issues/34446
2020-04-08 16:19:08 +02:00
Manuel de la Pena f891076bd8
[Harness] Move to create a more general TestTasks class to be reused. (#8286)
Some of the Jenkins test tasks are very useful and do A LOT of stuff. So
we try to generalize the base class, to later be able to share the most
usebul ones in the shared lib.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-04-07 20:20:38 -04:00
Přemek Vysoký 530f2a2bfa
[Harness] Rename device management classes (Devices, Simulators, ILoadAsync) (#8295) 2020-04-06 14:33:27 -04:00
Přemek Vysoký b4a262eb42
Fix unit tests, make Devices fields readonly (#8293) 2020-04-06 10:57:31 -04:00
Manuel de la Pena ab476d7fa2
[Harness] Fix the generation of the sources. (#8289)
The name of the dll changed, ergo the prefix changed.
2020-04-06 09:52:18 -04:00
Přemek Vysoký ce9f9278b6
[Harness] Move TestImporter into the shared library (#8283) 2020-04-03 18:28:49 -04:00
Manuel de la Pena 10333b0d0f
[Harness] Make sure TestsTasks do not share an id. (#8273)
Threading is hard, part 2. We could have a situation in which two tasks
that are instantiated async use the same id. The id is later used to
build the logs directory etc.. When they share the id we end up in a
situation in which the logs overlap.

fixes: https://github.com/xamarin/xamarin-macios/issues/8146
2020-04-03 14:43:04 -04:00
Manuel de la Pena 3004e7d34b
[Harness] Ensure we do not throw an exception if we do not have tasks. (#8272)
The First extension will throw an exception if the list is empty. Use
FirstOrDefault, check if the devices are null and return the test as
Ignored.

fixes: https://github.com/xamarin/xamarin-macios/issues/8271
2020-04-03 13:23:35 -04:00
Manuel de la Pena d7160b3dcf
[Harness] Completely remove the BCL prefix from the test importer. (#8224)
Remove the last BCLPrefix and move the InfoPlistGenerator to the managed
namespace since it is part of the managed template.
2020-04-03 11:01:56 -04:00
Přemek Vysoký d4cf8301cf
[Harness] Allow to create a process manager with default tool paths (#8278) 2020-04-03 11:00:45 -04:00
Manuel de la Pena feec8d4ef9
[Harness] Remove hardcoded paths to the testing framework dlls. (#8244)
The testing framework dlls come from mono and their paths are harcoded
in the templates. Move the hardcoded paths out to the assembly locator
which know were to find the paths.

This is needed to later allow the cmd to pass the location of the paths.
2020-04-01 15:10:13 -04:00
Manuel de la Pena 1518894394
[Harness] Add the assets as part of the managed template. (#8251)
The assets were being used from the bcl-test directory. Move them as
part of the template. Renamed a file to make things a little easier when
adding the assets (a '.' in the middle of the name made this
complicated).

The template should be selfcotained.
2020-04-01 15:09:08 -04:00
Manuel de la Pena f16561b49f
[Harness] If we cannot connect over tcp use Console.Out as the writer. (#8235)
If we could not connect to the host via tcp, set the writer to be
Console.Out which will fix the NRE and will report the test run in the
runlogs.

fixes: https://github.com/xamarin/xamarin-macios/issues/8130
2020-04-01 14:03:40 -04:00
Přemek Vysoký b14a055265
[Harness] Move code to a shared library (#8234)
- Code that will later be moved to the `dotnet/xharness` repo is first moved to an isolated project before it will be extracted to the new repo and NuGetified
- New project for the shared code and new test project for tests accompanying the moved code are created
- Only Factories are left behind that are used only by XHarness
2020-04-01 13:32:21 -04:00
Manuel de la Pena f383593924
[Harness] Merge the Generator and the Factory in a same object and rename namespace. (#8222)
The Generator and the Factory classes are a xamarin-macios thing.
Initially, they were separated because the code that generated the bcl
tests was not inside xharness. That is not longer the case. We can merge
both classes, generalize the namespace and be more prepared to move out
of the xamarin-macios repo.
2020-03-30 23:23:33 -04:00
Manuel de la Pena 63fcc22bad
[Harness] Make sure we do not copy/generate the app sources more than once. (#8243)
Threading is hard, even with async. We reached a situation in which the
src code of the test applications from the template was being generated
more than once. Ideally, we could have a nice solution with
AsyncLazy<bool> and use the lazy async to copy the code, but it was
moved to netcore 5. The fix is a little uglier but valid, lock and
enure we only generate it once. Please note that you CANNOT use a lock
statement inside a async method.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8240
2020-03-30 21:20:37 -04:00
Manuel de la Pena bdce02622f
[Harness] Remove the BCLTestProjectInfo class. (#8221)
Remove two classes that are not really needed and a method. We moved to
named tuples to make things simpler. Unfortunally C# does not support:

```csharp
using MyNamedTuple = (string Name, double value, bool answer);
```

But we have to live with this. Makes the namespace simpler and removes
confusion with the already present project classes that are more widely
used.

* [Harness] Remove the BCLTestProjectInfo class.

The class is not really needed. Move to a tuple, make the definition of
the group test project nicer since the dictionary initiallization makes
it cleaner.
2020-03-30 15:20:50 -04:00
Manuel de la Pena 728442e01f
[Harness] If empty nodes are found, do not crash. (#8201)
Looks like we have cases in which we get empty nodes when listing
devices, which makes the parsing of the nodes fail and crash.

Move the code to a diff method, try to parse the data, if there is an
exception (missing data) return null. If null is returned, do not add
it.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8160
2020-03-30 10:41:38 -04:00
Manuel de la Pena 0ffd4faa64
[Harness] Add a new known failure to help the mionitoring person. (#8227)
Looks like mono is not investing much time at the moment fixing
https://github.com/mono/mono/issues/18560

The above error happens always on 32b device tests. Added a new known
failure for the monitoring to use in their task so that they do not have
to goole the issue and they know that is knonw already.
2020-03-30 07:29:52 -04:00
Manuel de la Pena b371133216
[Harness] Verify that issue #8214 is fixed. (#8229)
Added a test in the xml parser that verifies that the parsing of the xml
is correct and that the correct number of failures is reported in the
human readable form.

fixes: https://github.com/xamarin/xamarin-macios/issues/8214
2020-03-30 07:29:22 -04:00
Manuel de la Pena 3623d7a72f
[Harness] Remove not needed classes from the BCLTestImporter. (#8218)
Remove two classes that are not really needed and a method. We moved to
named tuples to make things simpler. Unfortunally C# does not support:

```csharp
using MyNamedTuple = (string Name, double value, bool answer);
```

But we have to live with this. Makes the namespace simpler and removes
confusion with the already present project classes that are more widely
used.
2020-03-30 07:26:15 -04:00
Přemek Vysoký 7d47b073cf
[Harness] Remove AppRunner references from TestReporter (#8212) 2020-03-29 12:02:03 -04:00
Přemek Vysoký 6209719f51
[Harness] Remove Harness as a dependency (#8203) 2020-03-27 12:41:31 -04:00
Alex Soto dddcba9dc4
Merge pull request #8207 from dalexsoto/master-xcode11.4
[xcode11.4] Merge d16-5-xcode11.4 into master
2020-03-27 10:58:32 -04:00
Přemek Vysoký 46a2d96c55
[Harness] Fix XHarness unit tests (#8208)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-03-27 09:46:54 -04:00
Alex Soto 3ff3e07ebe Merge remote-tracking branch 'xamarin/d16-5-xcode11.4' 2020-03-26 19:59:14 -04:00
Přemek Vysoký a48667b761
[Harness] Remove TextWriter dependency, refactor Logging (#8184) 2020-03-26 09:59:43 -04:00
Přemek Vysoký 3f3c9af198
Fix BUILD_REVISION env argument (#8197)
Fixes #8185 and some other minor things problems in AppRunner
2020-03-25 12:38:10 -04:00
Přemek Vysoký d98c515a4c
[Harness] Add strongly typed mlaunch args and escape them (#8167)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-25 10:59:29 -04:00
Manuel de la Pena 0324fbab34
[Harness] Refactor, simplify and fix issues in the result parsing. (#8183)
Refactor result parsing and test it. Make sure that all the possible
corner cases are taken into account. The changes are as follow:

1. Move all the logic to a new class, which will take care of the reustl
parsing.
2. Simplify the parsing method by splitting the noise code to other
functions. There is no need to parse several files in the same method.
3. Add tests that make sure that the correct result is returned when:
  a. The app cannot launch.
  b. The app timesout.
  c. The app crashes.
2020-03-25 02:44:47 -04:00
Přemek Vysoký 6a58674960
Extract AppBundleInformationParser (#8174) 2020-03-24 10:02:22 +01:00
Přemek Vysoký 29e978e0be
[Harness] Add AppRunner.RunAsync unit tests (#8159)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-20 14:18:28 -04:00
Přemek Vysoký ec420e6740
[Harness] Make CrashSnapshotReporter injectable and add unit tests (#8129)
* Move AppInstallMonitorLog

* Move Helpers.GenerateStableGuid

* Move DirectoryUtilities

* Move DirectoryUtilities.RootDirectory

* Add CrashSnapshot ctor

* refactor CrashReportSnapshot

* Add WrenchLog

* Move stuff out of Harness

* Remove RootDirectory

* Revert RootDirectory

* Remove Initialize() calls

* Make CrashReportSnapshot injectable

* Remove Harness dependency from CrashReportSnapshot

* Add device snapshot tests

* Trim down IHarness and make properties of Harness readonly

* Memoize xcoderoot

* Use MlaunchArguments

* Add MlaunchArguments docs

* Add CrashReportSnapshot docs

* Rename method

* Rename class

* Refactor CrashSnapshotReporter

* Inject AppRunner

* Indent parameters

* Indent parameters

* Fix unit tests

* Fix gathering crash logs

* Add crash logs to output

* Fix getting xcode root

* Fix alignment

Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-20 11:42:43 +01:00
Manuel de la Pena 79a089cd0d
[Harness] Generalize XmlResultParser. (#8156)
First step to try and clean up the psring of results and ensure that we
are doing the correct thing. We have several issue there. We want to
move all the complicated logic out of AppRunner and test the different
outputs and the full result matrix.

This commit first allows to use an instance class for the parsing, later
we will move things out. Step by step
2020-03-19 17:42:51 -04:00
Manuel de la Pena a4b71841df
[Harness] Create a more general TestAssemblyDefinition. (#8149)
XHarness TestAssemblyDefinition is very particular on the way we deal
with the mono test assemblies, in the general case, it only contains the
assembly name, but in the xamarin-macios it calculates the name of the
assembly using the platform.

Create an interface so that the command line was its own implementaiton
and move as much as possible to use the AssemblyLocator class. Later we
can add two simpler implementations for the more general cases.

Move the AssemblyLocator out of the Templates namespace since it makes
more sense.
2020-03-19 13:40:13 -04:00
Přemek Vysoký f8d744cf54
Create DeviceLogCapturer factory and inject it (#8154)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-19 13:38:35 -04:00
Přemek Vysoký 5422d4f9b8
Inject ProcessManager into SimulatorDevice (#8145)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-19 13:37:21 -04:00
Přemek Vysoký a5fbe513a3
Increase wait time for crash logs (#8152)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-19 11:13:06 -04:00
Přemek Vysoký 16cbf4a025
Create CaptureLogFactory and make CaptureLog injectable (#8141)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-18 18:39:10 -04:00
Manuel de la Pena 4449b0c4c1
[Harness] Remove the code that check if the test dlls were downloaded. (#8131)
Initially the location of the test dlls of the downloaded artefact and the compiled mono were different. That was no longer the case and therefore there was a lot of code that could be removed since the wasDownloaded variable was set to be always true.

We remove the not needed code that will calculate a diff path if mono was compiled and use the AssemblyLocator class to point to the correct root path were test dlls will be found.

Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-03-18 16:54:47 -04:00
Přemek Vysoký fbbd5ceede
[Harness] Move Timestamp and TTY utilities to Helpers (#8138)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-18 12:10:25 -04:00
Přemek Vysoký 5f2905c5a4
[Harness] Move utilities out of Harness.cs (#8125)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-17 14:42:21 -04:00
Přemek Vysoký 723ec1857c
[Harness] Refactor simple listeners (#8120)
* Add RunMode, DeviceClass

* Inject dependencies into AppRunner

* Add all readonly fields to ctor

* Add basic AppRunner tests

* Add first proper Install test

* Add Uninstall tests

* Refactor listener ctors

* Update tests/xharness/Harness.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Use InvalidOperationException

* Hide fields

* Add TODO

Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-03-17 10:16:19 +01:00
Manuel de la Pena 5209b19ef4
[Harness] Move all test project generation to the template object. (#8122)
At this point the BCLTestProjectGenerator class just represents a configuration class that knows about the project that are particular to xamarin-macios. All the logic that creates the projects has been moved to the XamariniOSTemplate which creates the project using the information passed by the config class.

At this stage, we have the ability to generate test projects by simply passing the info classes, which can be built either by a class (like the generator one) or a command line. We have fully decoupled the project generation from Xharness.

Tests have been added or moved to the correct location.
2020-03-16 18:52:41 -04:00
Přemek Vysoký d1666d524d
Add MLaunchArgument classes (#8123)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-16 16:09:27 -04:00
Přemek Vysoký 26903778fb
[Harness] Refactor and unit-test AppRunner (#8117)
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-03-16 09:26:46 -04:00
Manuel de la Pena 82bd730ee3
[Harness] Add several fixes to the crash reports. (#8107)
The name of the tests is picked up in a more inner node than
expected. Fwd the test name to make sure that noe all
crashes/timeouts/launches have the same name.
Add extra information when we have a timeout. We want to know the
name and the bot used to ensure that it is easier to identify patterns.
Timeout tests now have:

test title as: App Timeout {AppName} {Variation} on bot {device_name}
message: AppName} {Variation} Test run timed out after {timeout.TotalMinutes} minute(s) on bot {device_name}.
Build issues now have:

test title: App Build {projectTask.TestName} {projectTask.Variation}
That way we know the exact app that failed to build and the exact app that timeout and the device used to run it.
2020-03-13 18:15:02 -04:00
Přemek Vysoký ef9f7e4e9b
[Harness] Make Harness properties immutable (#8093)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-13 10:41:02 -04:00
Manuel de la Pena e96c56bf3c
[Harness] Fix bug in TCCDb editing that is missing using the watchapp id. (#8098)
The wrong var name was used and the table was not correctly updated.
Updated tests to take into account the new \n in the sql.
2020-03-12 13:46:29 -04:00
Manuel de la Pena 7332c92263
[Harness] Move the templates src to be embedded resources. (#8090)
Move the project templates to be a resource in the dll. That way we can
move all the code outside of xharness and used it outside. This is not a
fill refactor but a first step to decouple the bcl test generation from
the xamarin-macios project.

XHarness should not see a difference, everythign works and simply makes
the dlls larger due to the new resources.

The code is going to take into account that the mono team will want to
use and unmanaged template with no dependencies on Xamarin.iOS and
Xamarin.Mac.



Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-03-12 13:45:47 -04:00
Rolf Bjarne Kvinge 0b0f6ab043
[xharness] Improve TCC database editing. (#8094)
* Delete any previous entries before adding new ones in all simulators.
* Separate statements by newlines, so logs are easier to parse by humans.
2020-03-12 15:19:32 +01:00
Rolf Bjarne Kvinge 8be4333f43
[xharness] Rework how we build test-libraries a bit. (#8095)
* It's built in parallel with populating the tests.
* A failure isn't silently ignored, it's now shown in the html report.
2020-03-12 15:18:05 +01:00
Rolf Bjarne Kvinge 800d63bb4d Merge remote-tracking branch 'origin/master' into dotnet-bgen 2020-03-12 10:37:12 +01:00
Rolf Bjarne Kvinge 5dda97a0ef [xharness] Unset a few environment variables when running .NET tests. 2020-03-12 10:36:59 +01:00
Manuel de la Pena 16a84bd7f7
[Harness] Move the project templates out of the harness dir. (#8088)
Move the project templates to be a resource in the dll. That way we can
move all the code outside of xharness and used it outside. This is not a
fill refactor but a first step to decouple the bcl test generation from
the xamarin-macios project.

XHarness should not see a difference, everythign works and simply makes
the dlls larger due to the new resources.

The code is going to take into account that the mono team will want to
use and unmanaged template with no dependencies on Xamarin.iOS and
Xamarin.Mac.
2020-03-11 20:10:07 -04:00
Manuel de la Pena ed77f3bfd1
[Harness] Add extra tests for the SimDevice and Simulator classes. (#8079)
Add tests for the SimDevice and Simulators classes that ensure that the
process is correctly called and the xml with the simulators parsed and
returns the correct number of sims.
2020-03-11 20:09:38 -04:00
Manuel de la Pena afb11d65cc
[Harness] Add more context to crashes and timeouts. (#8078)
Update the generation of the xml to include a more descriptive title
than "AppCrash". After this commit the name of the testcase and the test
follow this pattern:

- "App Crash {ApplicationName} {Variation}"

This will make it easier to filter since the an example failure will be:

"App Crash Monotouch (Debug)"

Note, the '()' in the example are part of the variation and that is
build by xharness and passed to the runner.

Fixes: https://github.com/xamarin/xamarin-macios/issues/8077
2020-03-11 17:09:21 -04:00
Manuel de la Pena 4b3d2d1cb4
[Harness] Refactor simulators and devices listing. (#8086)
Moved the implementations under Hardare. Add the following to simplify
the testing of the AppRunner:

1. Add interfaces for the listing/loading of devices and simulators.
2. Add a special class for mlaunch args. That way we are sure that
arguments are correctly passed and we do not have typos.
3. Added tests for the new classes and for the device and devices
classes.
4. Added tests for the management of the TCC db.

Tests for the SimDevice and Simulators will come in a following PR. The
only reason for it is that I realize that the commit was getting to
large.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-03-11 17:06:40 -04:00
Rolf Bjarne Kvinge 067c88e2f4 [xharness] Fix merge problem. 2020-03-11 12:36:09 +01:00
Rolf Bjarne Kvinge dac68f33b4 Merge remote-tracking branch 'origin/master' into dotnet-bgen 2020-03-11 12:01:31 +01:00
Rolf Bjarne Kvinge f2063efefb
Revert "[Harness] Move utilities out from Harness.cs, refactor AppRunner fields (#8074)" (#8082)
* Revert "[Harness] Refactor simulators and devices listing. (#8064)"

This reverts commit e53b686ef6.

* Revert "[Harness] Move utilities out from Harness.cs, refactor AppRunner fields (#8074)"

This reverts commit 78dd3b861c.
2020-03-11 10:38:03 +01:00
Manuel de la Pena e53b686ef6
[Harness] Refactor simulators and devices listing. (#8064)
Moved the implementations under Hardware. Add the following to simplify
the testing of the AppRunner:

1. Add interfaces for the listing/loading of devices and simulators.
2. Add a special class for mlaunch args. That way we are sure that
arguments are correctly passed and we do not have typos.
3. Added tests for the new classes and for the device and devices
classes.
4. Added tests for the management of the TCC db.

Tests for the SimDevice and Simulators will come in a following PR. The
only reason for it is that I realize that the commit was getting to
large.


Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
Co-Authored-By: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-03-10 15:10:37 -04:00
Rolf Bjarne Kvinge 7108f59f8b Merge remote-tracking branch 'origin/master' into dotnet-bgen 2020-03-10 19:27:46 +01:00
Přemek Vysoký 78dd3b861c
[Harness] Move utilities out from Harness.cs, refactor AppRunner fields (#8074)
Move all the extension methods to a class. After this refactor, we will
be able to DI the manager in the other classes and assert that the
processes are called with the correct parameters without the need of
launching them.

Also added tests for the manager. We create a dummy console app that
will be executed by the tests. The console app has a number of
parameters that will be used to ensure that the new process behaves as
we want:

- Use the passed exit code.
- Create child proecesses if needed.
- Sleep to force a timeout.
- Writer messages to stdout and stderr.

Our tests call the dummy app and ensures that the results match the
behaviour expected by the dummy app.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-03-10 12:44:18 -04:00
Rolf Bjarne Kvinge 5c323cebb4 Merge remote-tracking branch 'origin/master' into dotnet-bgen 2020-03-10 13:50:11 +01:00
Rolf Bjarne Kvinge d7d9baef2d Use full path to the 'dotnet' executable.
This way we don't have to change PATH on bots. It always makes it easier to
use a different location for the executable in the future if we wished to.
2020-03-10 13:41:16 +01:00
Přemek Vysoký fa7ffbcabc
[Harness] Split out Targets, Utils and remove external links (#8061)
* [Harness] Refactor process management to be testable.

Move all the extension methods to a class. After this refactor, we will
be able to DI the manager in the other classes and assert that the
processes are called with the correct parameters without the need of
launching them.

Also added tests for the manager. We create a dummy console app that
will be executed by the tests. The console app has a number of
parameters that will be used to ensure that the new process behaves as
we want:

- Use the passed exit code.
- Create child proecesses if needed.
- Sleep to force a timeout.
- Writer messages to stdout and stderr.

Our tests call the dummy app and ensures that the results match the
behaviour expected by the dummy app.

* Apply suggestions from code review

Co-Authored-By: Přemek Vysoký <premek.vysoky@microsoft.com>

* Move out utils into a separate namespace

* Move Cache to the test project

* Fix namespaces after merge

* Remove unneeded code

* Move Target files

* Sort csproj

* Refactor Targets

* Rename Cache to TempDirectory

* Fix using

* Move ProjectFileExtensions

* Remove dead code

* Move Extensions

* Add empty StringUtilsTests

* Add StringUtils tests

* Revert refactorings

* Update tests/xharness/Utilities/StringUtils.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Update tests/xharness/Utilities/StringUtils.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Add better formatarguments test

* Update tests/xharness/Utilities/StringUtils.cs

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-03-10 13:12:33 +01:00
Rolf Bjarne Kvinge 1fc2f8e3c2 [xharness] Add support for running the generator tests in .NET mode.
This also meant adding support for running .NET tests in xharness. Some
refactoring was done to extract common code to shared members, in order to
avoid duplicating a lot of code.
2020-03-09 19:49:26 +01:00
Rolf Bjarne Kvinge bcefeb37b6
[xharness] Handle UTF8 text better. (#8065)
* Set UTF8 as the encoding for process output.
* Serve plain text as UTF-8 plain text from our test server.

This makes emojiis render as emojiis 😁😁😁
2020-03-09 18:40:46 +01:00
Rolf Bjarne Kvinge bd29f99aaa
[xharness] Rename XBuildTask to MSBuildTask. (#8067)
We're not using xbuild anymore, and haven't for quite a while.
2020-03-09 16:44:49 +01:00
Manuel de la Pena 597b7d7b0b
[Harness] Refactor process management to be testable. (#8053)
Move all the extension methods to a class. After this refactor, we will
be able to DI the manager in the other classes and assert that the
processes are called with the correct parameters without the need of
launching them.

Also added tests for the manager. We create a dummy console app that
will be executed by the tests. The console app has a number of
parameters that will be used to ensure that the new process behaves as
we want:

- Use the passed exit code.
- Create child proecesses if needed.
- Sleep to force a timeout.
- Writer messages to stdout and stderr.

Our tests call the dummy app and ensures that the results match the
behaviour expected by the dummy app.


Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-03-06 09:11:33 -05:00
Přemek Vysoký 65a7168c66
[Harness] Split out classes from Jenkins.cs to separate files (#8046)
Co-authored-by: Premek Vysoky <prvysoky@microsoft.com>
2020-03-06 06:00:34 -05:00
Manuel de la Pena cd35f26d6f
[Harness] Add listeners tests.
Provide tests that will ensure that the Tcp listener and File listener
will work correctly. Tests ensure that both listeners receive the data
and write it in the ILog

The tcp test is an interesting one because it redirects the call of the
method to a diff callback that will write the data in a stream to check
the final result.
2020-03-05 06:41:52 -05:00
Manuel de la Pena 0c085cd719
[XHarness] Add tests for all the logging classes. (#8032)
Move to use interfaces, that will let us later add tests that will
verify that all the correct logging is performed. As an example, added a
test for XmlResultParser that ensures that the failures are correctly
generated. The test uses Moq to pass the different paths to be used and
later be able to verify the wirtten xml.


Co-authored-by: Přemek Vysoký <premek.vysoky@microsoft.com>
2020-03-04 15:27:52 -05:00
Manuel de la Pena 169cecfe93
[Harness] Refactor a little the code for logging to simplify testing. (#8021)
Move to use interfaces, that will let us later add tests that will
verify that all the correct logging is performed. As an example, added a
test for XmlResultParser that ensures that the failures are correctly
generated. The test uses Moq to pass the different paths to be used and
later be able to verify the wirtten xml.
2020-03-03 13:59:44 -05:00
Alex Soto 709a90599e Merge remote-tracking branch 'xamarin/xcode11.4' into d16-5-xcode11.4-merge 2020-03-03 10:57:24 -05:00
Manuel de la Pena 8664a96f72
[Harness] When on device, check if we got a tcp exception on a crash. (#8015)
Some crashes are reported as tcp connection issues because they happen
before the app had the chance to write anything in the log. In that
case, we checked for the presence of the file, and if not present we
decided it was a tcp issue when it is not the case.

In this commit, we check for the tcp erorr message in the main_log so
that we are certain that the issue was with the connection and not
anyother.

Testingis simple, ran tests without the phone being part of the same
network and test with a branch that has a crash. For example the one in
https://github.com/xamarin/xamarin-macios/pull/8009 hash 83240612e8
2020-02-29 08:45:48 -05:00
Manuel de la Pena dc57f88e9f
[Xharness] We support diff xml outputs. Allow to pass the desired one. (#7971)
We support different outputs, lets add the avility for the caller to
decide which one to use. We default to NUnit V3 due to or dependency to
it in VSTS.
2020-02-27 20:10:48 -05:00
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 3710528e0d
[Harness] Add tests for the xml result parser. (#7988)
Add tests to make sure that we can be safe when we make changes to that
part of the code.

Some methods are not tested but due to dependencies. Will work un
separating things a little to keep moving fwd.
2020-02-26 19:50:37 -05:00
Manuel de la Pena 3d32ab52a7
[Harness] Move BCLTestImport sources to their rightful place. (#7985)
We initially added a cmd to do the bcl test import generation that has
never been used.

We are moving the bcl test importer code to xharness and creating a
NUnit test project to run the tests that we already added. Unit tests
pass.
2020-02-26 14:10:36 -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
Manuel de la Pena f3b02e2575
[Harness] Fix false crash report. (#7979)
fixes: https://github.com/xamarin/xamarin-macios/issues/7978
2020-02-25 22:46:27 -05:00
Manuel de la Pena 09c4c80c21
[Harness] Add start-time to work around a bug in the publishing tool. (#7951)
The publishing tool is a little fragile. In run
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3490479&view=logs&j=67d14776-f827-5fe4-2625-2db4b5987fd1&t=fa262eec-9d97-5ba4-b4cc-a9292beecd8f
I noticed that valid test runs with a failing test (launch issues) were
not being uploaded.

I found out that the reason is a flaw in the logic on the parser of the
publishing tool. The tool assumes, that if there is no start-time, there
are no test results (do remember that NUnitV3 is schemaless we don't
know exactly what attrs are compulsory).

The culprint is line: https://dev.azure.com/mseng/AzureDevOps/_git/AzureDevOps?path=%2FTa%2FTasks%2FPublishTestResults%2FParser%2FNUnitResultParser.cs&version=GBmaster&line=473&lineEnd=473&lineStartColumn=63&lineEndColumn=64&lineStyle=plain

Basically:

```csharp
 if (testRunNode?.Attributes?["start-time"] != null) {
   // import test data
 }

 // do nothing interesting since there is no data
```

This commit fixes it by setting the start time as the current one, we
dont care since it is a failure xml result.
2020-02-21 14:00:14 -05:00
Manuel de la Pena 8554b84b67
[Harness] Do not add the variation two times to failure messages. (#7950)
AppName should only be the app name since we are passing the varation as
a parameter too. Else we end up with $"{appname} {variation} {variation}".
2020-02-21 10:24:21 -05:00
Manuel de la Pena ca26ef62d5
[Harness] Close message element correctly in NUnit3. (#7946)
Xml should be:
```
<failure>
  <message>Foo</message>
  <stack-trace>Bar</stack-trace>
</failure>
```

But we generate:

```
<failure>
  <message>Foo
    <stack-trace>Bar</stack-trace>
  </message>
</failure>
```

Makes the parsing of the failures impossible.
2020-02-20 11:15:57 -05:00
Manuel de la Pena 5b0361d911
[Harness] Provide device name in those errors where is device specific. (#7947)
In order to simplify the monitoring job add the device name to the
following failures:

* Installation
* Launch
* Tcp Connection

All the above are most of the time due to a misconfigured device. The
device name is useful information for the monitoring person to be able
to reach IT and address the issue.
2020-02-20 11:15:40 -05:00
Manuel de la Pena 44bd2c8589
[Harness] Fix merge mistake. (#7940) 2020-02-19 18:39:05 -05:00
Manuel de la Pena 271a7c5e6c
[Harness] Ensure that the crashed var is out and is propagated to the rest of the code. (#7938)
The parsing code set the crashed variable, but it was not set as an
output variable, that meant that the value was not used. Further in the
code we use the variable to decide if we had a crash or not. Most of the
time, there is no probel since if we have a real crash, we will get the
crash reports and to the right thing, but in the case of tcp connection
issues we do not have them, and therefore the crash xml result is not
created.

Bonus: the local logs variable was hidding a variable in another scope,
fixed that.
2020-02-19 13:18:34 -05:00
Manuel de la Pena 35c04caa1b
[Harness] If there is not BuildTask, do not add logs. (#7936)
xharness does not only allow to run tests in CI, but also helps to run
specific project. That feature is used for the mtouch tests. In that
scenario, we do not have a build task and therefore we will not have the
build logs.

fixes: https://github.com/xamarin/maccore/issues/2154
2020-02-19 11:25:44 -05:00
Manuel de la Pena af784d6613
[Harness] Create xml unit test failure when an application timesout. (#7929)
If we are in VSTS and we want to have correct reportings we need to
generate a test failure when the applicaiton times out. If not, we have
a missmatch between the results from xharness (we have failures) and
VSTS (success).
2020-02-18 10:28:06 -05:00
Manuel de la Pena f9c502579b
[Harness] Create a xml crash file when we do not have a result file. (#7928)
On devices that cannot reach the host via TCP we do not have a log, this
means that in the if statement needs to have a case for it.

The main problem is that when the device cannot connect to the host, we
do not get a log OR a crash reason from the crash logs. It makes sense
not to have a crash reason, because the app did not crash. In these
sitations, we have to create a xml crash report (since we really do not
know if we can parse the file) that will tell vsts that there was an
issue. Adding the main log will let the monitoring person see the
results of the test run.
2020-02-18 09:16:10 -05:00
Manuel de la Pena 8f58afe857
[Harness] Add a prefix to the final xml to be imported. (#7914)
Because the PublishTest task is taking a regular expression, it is
importing the test results more than one, which gives wrong stats. Add a
prefix to better filter those files we are interested in (thos with
attachments).

As a bonus, refactored the xml failure code for less copy pasting and to
have a single place where we had to add the prefix.
2020-02-17 12:27:22 -05:00
Manuel de la Pena 5475256f51
[XHarness] Close left open html tags. (#7915) 2020-02-17 12:18:31 -05:00
Manuel de la Pena 00c3867ca9
[Xhanress] If we fail to install the application, report it as an test failure. (#7902)
VSTS does not provide a good way to report an app installation issue,
but we can fake a failure in the test when the installation does not
happen.

In the case of the installation failure a xml test result is generated
that will expose all the required information and will attach all the
needed logs (install logs). An example of the generated result can be
seen here: https://gist.github.com/mandel-macaque/2274bcd8785eebd636b98142e228afa9
2020-02-14 17:28:00 -05:00
Manuel de la Pena d2eb074bb4
[XHarness] If there is a build error, report it as a test failure. (#7903)
If there is a build error generate a xml that will be imported by VSTS
and will be reported as a test failure.

Examnple of the error: https://gist.github.com/mandel-macaque/dab2a5a4f3d21a81c172a8c8450d2448
2020-02-14 17:27:35 -05:00
Manuel de la Pena 6fde517698
[Harness] If app does not launch or crash, create a test failure. (#7906)
Make sure that when we are running on VSTS we do get test failures when
the application cannot be launched or crashes.
2020-02-14 17:27:01 -05:00
Manuel de la Pena f41a64fd29
[Harness] Attach build logs to NUnit V3 xml results. (#7855)
Get the previous task ID and use it to build the log directory of the
builds, then add all the combined files as attachments.

Fixes: https://github.com/xamarin/xamarin-macios/issues/7854
2020-02-13 16:51:14 -05:00
monojenkins 86000d0c3b
[XHarness] Generate TestReorts for NUnit V3. (#7881)
Now that we have NUnit V3 xml results, do generate the test report for
those correctly.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-02-13 11:59:15 -05:00
Manuel de la Pena 2cfc456787
[Harness] Add code that will generate custom xml results with failures. (#7874)
There are two cases that are not currently considered in VSTS that we
need to report:

1. The application could not be built.
2. The application crashed.

In those cases we do not have xml to be imported by VSTS. What we are
going to do is create 'fake' test runs that will encapsulate a build
error or a crash to be imported by VSTS with the needed attachments.

This code just writes custom errors. The generated results are like the
following:

* [NUnit V2](ihttps://gist.github.com/mandel-macaque/7207f6acb5a90895adf84f40a05e0b21)
* [NUnit V3](https://gist.github.com/mandel-macaque/99898c0570cde2e54e38d8af5991f824)
* [xUnit](https://gist.github.com/mandel-macaque/4591cc06d3db0e46de6a0bf886804f13)
2020-02-12 22:06:24 -05:00
Manuel de la Pena 9303bb2dc5
[Xcode11.4][XHarness] Add logs to VSTS test runs. (#7844) (#7866)
As per the documentation of the VSTS test uploader (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=yaml#attachments-support)
the tests support the addition of attachments. We want to be able to
access the logs of the different tests runs, this is achieved the
following way:

1. Move TouchUnit to use NUnit V3 which allows to add attachments.
2. Once the tests are ran, add the attachments to the following nodes:
   1. The very first test-suite. This will allow to have the logs for
   succesul tests.
   2. Add logs to failing tests. Reduces the number of clicks to be done
   to access to the logs when a test case fails.
3. Modify the assembly name of the test-suit to match the name of the
application. This ensures two things.
   1. We have a consistent name for the file column in VSTS, that can be
   used to see recurrent failing tests.
   2. The name is more readable, since if not, it will contain the UUID
   of the device.

Logs are not added to succesful tests because it will have the following
problems:

* Larger data storage usage.
* Longer upload time. The addtion of the logs per tests (succesful or
failed) was tested and resulted in an upload time LONGER than 6 hours
for all TouchUnit, NUnit blc tests and xUnit bcl tests.

In order for this to be useful, the task in the pipeline SHOULD NOT
merge test runs. We should have a test run PER application so that we do
not mix the logs.

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-02-12 18:16:30 -05:00
Manuel de la Pena 35c010db63
[XHarness] USe static variables for common test names. (#7837) (#7853)
One of the reason why we lost the TestReport was because the xml added
from the new code did not use the same name for the log as the expected
one (https://github.com/xamarin/xamarin-macios/pull/7835/files#diff-03773861bcef485bf343300f31b60b0eR374).

If we are going to be using the description as a way to decide what is
going to be done with it, lets use static vars so that we do not have
logs added with the wrong name.
2020-02-12 07:36:43 -05:00
Manuel de la Pena 1a0b2bbcc0
[XHarness] Generate TestReorts for NUnit V3. (#7851)
Now that we have NUnit V3 xml results, do generate the test report for
those correctly.
2020-02-11 20:28:28 -05:00
monojenkins 0c89f403a4
[xcode11.4] [XHarness] Do write the TestReport when we have xUnit results. (#7849)
Add code to write the TestReport when we have xunit results. Also
refactored code for the NUnit format to not use LINQ, it will use less
memory and in the future we can move to async (not now since it might
raise other problems).

fixes: https://github.com/xamarin/xamarin-macios/issues/7826

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-02-11 18:43:39 -05:00
Manuel de la Pena be9a8b1e81
[XHarness] Add logs to VSTS test runs. (#7844)
As per the documentation of the VSTS test uploader (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-test-results?view=azure-devops&tabs=yaml#attachments-support)
the tests support the addition of attachments. We want to be able to
access the logs of the different tests runs, this is achieved the
following way:

1. Move TouchUnit to use NUnit V3 which allows to add attachments.
2. Once the tests are ran, add the attachments to the following nodes:
   1. The very first test-suite. This will allow to have the logs for
   succesul tests.
   2. Add logs to failing tests. Reduces the number of clicks to be done
   to access to the logs when a test case fails.
3. Modify the assembly name of the test-suit to match the name of the
application. This ensures two things.
   1. We have a consistent name for the file column in VSTS, that can be
   used to see recurrent failing tests.
   2. The name is more readable, since if not, it will contain the UUID
   of the device.

Logs are not added to succesful tests because it will have the following
problems:

* Larger data storage usage.
* Longer upload time. The addtion of the logs per tests (succesful or
failed) was tested and resulted in an upload time LONGER than 6 hours
for all TouchUnit, NUnit blc tests and xUnit bcl tests.

In order for this to be useful, the task in the pipeline SHOULD NOT
merge test runs. We should have a test run PER application so that we do
not mix the logs.


Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-02-11 14:03:16 -05:00
Manuel de la Pena bd171282cf
[XHarness] USe static variables for common test names. (#7837)
One of the reason why we lost the TestReport was because the xml added
from the new code did not use the same name for the log as the expected
one (https://github.com/xamarin/xamarin-macios/pull/7835/files#diff-03773861bcef485bf343300f31b60b0eR374).

If we are going to be using the description as a way to decide what is
going to be done with it, lets use static vars so that we do not have
logs added with the wrong name.
2020-02-11 06:42:21 -05:00
Manuel de la Pena 072c262b9b
[XHarness] Do write the TestReport when we have xUnit results. (#7835)
Add code to write the TestReport when we have xunit results. Also
refactored code for the NUnit format to not use LINQ, it will use less
memory and in the future we can move to async (not now since it might
raise other problems).

fixes: https://github.com/xamarin/xamarin-macios/issues/7826
2020-02-10 21:44:33 -05:00
Sebastien Pouliot 7cbf90c5c6
[tests] Add cecil-based unit tests (#7825)
Only one to start... it's been discussed before but we generally
found other ways to do them. Let's continue to pick the best place
but we now have more options :)
2020-02-10 17:23:12 -05:00
Manuel de la Pena 359bbbb50b [XHarness] Refactor xml code to make the AppRunner class cleaner. (#7794)
There is a lot of logic related to xml in the AppRunner making it more
complicated than needed. Move the methods to a hlper class.
2020-02-10 10:58:50 -05:00
Manuel de la Pena 101c944bfc [Xharness] Fix all xml parsing issues and ensure that the xml can be consumed by VSTS. (#7768)
We ping the tcp listener to know that we have a tcp connection, that is
written in the xml logs, which means that parsing will not work. Ignore
the ping, parse xml, and make sure that the xml that will be consume by
vsts is valid.

This PR also fixes https://github.com/xamarin/maccore/issues/827 which does not longer happen.
2020-02-10 10:58:36 -05:00
Manuel de la Pena 9e45badf78 [Xharness] Add workaround when we could not share the internet in bots. (#7755)
Looks like we have issues with the internet sharing in the VSTS bots,
this means that now that we always try to parse the XML on CI, we get an
exception, catch it and do not show the results.

The workaround simply tries to read the xml, if possible, we will parse
it, else deal with the text only log. The fix will show the results, but
it is a workaround for a configuration issue in the CI.
2020-02-10 10:58:25 -05:00
Manuel de la Pena abf9dfc997 [Harness] Unify the CI properties. (#7750)
Unify the harness properties to just look at InCI and remove all the
other ones. There is no real need to have differences between jenkins
and VSTS and Wrench is gone.
2020-02-10 10:58:13 -05:00
Manuel de la Pena 2fb329bc96 [XHarness] If in CI, no matter which, use the Xml output. (#7745)
We used to test only on Jenkins, and if the build version had jenkins on
it, rather than doing so, just check if we are in the CI by looking if
BUILD_REVISION is present in the env.
2020-02-10 10:58:00 -05:00
monojenkins 6f712aeaef
[Harness] Just try to generate the report when is NUnit. (#7828)
Use the xml parsing helper methods to decide if the xml can be parsed
and if we will be able to generate the report. That way we avoid an
exception that makes the CI noise.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
2020-02-10 10:40:59 -05:00
Manuel de la Pena 829af5eec3 [Harness] Just try to generate the report when is NUnit.
Use the xml parsing helper methods to decide if the xml can be parsed
and if we will be able to generate the report. That way we avoid an
exception that makes the CI noise.
2020-02-08 02:19:40 +00:00
Manuel de la Pena c169895499 [Harness] Just try to generate the report when is NUnit.
Use the xml parsing helper methods to decide if the xml can be parsed
and if we will be able to generate the report. That way we avoid an
exception that makes the CI noise.
2020-02-07 17:00:26 -05:00
Manuel de la Pena 1f80ebe15e [XHarness] Refactor xml code to make the AppRunner class cleaner. (#7794)
There is a lot of logic related to xml in the AppRunner making it more
complicated than needed. Move the methods to a hlper class.
2020-02-06 08:54:26 -05:00
Manuel de la Pena 8acfe3859e [Xharness] Fix all xml parsing issues and ensure that the xml can be consumed by VSTS. (#7768)
We ping the tcp listener to know that we have a tcp connection, that is
written in the xml logs, which means that parsing will not work. Ignore
the ping, parse xml, and make sure that the xml that will be consume by
vsts is valid.

This PR also fixes https://github.com/xamarin/maccore/issues/827 which does not longer happen.
2020-02-06 08:54:00 -05:00
Manuel de la Pena d9bbdcf065 [Xharness] Add workaround when we could not share the internet in bots. (#7755)
Looks like we have issues with the internet sharing in the VSTS bots,
this means that now that we always try to parse the XML on CI, we get an
exception, catch it and do not show the results.

The workaround simply tries to read the xml, if possible, we will parse
it, else deal with the text only log. The fix will show the results, but
it is a workaround for a configuration issue in the CI.
2020-02-06 08:53:34 -05:00
Manuel de la Pena fc0dd8812b [Harness] Unify the CI properties. (#7750)
Unify the harness properties to just look at InCI and remove all the
other ones. There is no real need to have differences between jenkins
and VSTS and Wrench is gone.
2020-02-06 08:53:13 -05:00
Manuel de la Pena 2aad661b4c [XHarness] If in CI, no matter which, use the Xml output. (#7745)
We used to test only on Jenkins, and if the build version had jenkins on
it, rather than doing so, just check if we are in the CI by looking if
BUILD_REVISION is present in the env.
2020-02-06 08:52:57 -05:00
Manuel de la Pena fe2b014d6a
[XHarness] Refactor xml code to make the AppRunner class cleaner. (#7794)
There is a lot of logic related to xml in the AppRunner making it more
complicated than needed. Move the methods to a hlper class.
2020-02-05 21:23:44 -05:00
Manuel de la Pena 0144c3b94f
[Xharness] Fix all xml parsing issues and ensure that the xml can be consumed by VSTS. (#7768)
We ping the tcp listener to know that we have a tcp connection, that is
written in the xml logs, which means that parsing will not work. Ignore
the ping, parse xml, and make sure that the xml that will be consume by
vsts is valid.

This PR also fixes https://github.com/xamarin/maccore/issues/827 which does not longer happen.
2020-02-04 11:03:38 -05:00
Rolf Bjarne Kvinge 65b872e7e9
[xharness] Improve TCC database editing. (#7773)
* Acquire permission for the microphone (the microphone permission dialog is
  not a blocking dialog, which is why things have worked so far).

* Set the last_modified field in the TCC database to now instead of 1970.
  Apparently some permissions time out (kTCCServiceMediaLibrary), which means
  that the last_modified field is important to get right.
2020-01-30 17:54:07 +01:00
Rolf Bjarne Kvinge 47ebd0d947
[xharness] Fix simctl arguments. (#7772)
* [xharness] Fix simctl arguments.

* Fix another case.
2020-01-30 12:07:02 +01:00
Manuel de la Pena 7130b16d98
[Xharness] Add workaround when we could not share the internet in bots. (#7755)
Looks like we have issues with the internet sharing in the VSTS bots,
this means that now that we always try to parse the XML on CI, we get an
exception, catch it and do not show the results.

The workaround simply tries to read the xml, if possible, we will parse
it, else deal with the text only log. The fix will show the results, but
it is a workaround for a configuration issue in the CI.
2020-01-28 14:44:34 -05:00
Manuel de la Pena afaaf10d77
[Harness] Unify the CI properties. (#7750)
Unify the harness properties to just look at InCI and remove all the
other ones. There is no real need to have differences between jenkins
and VSTS and Wrench is gone.
2020-01-24 07:47:44 -05:00
Manuel de la Pena 088dd2a9b2
[XHarness] If in CI, no matter which, use the Xml output. (#7745)
We used to test only on Jenkins, and if the build version had jenkins on
it, rather than doing so, just check if we are in the CI by looking if
BUILD_REVISION is present in the env.
2020-01-23 18:28:12 -05:00
Rolf Bjarne Kvinge 54b07b2f2d
[msbuild] Build the MSBuild task assemblies for netstandard2.0. (#7706)
* Bump Xamarin.MacDev.

New commits in xamarin/Xamarin.MacDev:

* xamarin/Xamarin.MacDev@210c664 Adds net451 to Xamarin.MacDev.csproj
* xamarin/Xamarin.MacDev@64db365 [winios] Changes provisioning profiles default path
* xamarin/Xamarin.MacDev@d34430a Switch to short-form projects and build for both net461 and netstandard2.0. (#68)

Diff: 0f578f51e6..210c664e56

* [msbuild] Update to latest Mono.Cecil.

The older version doesn't support netstandard2.0.

No code changes were required.

* [msbuild] Remove unused usings.

* [msbuild] Make ILMerge work when building for netstandard2.0.

Also unify/deduplicate the ILMerge logic between Xamarin.iOS and Xamarin.Mac.

* [msbuild] Build for netstandard2.0 in addition to net461.

* [msbuild] Use custom project configurations to support running the tests for both netstandard2.0 and net461.

Use custom project configurations to support running the tests for when the
tasks assembly is built for netstandard2.0 and net461.

* [tests] Make command-line based 'make test-ios-tasks' run tests for both netstandard2.0 and net461.

* [xharness] Add test configuration to run iOS MSBuild tests using either netstandard2.0 or net461.

* [msbuild] Make the netstandard2.0-buils task assemblies the default.

* [msbuild] ILRepack lib assemblies, not ref assemblies.

Ask MSBuild to copy lib assemblies to the output folder when building for
netstandard2.0, this way we can easily find the actual implementation
libraries to pass to ILRepack.

* [msbuild] Merge System.Text.Encodings.Web.dll as well.

* [xharness] Fix build of MSBuild tests for iOS.
2020-01-16 18:22:48 +01:00
Rolf Bjarne Kvinge 34c0a9e106
[xharness] Fix two compiler warnings. (#7703)
* [xharness] Fix two compiler warnings.

Fixes these warnings:

    Jenkins.cs(538,37): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
    Jenkins.cs(877,14): warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.

* [xharness] Simplify async code a bit.
2020-01-14 08:17:58 +01:00
Rolf Bjarne Kvinge c4e15ed6b6
[msbuild] Convert project files to sdk-style project files. (#7698)
* [msbuild] Convert to short-form csproj.

* [msbuild] Make asserts more useful.

* [msbuild] Make tests ignore the actual location of the test assembly.

* [msbuild] Short-style projects default to deterministic builds, which is not compatible with wildcard versions.

* [msbuild] Adjust test.

* Update .gitignore.

* Bump NUnit.ConsoleRunner version.

* [msbuild] Fix indentation.

* [msbuild] Simplify csproj.
2020-01-14 08:16:02 +01:00
Pramit Mallick cd9a151c98 [xharness] Run duration (#7661)
Update the label used in xharness to be more clear about the run duration.
2020-01-07 13:38:27 -05:00
monojenkins 2139efecb5 [xharness] Only run 'dont link' on release configuration (#7672)
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.

Co-authored-by: Sebastien Pouliot <sebastien.pouliot@gmail.com>
2020-01-06 16:53:01 -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
monojenkins 49d853a23d [d16-5] [Test] Bump mono and use the new splited tests. (#7648)
Bump mono to get the new splited test dlls and add them to be ran in
xharness. Special logic is used for mscorlib so we make sure that all
the 'parts' of the test dll do have the same configurations.

Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
Co-authored-by: Waleed Chaudhry <54864665+wachaudh@users.noreply.github.com>
2019-12-23 23:57:19 -05:00
Manuel de la Pena 4c6181e904
[Test] Bump mono and use the new splited tests. (#7626)
Bump mono to get the new splited test dlls and add them to be ran in
xharness. Special logic is used for mscorlib so we make sure that all
the 'parts' of the test dll do have the same configurations.


Co-Authored-By: Waleed Chaudhry <54864665+wachaudh@users.noreply.github.com>
2019-12-23 18:39:41 -05:00
monojenkins 441912e20d [xharness] Fix 32 bit device tests selection (#7639)
**Problem**

32 bit tests could only be executed with 64 bit tests. E.g: `run-ios-32-tests` didn't work on its own, only `run-ios-tests,run-ios-32-tests` worked

**Solution**

- Change the logic so that 32 bit tests are only looking for `IncludeiOS32` and 64 bit tests only `IncludeiOS64`
- To keep `run-ios-tests` and `skip-ios-tests` working, hack `SetEnabled` so `IncludeiOS` also sets `IncludeiOS32` and `IncludeiOS64`.
  Otherwise the way the code is currently organised we'd have to use `skip-ios-32-tests` and `skip-ios-64-tests`.

Co-authored-by: Vincent Dondain <vidondai@microsoft.com>
2019-12-23 13:07:43 -05:00
Alex Soto 3d927e0466
[xharness] Fix ExecuteCommandAsync args parameter 2019-12-18 12:22:00 -05:00
Alex Soto d527862915
[xharness] Fix ExecuteCommandAsync args parameter 2019-12-18 12:19:22 -05:00
Alex Soto f1f867af03
Merge branch 'd16-5' into d16-5-xcode11.3 2019-12-18 12:01:21 -05:00
monojenkins 8e363024b7 [d16-5] [Tests] Split groups so that they work on iOS 32b. (#7616)
After this commit we will have more application but they will be the
appropiate size so that they can be built with the linker for iOS 32b.
It is important to note that the following apps WILL CONTINUE to fail
since the dlls need to be splitted in mono:

* mscorlib tests
* Mono BCL tests group 5 - Which is monotouch_System.Core_xunit-test.dll
and is too large.
2019-12-18 11:16:49 -05:00