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

1118 Коммитов

Автор SHA1 Сообщение Дата
Manuel de la Pena e24b1f735b [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-08-05 18:52:08 -04:00
Manuel de la Pena 2e33c03b55 [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-08-05 18:51:54 -04:00
Manuel de la Pena 62c277704a [Harness] Donet doest not need to restore. (#8383)
Removed line due to a bad merge, re-add it.
2020-08-05 18:51:38 -04:00
Manuel de la Pena c56b3f68ae [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-08-05 18:51:26 -04:00
Manuel de la Pena 711afda56e [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-08-05 18:51:14 -04:00
Manuel de la Pena 2a84bb37d1 [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-08-05 18:49:25 -04:00
Manuel de la Pena 7c739e7ff1 [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-08-05 18:39:35 -04:00
Manuel de la Pena 7c2650a87f [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-08-05 18:25:45 -04:00
Manuel de la Pena 55665e8e4d [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-08-05 18:25:24 -04:00
Rolf Bjarne Kvinge 85b50a0347 Merge remote-tracking branch 'origin/main' into HEAD 2020-08-04 10:39:46 +02:00
Rolf Bjarne Kvinge 691e8eac7a
[xharness] Improve parsing of NUnitV2 xml reports to fix an issue with failures in parameterized tests. (#9259)
We weren't properly reporting all failures when there were multiple failures
in parameterized tests, because we'd incorrectly skip too many xml nodes when
we were looking for the next test failure.
2020-08-03 18:51:30 +02:00
Rolf Bjarne Kvinge 7e9a60d690
[xharness] Fix main log parsing by not requiring it to come from a file. (#9258)
Not all types of logs have files, but all types of logs have a reader (or will
have soon due to PR #9257).
2020-08-03 18:51:09 +02:00
Rolf Bjarne Kvinge f7cd7d3cad
[xharness] Implement Log.GetReader for all loggers. (#9257)
This makes it easier to write code that parses logs, since that code won't
have to worry about if a particular log supports GetReader or not.
2020-08-03 18:51:01 +02:00
Rolf Bjarne Kvinge cad850fae7 [tests] Restore projects before building them from the command line. 2020-08-03 11:53:18 +02:00
Rolf Bjarne Kvinge 62719b6f7b [xharness] Use LogFile instead of ResultFile in macOS BCL tests to match the Touch.Client usage. 2020-08-03 11:53:18 +02:00
Rolf Bjarne Kvinge 09edb8558d [xharness] Add support for finding/setting the main Xamarin import among multiple imports.
This is required for the previous commit, where we added an additional import to
a few project files to pass an xml definition to mtouch/mmp.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 96615bbd67 [tests] The upstream NUnitLine isn't linker safe, so add an xml file to make sure linking doesn't remove too much.
In particular NUnit uses reflection to get a private method, and the linker removes
the corresponding private method:

1c680b4dc8/src/NUnitFramework/framework/Internal/TestExecutionContext.cs (L552)

So add an xml definition to keep this private method, and modify project files to
pass the xml definition to mtouch and mmp.

Some care needs to be taken to make sure xharness is still able to clone these project
files.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 1cc265838a [xharness] Add the Touch.Client projects to our solutions instead of MonoTouch.NUnitLite. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge e4aaf6a8d6 [xharness] Change how we run macOS unit tests to work with Touch.Client.
This is very similar to how we run iOS unit tests.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge fcb8446eb5 [tests] Remove dead code related to GuiUnit and the GuiUnit submodule. 2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 349a6b6d5a [xharness] Add support for generating/duplicating projects with a Touch.Client reference.
This also means removing support for generating/duplicating MonoTouch.NUnit references,
since we're not using those anymore.
2020-08-03 11:53:17 +02:00
Rolf Bjarne Kvinge 77771f7893
[xharness] Don't try to parse a build log that doesn't exist. (#9253) 2020-07-31 19:32:33 +02:00
Rolf Bjarne Kvinge 1e6e17cb2d
[xharness] Resolve relative project references using the referencing project's directory. (#9252)
Otherwise it would end up being resolved from the current directory, which is
not dependable.
2020-07-31 16:50:34 +02:00
Rolf Bjarne Kvinge cc06a93976
[xharness] Mark the .NET tests project as a .NET project so that we don't try to call nuget restore on it. (#9251)
* [xharness] Mark the .NET tests project as a .NET project so that we don't try to call nuget restore on it.

* [xharness] Mark the .NET generator project as a .NET project as well.
2020-07-31 16:50:10 +02:00
Rolf Bjarne Kvinge e3cb32c23b
[tests] Switch msbuild-mac to use package references. (#9245)
And don't specify the solution path anymore, because we can restore using just
the csproj just fine now.
2020-07-31 11:20:09 +02:00
Rolf Bjarne Kvinge 43102c09bf
[tests] Migrate the sample tests to use package references. (#9244) 2020-07-31 11:19:57 +02:00
Rolf Bjarne Kvinge 631073dafe
[xharness] Improve restoring NuGets for Xamarin.Mac projects in the makefile by depending on the csproj files in addition to the packages.conf files. (#9242)
Packages are listed in the csproj when we're using package references.

Also only list files in git, otherwise we pick up all the generated project files as well.
2020-07-30 17:00:41 +02:00
Rolf Bjarne Kvinge d304198536
[xharness] Make restoring nugets the default for all test projects. (#9237)
But don't do it for .NET projects, since 'dotnet build' automatically restores.
2020-07-30 16:19:53 +02:00
Rolf Bjarne Kvinge 815de988d3 [xharness] If we're not generating projects in the Target class, the project path equals the template path. 2020-07-27 11:31:19 +02:00
Rolf Bjarne Kvinge b5a1251592 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-27 11:20:16 +02:00
Rolf Bjarne Kvinge e0986916e5
[xharness] Fix how .NET projects are ignored. (#9168)
* [xharness] Fix how .NET projects are ignored.

Now they're actually ignored if .NET tests are not included.

* Fix compile error.
2020-07-24 14:56:08 +02:00
Sebastien Pouliot 142ff3127b
[xcode12] Bump for beta 3 (#9162)
* Disable iOS 32bits simulator based tests
2020-07-24 08:52:33 -04:00
Rolf Bjarne Kvinge 96034db9d1 [xharness] Fix finding Info.plist, and add some tests too. 2020-07-24 09:13:33 +02:00
Rolf Bjarne Kvinge 4a2236f7e0 Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-23 15:37:06 +02:00
Rolf Bjarne Kvinge 1eb0c2cd3b [tests] Info.plists should be inside LogicalName, not Link.
This makes it possible to simplify a bit more code inside xharness as well.
2020-07-23 15:34:58 +02:00
Rolf Bjarne Kvinge 568dc5d32a
[xharness] Backport Touch.Unit fix for command line parsing. (#9165)
Apply https://github.com/spouliot/Touch.Unit/pull/78 to the duplicated file.
2020-07-23 15:32:54 +02:00
Rolf Bjarne Kvinge 14d95df81a
[xharness] Generate makefile targets for non-executable projects. (#9158)
It turns out some Xamarin.Mac projects are library projects (for unit tests),
and we still need to generate makefile targets for those (because we use them
to build Xamarin.Mac tests to run on older macOS bots).
2020-07-23 08:31:45 +02:00
Rolf Bjarne Kvinge 7fab4abf96
[xharness] Allow for null environment variables to mlaunch. (#9140)
It's a valid scenario to set a null environment variable.

This happens when changing InCI to always return true (to test locally what's
done on the bots), in which case we try to forward BUILD_REVISION to mlaunch,
but BUILD_REVISION isn't necessarily set. Not forwarding it to mlaunch should
not cause problems in most tests, so just allow this scenario.
2020-07-22 18:13:17 +02:00
Rolf Bjarne Kvinge bdada6e21b Merge remote-tracking branch 'origin/main' into xharness-a-directory-per-project 2020-07-22 10:36:23 +02:00
Rolf Bjarne Kvinge 554845905a [xharness] Remove a redundant ToArray. 2020-07-22 10:35:36 +02:00
Rolf Bjarne Kvinge e47a995797 [tests] Set the correct mono-native link mode and flavor defines in the csproj itself.
This makes it possible to simplify a lot of C# code.
2020-07-22 10:33:03 +02:00
Rolf Bjarne Kvinge 9cfe57bffa
[xharness] Fix logic to not create makefile targets to run BCL tests. (#9148)
According to the existing code, we're already not supposed to create makefile
targets for BCL tests. However, the code to detect BCL tests wasn't quite
reliable, so we ended up creating makefile targets for some BCL tests.

So always use the same logic to detect BCL tests.

Also remove a lot of dead code to generate makefile code for BCL tests.
2020-07-22 08:28:38 +02:00
Rolf Bjarne Kvinge 35c44e82fc
[xharness] Fix compiler warning. (#9147) 2020-07-22 08:28:08 +02:00
Rolf Bjarne Kvinge cff47214ec [tests] Move bindings-test[-mac].csproj to their own directory. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 6d26599997 [xharness] Simplify the MonoNativeInfo class a bit by removing the custom Mac-specific subclass (there's almost no difference anymore). 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 5fa43d073e [tests] Put the iOS and macOS mono-native templates in their own directory.
This makes it possible to remove a few conditions in the code.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge f2d9764123 [xharness] Make the BCL project generation generate each project file into its own subdirectory. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 52c56933dc [xharness] Make the templates path an input parameter for the BCL templates. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge ca0885b33e [xharness] Add a TestPlatform value to TestProject, and use it to indicate that a TestProject might be of a specific platform already. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge 6a59d2b87b [xharness] Don't generate variations for BCL projects using the normal procedure, we generate them differently already.
This makes it possible to remove some dead code.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge e3fdcf59ca [xharness] Add support for specifying whether variations should be generated for Xamarin.iOS projects. 2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge a510af6078 [xharness] Make ProjectFileExtensions.GetInfoPListInclude a bit clearer.
Add a comment to document what's supposed to happen, and simplify the code a little bit.
2020-07-21 17:24:15 +02:00
Rolf Bjarne Kvinge cbe780d734 [xharness] Store attribute in local variable instead of fetching it twice. 2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 1c52a14566 [xharness] Remove a lot of special-casing for the mono-native tests.
It's not needed anymore.
2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 8e6e17ea89 [xharness] Generate projects into a subdirectory for each project.
Because it's cumbersome to keep the build working when the same directory has
multiple project files.
2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge ba61b68f11 [xharness] Document the test loading process a little bit. 2020-07-21 17:24:14 +02:00
Rolf Bjarne Kvinge 4a10ba51db
[xharness] Generate BCL projects asynchronously. (#9083)
Split the BCL project generation in two: one part that figures out which
projects to generate, and which is done synchronously (because we need it to
compute the list of tests), then split out the actual generation and run it on
a background thread (since that doesn't have to happen until we want to
execute those tests).

This speeds up launching xharness in server mode significantly (from ~2s to
~0.2s).
2020-07-21 17:14:36 +02:00
Rolf Bjarne Kvinge f9fbf56544
[xharness] Disable default inclusion behavior for the introspection .NET tests. (#9137)
It gets too annoying to keep track of which files are where with the project
cloning we're doing, if files are implicitly included.
2020-07-21 14:48:52 +02:00
Rolf Bjarne Kvinge 7d47d8742d
[xharness] Don't generate into the same directory/files for macOS Modern and macOS Full. (#9121)
* [xharness] Don't generate into the same directory/files for macOS Modern and macOS Full.

This meant that we were overwriting some generated files, which meant that we
were executing the Modern set of tests instead of the Full set of tests for at
least some configurations.

* Add a few ignored tests to the System.Configuration test now that we actually run it.
2020-07-21 13:15:14 +02:00
Rolf Bjarne Kvinge 858e44aa4d
[xharness] Only try to parse the build log if we have a build log. (#9130) 2020-07-20 14:32:52 +02:00
Rolf Bjarne Kvinge 121032e8f9
[xharness] Fix BCL project generation for watchOS projects. (#9131)
Reading from a file named as the actual content of the watchOS template doesn't
_quite_ work. Instead just use the content directly.
2020-07-20 14:32:42 +02:00
Rolf Bjarne Kvinge ba7e73b5dd
[xharness] Don't replace existing files, instead add new files, when providing human-readable logs. (#9123)
This makes understanding what's going on much easier.
2020-07-20 10:27:07 +02:00
Rolf Bjarne Kvinge 64bc5ea6eb
[xharness] Don't try to write cleaned xml into the same file as the dirty xml was. (#9122) 2020-07-20 10:20:33 +02:00
Rolf Bjarne Kvinge 4f78e8c51b
[xharness] Improve process killing a bit. (#9120)
* Log what we're doing.
* Wait a bit after sending SIGABRT, to allow for the OS to create any crash
  reports.
2020-07-17 18:24:58 +02:00
Rolf Bjarne Kvinge a4d19dad29
[xharness] Try harder to make lldb quit after trying to get a backtrace. (#9119)
When a process times out, we try to print a stack trace for all threads. This
involves executing "lldb --source <script>", where the script contains:

	process attach --pid 1234
	thread list
	thread backtrace all
	detach
	quit

Basically we attach to the project, and ask lldb to print stack traces.

The problem:

    16:09:02.9522580 Printing backtrace for pid=25276
    16:09:02.9528060 /usr/bin/lldb --source /var/folders/q7/mkzwrzcn7bzf3g2v38f3c1cw0000gn/T/tmp58e75d85.tmp
    16:09:04.6127570 (lldb) command source -s 0 '/var/folders/q7/mkzwrzcn7bzf3g2v38f3c1cw0000gn/T/tmp58e75d85.tmp'
    16:09:04.6130020 Executing commands in '/var/folders/q7/mkzwrzcn7bzf3g2v38f3c1cw0000gn/T/tmp58e75d85.tmp'.
    16:09:04.6130200 (lldb) process attach --pid 25276
    16:09:05.6458750 error: attach failed: Error 1
    16:09:05.7529100 25276 Execution timed out after 1200 seconds and the process was killed.
    16:09:05.7588770 Execution timed out after 1200 seconds.

If any of those commands fail, the subsequent commands aren't executed. This
includes the final "quit" command, which means we end up waiting forever for
lldb to do its thing, when lldb doesn't think it needs to do anything at all.

The fix: pass two different scripts. It turns out subsequent scripts are
executed even if previous scripts fail, so we do the equivalent of:

     lldb --source <attach script> --source <quit script>

And now lldb will quit no matter what the attach script does (it still works
even if the attach script succeeds, in which case we'll ask lldb to quit
twice).
2020-07-17 17:34:03 +02:00
Rolf Bjarne Kvinge 3cd9bafbcc
[xharness] Improve code to not throw exceptions in the first place instead of catching and ignoring. (#9118) 2020-07-17 17:33:13 +02:00
Rolf Bjarne Kvinge c394c12c54
[xharness] De-asyncify template expansion. (#9104)
This avoids:

* Getting the resource stream for every template expansion
* Reading the resource stream
* A lot of async code.

Instead just read the resource stream once, into a string, and return that.

This speeds up the startup by ~10% (from ~0.96s to ~0.83s on my machine).
2020-07-17 11:09:09 +02:00
Rolf Bjarne Kvinge 92821b5dec
[xharness] Parse NUnit v2 xml reports correctly. (#9110) 2020-07-17 08:50:00 +02:00
Rolf Bjarne Kvinge 7509c6bfcd
[xharness] Fix finding testable types in test assemblies. Fixes #xamarin/maccore@2267. (#9103)
Apparently a null namespace when using Reflection can be an empty namespace in Cecil.

Fixes https://github.com/xamarin/maccore/issues/2267.
2020-07-16 17:16:25 +02:00
Rolf Bjarne Kvinge 4b0fd5529c
[xharness] Don't group simulators when running in server mode. (#9098)
Grouping simulators means we have to wait until we know which simulators are
available, because we group by the simulator's UDID.

When running in server mode, we don't need to group simulator test runs,
because we run the as the user chooses, not in any particular order.

This way the test list loads faster at startup, since we don't have to wait
until we've loaded the simulators before we can show the list.
2020-07-16 08:20:51 +02:00
Rolf Bjarne Kvinge 7beb88089a
[xharness] Use Cecil to inspect assemblies, instead of Reflection. (#9082)
This is slightly faster - ~0.95s vs ~1.4s - (probably because reflection tries
to load a lot of other referenced assemblies, which may or may not exist,
causing exceptions (if they don't exist) or spend time loading them (which
Cecil won't)).

It also avoids a lot of exception details showing up when tracing xharness
execution.
2020-07-15 09:01:31 +02:00
Rolf Bjarne Kvinge 64c63279b3
[xharness] Add support for generating a tvOS version of .NET iOS projects. (#9032)
* [xharness] Add support for generating a tvOS version of .NET iOS projects.

And use it to run the tvOS version of introspection for .NET.

* [xharness] Change according to reviews.
2020-07-13 17:12:11 +02:00
Manuel de la Pena 10b3ddba31
[xharness] Make ConsoleLog thread-safe. Fixes #8569. (#8864) (#9038)
Fixes https://github.com/xamarin/xamarin-macios/issues/8569.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-07-08 15:42:33 -04:00
Rolf Bjarne Kvinge 2e11f0bf4e [xharness] Don't generate makefile targets for .NET projects.
They end up with the same make targets as non-.NET targets, which prints
warnings in the terminal when running make.

We're not using the makefile targets much anymore, so postpone implementing
them for .NET until we need them for some reason.
2020-07-03 11:31:45 +02:00
Rolf Bjarne Kvinge 6f6b8e281b Merge remote-tracking branch 'origin/main' into dotnet-xharness-introspection 2020-07-03 11:12:50 +02:00
Rolf Bjarne Kvinge e4523d8f9d
[xharness] Try to not have log directories with spaces in them. (#8976)
The simulators won't write stdout/stderr to a path with a space.
2020-07-01 08:28:30 +02:00
Rolf Bjarne Kvinge 650e6e134e [xharness] Skip the old simulator variation for introspection/dotnet for now. 2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge 76f456cc0f [xharness] Retrieve a .NET project's OutputPath by running MSBuild.
.NET projects are vastly simplified, which means that the OutputPath can't be
determined by reading the project file itself, it has to be calculated by
MSBuild.

So that's exactly what we do: we run MSBuild on the project file and get it to
print the property we're interested in.
2020-06-30 19:01:07 +02:00
Rolf Bjarne Kvinge 73881846e2 [xharness] Add a GetDotNetExecutable callback and an MSBuildPath property to [I]ProcessManager. 2020-06-30 19:01:06 +02:00
Rolf Bjarne Kvinge 5d257bfb8f [xharness] Improve project cloning to take into account default inclusion behavior for .NET projects.
.NET projects will include files from the current directory by default, which
means that if we clone the project file and write the cloned project file in a
different directory, we'll have to add an automatically included files into
the cloned file manually.
2020-06-30 19:01:06 +02:00
Rolf Bjarne Kvinge 1b703c5fdd [xharness] Create DotNetBuildTasks when we need to build .NET projects. 2020-06-30 19:01:06 +02:00
Rolf Bjarne Kvinge 55cc695697 [xharness] Disable project generation for .NET projects for now. 2020-06-30 19:01:06 +02:00
Rolf Bjarne Kvinge c42803cfde [xharness] Clearly label .NET projects as such. 2020-06-30 19:00:40 +02:00
Rolf Bjarne Kvinge 989cda8b2d [xharness] Add the dotnet introspection project file to our list of projects, and mark it as a .NET project. 2020-06-30 19:00:40 +02:00
Rolf Bjarne Kvinge 55a9697b66 [xharness] Add support for skipping more test variations. 2020-06-30 18:58:42 +02:00
Rolf Bjarne Kvinge b465739d23
[xharness] Disable diagnostics when killing Xcode processes. (#8961)
We won't get any useful information anyway, because we won't get stack traces.
2020-06-29 10:10:20 +02:00
Sebastien Pouliot f427b5e91d
[xcode12] Bump for beta 1 (#8935)
Known issues https://github.com/xamarin/xamarin-macios/issues/8943
2020-06-26 14:02:44 -04:00
monojenkins ad92cdb6a2
[xharness] Add crash reports to a logs collection we care about. (#8960)
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.

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-06-26 14:18:47 +02:00
Rolf Bjarne Kvinge 56a896d371
[xharness] Don't access the simulator tasks if we failed to created them. (#8950)
This fixes this:

    Unexpected exception: System.AggregateException: One or more errors occurred. (One or more errors occurred. (ApplicationName='[...]/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch', CommandLine='--listsim=/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/tmp12c3d415.tmp --output-format=XML', CurrentDirectory='', Native error= Cannot find the specified file)) ---> System.AggregateException: One or more errors occurred. (ApplicationName='[...]/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch', CommandLine='--listsim=/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/tmp12c3d415.tmp --output-format=XML', CurrentDirectory='', Native error= Cannot find the specified file) ---> System.ComponentModel.Win32Exception: ApplicationName='[...]/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/mlaunch', CommandLine='--listsim=/var/folders/43/h027tm1n101cdrq2_b6n9n2m0000gn/T/tmp12c3d415.tmp --output-format=XML', CurrentDirectory='', Native error= Cannot find the specified file
      at System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) [0x0029f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/System/System.Diagnostics/Process.cs:778
      at System.Diagnostics.Process.Start () [0x0003a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs:2006
      at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start()
      at Microsoft.DotNet.XHarness.iOS.Shared.Execution.ProcessManager.RunAsyncInternal (System.Diagnostics.Process process, Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog log, Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog stdout, Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog stderr, System.Nullable`1[T] timeout, System.Collections.Generic.Dictionary`2[TKey,TValue] environmentVariables, System.Nullable`1[T] cancellationToken, System.Nullable`1[T] diagnostics) [0x00469] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Execution/ProcessManager.cs:185
      at Microsoft.DotNet.XHarness.iOS.Shared.Hardware.SimulatorLoader+<>c__DisplayClass16_0.<LoadDevices>b__0 () [0x00107] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorLoader.cs:65
      at Microsoft.DotNet.XHarness.iOS.Shared.Hardware.SimulatorLoader.LoadDevices (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog log, System.Boolean includeLocked, System.Boolean forceRefresh, System.Boolean listExtraData) [0x00155] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorLoader.cs:54
      at Microsoft.DotNet.XHarness.iOS.Shared.Hardware.SimulatorLoader.FindOrCreateDevicesAsync (Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog log, System.String runtime, System.String devicetype, System.Boolean force) [0x0023c] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorLoader.cs:156
      at Microsoft.DotNet.XHarness.iOS.Shared.Hardware.SimulatorLoader.FindSimulators (Microsoft.DotNet.XHarness.iOS.Shared.TestTarget target, Microsoft.DotNet.XHarness.iOS.Shared.Logging.ILog log, System.Boolean create_if_needed, System.Boolean min_version) [0x00267] in [...]/xamarin-macios/tests/xharness/Microsoft.DotNet.XHarness.iOS.Shared/Hardware/SimulatorLoader.cs:277
      at Xharness.Jenkins.TestTasks.RunSimulatorTask.FindSimulatorAsync () [0x0005a] in [...]/xamarin-macios/tests/xharness/Jenkins/TestTasks/RunSimulatorTask.cs:53
      at Xharness.Jenkins.Jenkins.CreateRunSimulatorTasksAsync () [0x004ee] in [...]/xamarin-macios/tests/xharness/Jenkins/Jenkins.cs:558
       --- End of inner exception stack trace ---
      at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2027
      at System.Threading.Tasks.Task`1[TResult].GetResultCore (System.Boolean waitCompletionNotification) [0x0002b] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:496
      at System.Threading.Tasks.Task`1[TResult].get_Result () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs:466
      at Xharness.Jenkins.Jenkins+<>c__DisplayClass72_0.<PopulateTasksAsync>b__0 (System.Threading.Tasks.Task`1[TResult] v) [0x0001e] in [...]/xamarin-macios/tests/xharness/Jenkins/Jenkins.cs:941
      at System.Threading.Tasks.ContinuationTaskFromResultTask`1[TAntecedentResult].InnerInvoke () [0x00024] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/TaskContinuation.cs:155
      at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
    --- End of stack trace from previous location where exception was thrown ---
2020-06-26 10:27:10 +02:00
Rolf Bjarne Kvinge 79fccc3065
[xharness] Automatically detect and use .NET 5 (#8909)
Automatically detect which .NET version to use based on the global.json reachable from the project directory.

Due to how things are designed, some parts of the code wants the dotnet
executable before the code in question knows the project directory, which
isn't possible anymore. So there's a minor change to pass around a lambda that
can calculate the path to the executable instead of the executable itself.
2020-06-25 08:46:03 +02:00
Manuel de la Pena 8c081605a0
[DevOps] Allow to use vsdrops AND xamarin storage. (#8916)
Use both in those labs that support xamarin-storage so that we have a
backup. To do so, move the parameter to be a bool but keep the rest of
the logic the same.


Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-06-24 18:01:51 -04:00
Rolf Bjarne Kvinge ea3aa68426
[xharness] Implement parsing the trx files that .NET produces. (#8919) 2020-06-23 08:54:28 +02:00
Rolf Bjarne Kvinge 36a1ec4fc1
[xharness] Set the working directory to the project directory when building projects. (#8910)
This is particularly important when we have global.json and NuGet.config in
the project directory, because those are looked up starting with the current
directory, so those two need to match.
2020-06-22 10:25:19 +02:00
Manuel de la Pena 34362be245
[Harness] Add an extra index that will use full uris. (#8889)
Vsdrops does not support serving a static html. Therefore we need to use
full uris that will be used to download the logs. To make things less
dangerous, we leave the xamarin-storage report as it was and create a
new one for vsdrops.

This means that:

1. xamarin-storage index.html is left as is.
2. vsdrops_index.html contains full uris to download (the env var will
   have to be set in the step) and js and css are in the header.
3. because we use and env var, jenkins won't generate the
   vsdrops_index.html only device pipelines will.

For this to take effect needs updates in the device pipelines. The
solution is not yet optimal since we need to add some workaround to
rather than make the monitoring person open a text file, we should
display it in the browser.

Co-authored-by: Chris Hamons <chris.hamons@xamarin.com>
2020-06-18 19:51:14 -04:00
Manuel de la Pena 9ddb35720b
[Harness] Add a more general IHarness interface. (#8868)
In order to be able to test the TestSelectro in PR
https://github.com/xamarin/xamarin-macios/pull/8768 we need a more
general interface to mock and ensure that the correct properties are set
by the TestSelector.
2020-06-16 16:04:38 -04:00
Rolf Bjarne Kvinge 24719920dc
[xharness] Make ConsoleLog thread-safe. Fixes #8569. (#8864)
Fixes https://github.com/xamarin/xamarin-macios/issues/8569.
2020-06-16 17:39:06 +02:00
Rolf Bjarne Kvinge 95e42b9266
Rename master to main. (#8851)
* Fix links that point to master to point to main instead.
* Implement support in the sample tester for specifying the default branch for
  each sample repo.
* Fix various text / documentation to say 'main' instead of 'master.'
* Push to 'main' instead of 'master' in xamarin-macios-data.
* Fix xharness to make 'main' the special branch with regards to documentation tests as opposed to 'master'.
* Fix various CI to use 'main' instead of 'master'.
* Bump maccore

    New commits in xamarin/maccore:

    * xamarin/maccore@ed6d146822 Rename 'master' to 'main'. (#2233)

    Diff: 424fa26148..ed6d146822
2020-06-16 15:51:44 +02:00
Rolf Bjarne Kvinge f236e2fc94
[xharness] Don't ignore a failure to restore nugets. (#8852) 2020-06-16 08:07:37 +02:00
Rolf Bjarne Kvinge 8917f2224b
[xharness] Always use nuget to restore nugets, and always use xibuild to run nuget. (#8845) 2020-06-15 09:17:02 +02:00
monojenkins fdaa8e01be
[tools] Remove MD5 from tooling (#8774)
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-05 09:02:41 -04:00
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