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

15 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
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
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
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
Manuel de la Pena f1c7d1e3fd
[Harness] Pass extra arguments to configure the linker for certain tests (#6143)
Some tests need a special linker configuration. Add the extra arguments
so that tests do pass on device.

Fixes: https://github.com/xamarin/maccore/issues/1608
2019-05-28 07:04:42 -07:00
Manuel de la Pena 9cd5fd4ba2 [XHarness] Fix the generation of the fsharp today sln. (#5860)
Because we are missing a separator, the comparison results in a true,
when it is a substring BUT NOT in the same path.
2019-04-05 15:42:41 -05:00
Chris Hamons d7c2a45ca9
Add 'NoBindingEmbedding' style binding project support (#5167)
- Existing binding projects embed the native libraries within the assembly as managed resource
- This does not scale well and has performance implications
- This PR creates a new property, NoBindingEmbedding which when true processes the building and consumption of binding projects differently.
- Existing binding projects are not affected, they will continue as is
- I've written a full XM test suite and ported a subset to iOS. Since iOS only supports checked in projects, and I didn't want to make the existing situation worse by adding more, I only wrote tests that could use the existing test projects.
    -When we complete some form of msbuild testing reform, we'll revisit these tests.
- Remove two files in MyiOSFrameworkBinding that are not used (we use copies elsewhere)
- Remove unnecessary sleep and fix broken touch command
- Output failing test log to console instead of test output
    - VSfM does not handle thousands of lines of test failure message well
- Add ability to generate binding projects with LinkWith
2018-12-12 09:55:57 -05:00
Alex Soto 76f0153e72
[build] Remove MT.D source build and replace it with a binary (#3957)
* [build] Remove MT.D source build and replace it with a binary

This commit removes MonoTouch.Dialog from our source build and
replaces it with a binary from c913506df2/MonoTouch.Dialog-Unified

The MT.D hash used in this commit is fixed to migueldeicaza/MonoTouch.Dialog@92c6e14

* Update .gitignore.

* MonoTouch.Dialog-1.dll doesn't need depend on the platform assembly anymore, because we're copying a binary instead of building.

* Add significant debug spew.

* More debugging.

* Remove debug spew.

* [compare-commits] Create directory before trying to create files in it.
2018-04-23 13:08:58 -05:00
Rolf Bjarne Kvinge 787c63766e [xharness] Fix generation of today extension projects to work from Xamarin Studio. (#1502)
Minor tweaks to make the solutions/project files usable from the IDE, and not
only the command line.
2017-01-16 16:23:49 +01:00
Rolf Bjarne Kvinge 8391a3ca39 [xharness] Major rewrite (add server mode, add device support, add today extension support).
* Add a server mode, which launches a web server (and a web page) that can be
  used to interactively run tests and view their results.

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

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

* Add support for running tests on device. Tests will be executed on multiple
  devices simulatenously (any connected devices will be used).
2017-01-05 13:08:48 +01:00
Rolf Bjarne Kvinge 4a714f3c43 Make logic not depend on the checkout directory being named 'xamarin-macios'. (#129) 2016-06-06 12:18:52 +02:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00