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

17 Коммитов

Автор SHA1 Сообщение Дата
Sebastien Pouliot a5ac0ea102
[generator] Add C#8 nullability into generated code (#7570)
Goals
* Reflect Apple nullability annotations in our bindings using C#8
* No warnings when building bindings

Non-Goals
* Update (add or fix) `[NullAllowed]` to match Apple headers (next phase)
* Make the generator or internal code fully nullable aware (`nowarn` is used)

Notes
* Apple's own annotations are not 100% accurate :(
* Where known issue exists we have _fixed_ our attributes to match reality :)
* We also do additional null-checks internally that might seems not required (better safe than sorry).
2020-04-09 09:29:28 -04:00
Sebastien Pouliot 482a63dc56
Update sampletester docs and fix typos (#7822) 2020-02-10 08:10:40 -05:00
Sebastien Pouliot de8ad75978
[tests][sampletester] Allow project(s) removal (#7766)
Most false positives are (so far) because `nuget restore` fails - both
due to network issues and a mono issue [1].

This PR allows to filter/remove some projects from a solution before
nuget is invoked. This can reduce the number of packages to download
which, beside reducing false positives, is good performance wise.

It also allows some project (e.g. Xappy.iOS) to build even if some other
projects (e.g. Xappy.UWP) in the solution can't be built.

[1] https://github.com/mono/mono/issues/15418
2020-01-29 13:12:09 -05:00
Alex Soto d66cf8aa52
[SampleTester] Add 4 new samples (#7758)
* [SampleTester] Add 4 new samples

New samples added:

* https://github.com/xamarin/xamarin-forms-samples/tree/master/UserInterface/Xaminals
* https://github.com/davidortinau/Xappy
* https://github.com/Microsoft/SmartHotel360-Mobile
* https://github.com/microsoft/ConferenceVision

* Update new samples known failures

* Add timeout option and removed extra not needed data

* Fix whitespaces...

* Disable Xappy and add CodesignKey option

CodesignKey allows you to use and set it per csproj basis.

Xappy is failing on the UWP csproj, we diable it for now until
we add a way to remove certain projects.

* Update tests/sampletester/ProcessHelper.cs

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

Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
2020-01-28 15:40:52 -05:00
Sebastien Pouliot a2a48c4e00
[tests][sampletester] Only provide '/verbosity:diag' one time (#7763) 2020-01-28 14:45:29 -05:00
Rolf Bjarne Kvinge 0ec82e7cca
[sample-tester] Collect app size and build duration statistics. (#7602)
* [sample-tester] Collect app size and build duration statistics.

* Always publish performance data.

* [mmp] Add support for MMP_ENV_OPTIONS to mirror mtouch's MTOUCH_ENV_OPTIONS.

* [sample-tester] Make mmp/mtouch show timing information, and get the diagnostic msbuild log.

* Collect task and target info.

* Add more perf data and a baseline test.

* Redo the base test a bit.

* More tweaks.

* More tweaks.

* Huh?

* Debug stuff.

* diagnostics.

* Better diagnostics.

* cleanup

* tmp

* Use a separate stage to push data.

* Next attempt.

* Unique artifact names.

* Make the right name unique.

* More progress

* Improvements

* Don't need new maccore.

* cleanup

* Remove debug spew.

* Realign stuff.

* duh

* More path fixes.

* zippity zip.

* Show publishing errors.

* dependencies

* Not fake results anymore.

* Tweaks

* Merge xml files

* [sampletester] Bump nuget timeout to 5 minutes.

The TodoREST.iOS test seems to use a lot of packages, and it can apparently
take a while to restore them, so give a few more minutes.

* Improvements.

* Fix glob.

* [sampletester] Fix fetching of sample repository and hash.

* [sampletester] Centralize verbosity for mtouch and mmp.
2019-12-20 16:27:36 +01:00
Waleed Chaudhry c156a30a0b
Bump prebuilt-apps for SampleTester (#7230) 2019-10-15 18:29:27 -04:00
Rolf Bjarne Kvinge e32731cb3d
[sampletester] Timestamp build logs. (#7233)
Makes it easier to figure out timeouts sometimes.
2019-10-15 15:16:02 +02:00
Waleed Chaudhry 366da20ff0
Bump samples tester for ios-samples and xamarin-form-samples (#7166) 2019-10-14 11:30:11 -04:00
Rolf Bjarne Kvinge a8fdf6db6e
Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process. (#7177)
* Implement a different escaping/quoting algorithm for arguments to System.Diagnostics.Process.

mono changed how quotes should be escaped when passed to
System.Diagnostic.Process, so we need to change accordingly.

The main difference is that single quotes don't have to be escaped anymore.

This solves problems like this:

    System.ComponentModel.Win32Exception : ApplicationName='nuget', CommandLine='restore '/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories/ios-samples/WorkingWithTables/Part 3 - Customizing a Table\'s appearance/3 - CellCustomTable/CellCustomTable.sln' -Verbosity detailed -SolutionDir '/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories/ios-samples/WorkingWithTables/Part 3 - Customizing a Table\'s appearance/3 - CellCustomTable'', CurrentDirectory='/Users/vsts/agent/2.158.0/work/1/s/tests/sampletester/bin/Debug/repositories', 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/2019-08/external/bockbuild/builds/mono-x64/mcs/class/System/System.Diagnostics/Process.cs:778

ref: https://github.com/mono/mono/pull/15047

* Rework process arguments to pass arrays/lists around instead of quoted strings.

And then only convert to a string at the very end when we create the Process
instance.

In the future there will be a ProcessStartInfo.ArgumentList property we can
use to give the original array/list of arguments directly to the BCL so that
we can avoid quoting at all. These changes gets us almost all the way there
already (except that the ArgumentList property isn't available quite yet).

We also have to bump to target framework version v4.7.2 from v4.5 in several
places because of 'Array.Empty<T> ()' which is now used in more places.

* Parse linker flags from LinkWith attributes.

* [sampletester] Bump to v4.7.2 for Array.Empty<T> ().

* Fix typo.

* Rename GetVerbosity -> AddVerbosity.

* Remove unnecessary string interpolation.

* Remove unused variable.

* [mtouch] Simplify code a bit.

* Use implicitly typed arrays.
2019-10-14 16:18:46 +02:00
Rolf Bjarne Kvinge bd0de42768
[sampletester] Bump xamarin-forms-book-samples to the tip of master, where a few fixes have been merged. (#6584) 2019-07-15 22:47:24 -07:00
Rolf Bjarne Kvinge 50f74bd916
[tests] Provision dotnet for the sample tests. Fixes xamarin/maccore#1811. (#6473)
Also synchronize configuration file creation to not run into threading issues.

Fixes https://github.com/xamarin/maccore/issues/1811.
2019-07-03 12:41:33 +02:00
Rolf Bjarne Kvinge 0124e054f8
[sampletester] Use dotnet v2.2.1XX if available. (#6185)
Works around https://github.com/NuGet/Home/issues/7956.
2019-05-31 09:27:32 -07:00
Rolf Bjarne Kvinge 4dec01a585
[sampletester] Bump xamarin-forms-book-samples to the tip of master, where a few fixes have been merged. (#6186) 2019-05-31 09:24:19 -07:00
Rolf Bjarne Kvinge 6b650d8364
[sample tests] Fix variable calculation to calculate once. (#6061)
Use simply expanded variable as test result filename, so that it's only
calculated once. This avoids ending up with different filenames when the
timestamp in the filename changes between calculations, such as:

    Results (nunit3) saved as /Users/vsts/agent/2.150.3/work/1/s/tests/sampletester/TestResult-20190511-100657.xml
    warning: failed to load external entity "TestResult-20190511-100658.xml"
    unable to parse TestResult-20190511-100658.xml
    make: *** [run-tests] Error 6
2019-05-17 09:21:00 -07:00
Rolf Bjarne Kvinge 3c66051e5a
[sampletester] Bump prebuilt-apps hash. (#6015)
Bump prebuilt-apps hash to get fix for https://github.com/xamarin/prebuilt-apps/pull/31.
2019-05-08 15:25:47 +02:00
Rolf Bjarne Kvinge bd457212d5
[tests] Add sample tester. (#5870)
* [tests] Add sample tester.

Add a unit project that looks for iOS/macOS/tvOS sample projects in several
repositories, and builds them all.

* [tests][sampletester] Remove known issue which has now been fixed.

* [tests] Only run sample tests on CI in Azure Devops.

* Remove the possibility of automatically running the sample tests with
  xharness (so the sample tests won't run on PR bots or internal bots when the
  'run-all-tests' label is added). It's still possible to run the sample tests
  manually from the xharness web UI.

* Automatically trigger the sample test run in Azure Devops if the
  'run-sample-tests' label is applied to a PR (and that PR is executed on
  internal Jenkins).

* Fix typo.

* Fix path.

* Verbose output to track down scheduling failure.

* Bump maccore to get improved debug spew.

Diff: f527c9c526..f89d74b165

* [tests][sampletester] Fix build for TodoWCF.
2019-04-25 17:18:43 +02:00