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

558 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 77d4769f54 [xharness] Make sure DownloadMlaunch isn't run multiple times simultaneously. (#1236) 2016-11-24 15:12:51 +01:00
Timothy Risi 2dcace0c7a [Mac] Add ApiTypoTest (#1190) 2016-11-21 16:35:57 -05:00
Manuel de la Pena 576563fa0a Revert "[tests] Disable the docs tests until the documentation process is fixed. (#965)" (#1220)
Test have been fixed in
maccore/master/7284688c05cd1420274858a57b7c7616dfbe1d0b

This reverts commit 0a0503a6e9.
2016-11-21 13:09:54 +01:00
Rolf Bjarne Kvinge db00a33848 [xharness] Add support for [skip|run]-all-tests labels. (#1208) 2016-11-18 07:11:14 +01:00
Rolf Bjarne Kvinge fad320462c [apitest] Skip IKPictureTaker. Fixes #46624. (#1209)
https://bugzilla.xamarin.com/show_bug.cgi?id=46624
2016-11-17 19:23:13 +01:00
Rolf Bjarne Kvinge 077b0d3343 [tests] Update README. (#1207) 2016-11-17 14:18:39 +01:00
Rolf Bjarne Kvinge 66f82d1f94 [jenkins] Add support for enabling device builds using labels. (#1184)
* [jenkins] Add support for enabling device builds using labels.

* [xharness] Give the iOS MSBuild tests 30 minutes to finish.

* [mtouch tests] Give the BuildTestProject 10 minutes to compile each test case.

Wrench bots build the dontlink test in ~3m40, but that's apparently not enough
for the Jenkins bots (slower bots?), which time out the test after 5 minutes.

So double the timeout to 10 minutes, which will hopefully give the Jenkins
bots enough time to run the test to completion.
2016-11-17 10:22:26 +01:00
Rolf Bjarne Kvinge 89757e6f60 [xharness] Capture entire log files on wrench. (#1206) 2016-11-17 08:07:09 +01:00
Rolf Bjarne Kvinge c83fa8a9bb [xharness] Fix target selection for simulators on wrench. (#1204) 2016-11-16 19:06:26 +01:00
Rolf Bjarne Kvinge 15b1204874 [xharness] Unify simulator selection code between Jenkins and Wrench and automatically create device pairs if none applicable is found. (#1202)
* [xharness] Don't crash if we can't find a simulator.

* [xharness] Create a device pair if none applicable is found.

* [xharness] Use an enum instead of string values for the target.

* [xharness] Unify the simulator selection code between Jenkins and Wrench.
2016-11-16 15:23:11 +01:00
Rolf Bjarne Kvinge a2570c6b84 [xharness] Improve cleaning by removing saved simulator state and the CoreSimulatorService. (#1203)
Also do this at the very start, to make sure no stale CoreSimulatorService is
around at build time. This will hopefully fix bug #[46097][1].

[1]: https://bugzilla.xamarin.com/show_bug.cgi?id=46097
2016-11-16 15:21:20 +01:00
Rolf Bjarne Kvinge d646d522f3 [xharness] When finding watchos device types, only find the ones that are in available device pairs. (#1198) 2016-11-15 20:20:36 +01:00
Manuel de la Pena aa38ab68ac [Jenkins] Add nuint xml logs (#883)
* [Jenkins] Make test to write output as an xml file so that it can be parsed by the jenkins bot.

* Point to the correct Touvh.Unit repo.

* Use the available property to determine if we are being ran in Jenkins.

* Log where are test results stored.

* Add @MonkeyWrench: prefix.

* Ensure that we do set the build env in jenkins/run-tests.sh

* Do not mix Wrench with Jenkins. The reports in jenkins can be Xml, in Wrench we prefer the old style.

* Ensure that the main node of the unit tests does contain the target, that will improve the tests results reporting.

* Revert "Fix binding project LinkWithAttributes generation to prevent rebuilds" (#1018)

* Added xslt to be used to keep the old Test Reports until we move to only Jenkins reports.

* Add an extra log for the xslt transformation.

* Point to the correcto dir in jenkins.

* Deal with the xslt once we have finished rather than in a batch.

* Remove noise.

* Readd case removed in rebase.

* Fix indentation.

* Skip lock keychain.
2016-11-15 19:04:37 +01:00
Chris Hamons 441ae8c4ec Merge pull request #1178 from xamarin/xm_fix_touchbar_mess
Re-add touchbar APIs to master, this time with the correct StaticRegistar fix...
2016-11-14 10:59:51 -06:00
Chris Hamons 7004944a6b Fix mmp rebuild logic to detect mmp failures and rebuild (#1149)
- https://bugzilla.xamarin.com/show_bug.cgi?id=46508

Since we were previously looking for the .exe instead of the launcher, mmp
failures would come back as good and we wouldn't rebuild. What we want
to do is look for the native launcher, which we perviously were doing wrong.
2016-11-14 10:58:50 -06:00
Rolf Bjarne Kvinge 816fca0fa1 [xharness] Show better log names. 2016-11-14 14:47:23 +01:00
Rolf Bjarne Kvinge 15b25359c6 [xharness] Determine additional tests to run based on the modified files in a pull request. (#1166)
Example log output when bumping mono:

> Found 1 modified file(s) in the pull request #1161.
>     external/mono
> Enabled 'mtouch' tests because the modified file 'external/mono' matches prefix 'external/mono'
> Enabled 'mmp' tests because the modified file 'external/mono' matches prefix 'external/mono'
> Enabled 'bcl' tests because the modified file 'external/mono' matches prefix 'external/mono'
> Found 1 label(s) in the pull request #1161: cla-already-signed

Or when changing the static registrar:

> Found 1 modified file(s) in the pull request #1164.
>     tools/common/StaticRegistrar.cs
> Enabled 'mtouch' tests because the modified file 'tools/common/StaticRegistrar.cs' matches prefix 'tools/common'
> Enabled 'mmp' tests because the modified file 'tools/common/StaticRegistrar.cs' matches prefix 'tools/common'
> Found 2 label(s) in the pull request #1164: cla-already-signed, run-mmp-tests
> Enabled 'mmp' tests because the label 'run-mmp-tests' is set.
2016-11-14 10:43:35 +01:00
Chris Hamons a7126f67aa Revert "Revert "Add support for new TouchBar APIs (#1086)" (#1172)"
This reverts commit abb0449b6c.

_Seriously_ this time. Here's the story:

- TouchBar support was breaking tests in master, even after my static
 registrar fix in 6422000c27
- However, the fix wasn't broad enough, because the TouchBar APIs were
 in Xcode 8.1 as well.
- Confusion on my end (You need latest macOS but not latest Xcode) and
 confusion on others (since there were changes in Xcode 8.2 to touchbar,
 but they were subtractive, caused us to think this needed to go in
 Xcode 8.2
2016-11-11 14:03:03 -06:00
Rolf Bjarne Kvinge 37e59b8457 [mtouch tests] Convert MT1016 and MT1017 tests to use new test syntax and link them. (#1173)
Convert MT1016 and MT1017 to newer test syntax, and at the same time change
them to not disable the managed linker.

For these tests it doesn't matter if they're linked or not, but linking is
much faster (20s vs 82s for both tests).
2016-11-11 19:01:24 +01:00
Chris Hamons abb0449b6c Revert "Add support for new TouchBar APIs (#1086)" (#1172)
This reverts commit 273ab61229.

This should have gone into xcode 8.2 branch and not master.
2016-11-11 11:39:32 -06:00
Rolf Bjarne Kvinge 878f2c527a [tests] Update MT1017 test after 7c6d04f1. (#1170)
In 7c6d04f1 the code to create the NOTICE file was simplified, and the new
implementation is writing to a temporary file and then replacing the existing
file.

This makes the scenario that MT1017 was testing (failure if a readonly NOTICE
file already exists) go away, since we don't write to the existing file
anymore (so the build succeeds).
2016-11-11 17:49:41 +01:00
Rolf Bjarne Kvinge 37a0b72a4e [mtouch tests] Update Makefile to NUnit3 syntax for helper text/targets. (#1171) 2016-11-11 17:47:54 +01:00
Chris Hamons eb868c3072 Remove timestamp hack when found not needed. 2016-11-10 11:50:36 -06:00
Chris Hamons 1ae4fbc0ef Rework test to be consistent 2016-11-10 11:03:52 -06:00
Chris Hamons 273ab61229 Add support for new TouchBar APIs (#1086) 2016-11-10 10:07:46 -06:00
Chris Hamons 7c43e423fb Fix build after merge 2016-11-09 16:09:48 -06:00
Chris Hamons d4e32a96f2 Merge branch 'master' into xm_mmp_rebuildfix 2016-11-09 14:20:41 -06:00
Chris Hamons 7ed3f17a6e Fix mmp rebuild logic to detect mmp failures and rebuild
- https://bugzilla.xamarin.com/show_bug.cgi?id=46508

Since we were previously looking for the .exe instead of the launcher, mmp
failures would come back as good and we wouldn't rebuild. What we want
to do is look for the native launcher, which we perviously were doing wrong.
2016-11-09 14:16:53 -06:00
Rolf Bjarne Kvinge 7bf290278c Bump maccore to get mlaunch changes. (#1143) 2016-11-09 16:14:59 +01:00
Rolf Bjarne Kvinge 10516d3672 [CoreFoundation] Store strings in the exception data when converting CFError to CFException. Fixes #46626. (#1144)
Store strings in the exception data when converting CFError to CFException, to
make sure the data stored is serializable (which is apparently a requirement
with the reference sources).

https://bugzilla.xamarin.com/show_bug.cgi?id=46626
2016-11-09 15:31:02 +01:00
Sebastien Pouliot c92934eb6d [mtouch][mmp] Only allow `appletls` for the TLS provider (#1132)
The old `legacy` option will now be reported as a warning. 

That's by design an warning would require manually editing the .csproj
file (when the UI gets removed, as planned, from the IDE). 

This is part of
https://trello.com/c/SrgU38DN/647-only-ship-support-appletls

Note: The BCL changes will happen in later stages.
2016-11-08 14:42:40 -05:00
Rolf Bjarne Kvinge d42a9f4909 [mtouch] Make MT2015 (invalid HttpMessageHandler) a warning for known http message handlers on watchOS. Fixes #46552. (#1134)
Earlier versions of Xamarin Studio stored an invalid http message handler in
watchOS project files, which would cause a build error. In addition Xamarin
Studio removed the UI to set the http message handler (since only one value is
valid), which meant that the user had to edit the project file by hand to get
around this build error.

So make it a warning instead (and document what the user has to do to fix the
warning).

https://bugzilla.xamarin.com/show_bug.cgi?id=46552
2016-11-08 11:13:53 -05:00
Alex Soto 6b65ce9077 [AVFoundation] Low hanging fruits and xtro of AVFoundation (#980)
This commit brings all new 10.12 api + most of the unbound
AVFoundation API that is macOS specific and was left in the limbo
2016-11-07 09:32:56 -06:00
Rolf Bjarne Kvinge 503061f6ab [tests] Update to NUnit 3 in mtouch tests. (#1119) 2016-11-07 12:22:37 +01:00
Rolf Bjarne Kvinge 5ef045d764 [xharness] Capture stdout/stderr from simulator apps. (#1116)
And if we have a tty, just show the output directly there. Otherwise capture
it, and store it in log files.
2016-11-04 12:13:20 +01:00
Rolf Bjarne Kvinge 3351e2a633 Add a 'repositorypath' to our NuGet.Config and update paths everywhere accordingly. (#1110)
This makes us only put packages in one directory (saves disk space and time),
and it also makes project files in multiple solutions work properly
(mtouch.csproj is in tests/tests.sln and tests/mtouch/mtouch.sln).
2016-11-04 09:13:33 +01:00
Rolf Bjarne Kvinge a2a67377df [mtouch] Update the timestamp for the simlauncher when copying it into the app. (#1094)
This makes sure that the final executable has a timestamp after the .exe,
which makes the MSBuild tasks able to avoid unnecessary rebuilds.
2016-11-03 14:35:46 +01:00
Rolf Bjarne Kvinge 43c06e0cbb [tests] Ignore mtouch tests that require device support if device support was not included in the build. (#1109) 2016-11-03 13:20:31 +01:00
Rolf Bjarne Kvinge 4c8867c1b2 [xharness] Give the mtouch tests 120 minutes to finish. (#1095)
Give the mtouch tests 120 minutes to finish, since that's what wrench
currently gives them.
2016-11-03 11:53:49 +01:00
Sebastien Pouliot ee046ee034 [generator] Copy [Obsolete] attributes on smart enums. Fixes #46292 (#1104)
Covers attributes on the type itself and on its members.

Reference:
* https://bugzilla.xamarin.com/show_bug.cgi?id=46292
2016-11-02 23:18:59 -04:00
Sebastien Pouliot e55385637f [generator] Allow identical (numeric) values in smart enums. Fixes #46285 (#1102)
Considering the following binding code:

    public enum HMAccessoryCategoryType {
        [Field ("HMAccessoryCategoryTypeGarageDoorOpener")]
        DoorOpener,

        GarageDoorOpener = DoorOpener,
    }

We must

1. Ensure that `HMAccessoryCategoryType.DoorOpener.GetConstant () ==
	HMAccessoryCategoryType.GarageDoorOpener.GetConstant ()`;

This is done by using the numeric value of the enum member (instead of the name)

2. Ensure that `HMAccessoryCategoryTypeExtensions.GetValue ("HMAccessoryCategoryTypeGarageDoorOpener")`
   always return the same enum value, i.e. it can **not** change between
   XI versions (e.g. due to reflection ordering) as it could break
   comparison code;

This is done by only adding a map to the member that has a [Field] and
means that:

2.1. the _favorite_ enum member should be the one with the [Field]; and

2.2. a [Field] value can only be used once per enum (or else we report
     an BI1046 error). This also solve the duplicate code generation for
	 the constant loading code;

Reference:
* https://bugzilla.xamarin.com/show_bug.cgi?id=46285
2016-11-02 21:46:04 -04:00
Rolf Bjarne Kvinge f1420510da [xharness] Add support to configure which tests to run on Jenkins by using labels on pull requests. (#1082) 2016-11-02 16:46:32 +01:00
Rolf Bjarne Kvinge b13bbe0dfb [xharness] Detect and report launch failures better. (#1079) 2016-11-02 15:43:55 +01:00
Rolf Bjarne Kvinge e6b0ed232d [mtouch tests] Remove unnecessary parameter from helper method. (#1093) 2016-11-02 14:44:37 +01:00
Rolf Bjarne Kvinge 7728c4cd19 [registrar] Use metadata tokens instead of strings to find types and methods. (#1085)
Use metadata tokens instead of strings to find types and methods.

This makes the code to find methods more compact (a lot less strings in the
executable, and additionally in most cases a compact representation (32-bit
integer) of the corresponding metadata token and additional information can be
used, which results in less executable code (fewer parameters to methods,
etc)), resulting in smaller executables.

Size savings are around 200kb for dont link apps, and 20-60kb for linked apps
(this obviously varies a lot depending on how much has to registered by the
registrar).

|                |    Before     |     After     |       Diff        |
|----------------|--------------:|--------------:|------------------:|
| dontlink/32bit |  102.810.144  |  102.609.456  | -200.688 = -0,20% |
| dontlink/64bit |  107.420.576  |  107.221.792  | -198.784 = -0,19% |
| linksdk/32bit  |   40.957.296  |   40.936.864  |  -20.432 = -0,05% |
| linksdk/64bit  |   43.113.136  |   43.093.936  |  -19.200 = -0,04% |
| linkall/32bit  |   38.410.032  |   38.348.288  |  -61.744 = -0,16% |
| linkall/64bit  |   40.315.200  |   40.267.344  |  -47.856 = -0,12% |

Additionally I've removed the `lazy_map` dictionary, which we populated at
startup and was used to map between Class instances and the corresponding
managed type's FullName, and instead iterate over a native array of Class ->
metadata token mappings whenever we need to look up the managed type for a
certain Class instance.

This is slightly slower for each type we need to look up (for a non-linked app
there might be a 2000-3000 entries in the native array, which would be
iterated instead of using a hashtable lookup), but it's only done once per
type and there's a significant startup memory improvement.

For a non-linked test app I get the following using the Xamarin profiler:

|                   |  Before |  After  |       Diff      |
|-------------------|--------:|--------:|----------------:|
| Memory allocated  |  2,8 MB |  2,4 MB | -0,4 MB = -14 % |
| Objects allocated |   43678 |   38463 |   -5215 = -12 % |
| Private bytes     | 26,6 MB | 24,4 MB | -2,2 MB = -8,3% |
| Working set       | 26,6 MB | 24,4 MB | -2,2 MB = -8,3% |
2016-11-01 14:34:56 -04:00
Rolf Bjarne Kvinge dddd243dfd [xharness] Update to remove OpenTK-1.0 instead of OpenTK references after XI/Classic removal. (#1084) 2016-11-01 13:13:52 -04:00
Sebastien Pouliot 7b38187479 [mtouch][mmp] Unify user resources removal as a link step (#1026)
Right now the logic exists in a few places, both in and outside the
linker. We recently began to use part of the linker pipeline in normal /
all builds so it's easier to share (and unify) the code now.

The real gain is to avoid copying assemblies, in particular large ones,
more than strictly needed while building.

E.g. a build including a very large 1.3GB assembly, with several
native libraries embedded, save a lot of time avoiding the rewrites

mtouch (before)
		Total time: 64202 ms

mtouch (after)
		Total time: 34840 ms

* Add XM support for RemoveUserResourcesSubStep

* Tests supplied by @chamons
2016-11-01 13:11:25 -04:00
Rolf Bjarne Kvinge 23b693c5ff [mtouch] Update mdb files even if the corresponding assembly didn't change. Fixes #39535. (#1072)
Update mdb files even if the corresponding assembly didn't change, because the
mdb can change even if the assembly didn't (if whitespace was modified in the
source code, causing code lines to move).

https://bugzilla.xamarin.com/show_bug.cgi?id=39535
2016-11-01 15:37:37 +01:00
Rolf Bjarne Kvinge 5415c90092 [xharness] Add support for running the mtouch tests on Jenkins. (#1077) 2016-11-01 14:43:37 +01:00
Rolf Bjarne Kvinge c521bfde62 [mtouch] Don't link native libraries into the main executable if we're doing an incremental build. Fixes #42473. (#1073)
Native libraries are already linked into the dylib for the binding assembly,
which means that if we also link it into the main executable, the native code
ends up twice in the app (which is bad for many reasons).

https://bugzilla.xamarin.com/show_bug.cgi?id=42473
2016-10-31 16:55:45 -04:00