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

34 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge f6cbea8545 [mtouch] Don't remove information when collecting all architectures. Fixes #55555.
Of particular importance is if we're building for LLVM or not: this fixes a
bug where we wouldn't pass --llvm to the AOT compiler when compiling
assemblies to frameworks (which we do when sharing code).

https://bugzilla.xamarin.com/show_bug.cgi?id=55555
2017-04-25 14:32:08 +02:00
Rolf Bjarne Kvinge 07127a76ca [mtouch] Make code sharing failures real warnings. 2017-02-17 10:16:51 +01:00
Rolf Bjarne Kvinge 5bea8577a4 [mtouch tests] Automatically pass --extension to mtouch if we create a temporary extension. 2017-02-10 16:39:29 +01:00
Rolf Bjarne Kvinge b78d6fa429 [mtouch tests] Fix typo. 2017-02-10 16:39:29 +01:00
Rolf Bjarne Kvinge 6d744417dd [mtouch tests] Improve rebuild test. 2017-02-10 16:39:26 +01:00
Rolf Bjarne Kvinge 2973b99f51 [mtouch tests] Add support for passing --nostrip to mtouch.
And use it to make tests run faster when we don't need to strip code.
2017-02-10 16:39:20 +01:00
Rolf Bjarne Kvinge 2a21419197 [mtouch tests] Add code sharing test. 2017-02-10 16:39:19 +01:00
Rolf Bjarne Kvinge 62c08fd233 [mtouch tests] Allow creating temporary apps/extensions multiple times without re-creating temporary directories.
Allow creating temporary apps/extensions multiple times without re-creating temporary directories.

This makes it possible for tests to call CreateTemporaryApp|Extension multiple
times with different code, and have only the actual managed assembly change
between each time (which is useful for tests that verifies that cached builds
are used properly).
2017-02-10 16:39:19 +01:00
Rolf Bjarne Kvinge 2f8064a6e4 [mtouch tests] Check if plist has changed before writing it.
This is important for rebuild tests checking filestamps.
2017-02-10 16:39:19 +01:00
Rolf Bjarne Kvinge a1a141b4ca [mtouch tests] Use a different default app name for service extensions.
Otherwise it might end up clashing with the main app's name, preventing code sharing.
2017-02-10 16:39:18 +01:00
Rolf Bjarne Kvinge 18a6bf4690 [mtouch tests] Store app extensions as MTouchTool instances. 2017-02-10 16:39:18 +01:00
Rolf Bjarne Kvinge 85f28fbd59 [mtouch] Warn if mtouch loads an assembly from a different location than requested.
Warn if mtouch loads an assembly from a different location than requested
(which might be because there are multiple assemblies with the same name).

Also rework the MT0023 check a bit by explicitly loading the root assembly
first, and then detecting if any loaded assemblies matches the root assembly.
This results in code that's a bit more obvious, and it also works correctly
with extensions (previously the entire MT0023 check was skipped for
extensions).
2017-02-10 16:39:15 +01:00
Rolf Bjarne Kvinge a590612751 [mtouch] Add an --assembly-build-target option. 2017-02-10 14:29:11 +01:00
Rolf Bjarne Kvinge a07085aafa [mtouch] Create a custom AssemblyCollection class.
Create a custom AssemblyCollection class that contains a dictionary with
assembly identity (name) -> Assembly mapping.

This also means that we can detect if we end up loading multiple assemblies
with the same identity, and show an error in that case (even if that case
should never happen since we cache assemblies based on the identity, it's nice
to have code that ensures it).
2017-02-10 14:15:35 +01:00
Rolf Bjarne Kvinge 68415e88c5 [mtouch] Fix build error with fastdev & libpinvokes & paths with spaces. (#1618) 2017-02-02 18:09:42 +01:00
Rolf Bjarne Kvinge 47a7568f9b [tests] Refactor many of the mtouch tests to use new testing infrastructure. (#1569)
This makes a couple of future optimizations easier:

* Cache the compilation of test assemblies.
* Load mtouch.exe directly in the test process.
2017-01-27 07:35:32 +01:00
Rolf Bjarne Kvinge 1a7a4ab463 [mtouch] Add support for specifying how to optimize LLVM output. (#1532)
Performance tests
-----------------

This is for a new watchOS extension project, built for release.

* The default (currently -O2) optimizations:      41s (  baseline )  30.027.060 bytes (     baseline    )
* All optimizations disabled (`--llvm-opt=all=`): 17s (-24s = -59%)  32.978.312 bytes (+2.951.252 = +10%)
* Optimized for size (`--llvm-opt=all=-Os`):      36s ( -5s = -12%)  28.617.408 bytes (-1.409.652 =  -5%)
* Optimized for more size (`--llvm-opt=all=-Oz`): 35s ( -6s = -15%)  28.601.016 bytes (-1.426.044 =  -5%)
* Optimized slightly (`--llvm-opt=all=-O1`):      35s ( -6s = -15%)  28.666.556 bytes (-1.360.504 =  -5%)
* Optimized a lot (`--llvm-opt=all=-O3`):         41s (  0s =   0%)  30.403.996 bytes (+  376.936 =  +1%)

Conclusions
-----------

* The fastest build by far (less than twice as fast) is if optimizations are
  disabled, but this adds a 10% size penalty (~3 MB in this test case),
  compared to the baseline, and 15% size penalty (4.3 MB) compared to -Oz.
* -Oz seems to have the best overall results: at least as fast as any other
  optimized build, and the smallest app as well.

Caveats
-------

Some optimizations might not work the AOT compiled code. The resulting
binaries have not been tested.
2017-01-20 16:11:48 +01:00
Rolf Bjarne Kvinge 53fc697aad [mtouch] Refactor command-line parsing to be reusable.
Also add a few tests to verify how we treat the root assembly (or lack
thereof).
2017-01-16 13:52:37 +01:00
Rolf Bjarne Kvinge c2e2e3d824 [mtouch] Include extracted frameworks from binding assemblies when listing the frameworks an extension needs. Fixes #45800. (#1461)
Include extracted frameworks from binding assemblies when listing the
frameworks an extension needs.

Fixes #45800 - comments 8-13.

https://bugzilla.xamarin.com/show_bug.cgi?id=45800
2017-01-11 16:50:07 +01:00
Rolf Bjarne Kvinge 39cb42961d [mtouch tests] Add Cache. 2017-01-05 10:43:55 +01:00
Rolf Bjarne Kvinge 2d3a990acf [mtouch tests] Minor refactoring to make a few nested classes non-nested. (#1433) 2017-01-04 19:33:57 +01:00
Rolf Bjarne Kvinge 30bac18e10 [mtouch] Fix BundleId. (#1315)
The BundleId property is used by the code that generates the mSYM directory,
but its value was always the default value 'com.yourcompany.sample' instead of
looked up in the app's Info.plist.

So fix the BundleId property to do the expected.

Also fix the mSYM test (SymbolicationData) to actually test mSYM stuff (it was
partially disabled when we disabled automatic mSYM generation for C8, and
never re-enabled), and port it to the new and better test syntax, and add a
few more asserts to check the manifest.xml generation.
2016-12-08 16:05:47 +01:00
Rolf Bjarne Kvinge 2e3185d687 [mtouch tests] Rename Profile.Unified to Profile.iOS. (#1281)
Rename Profile.Unified to Profile.iOS to better match the other values in the enum (tvOS/watchOS).
2016-12-01 12:32:48 +01: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
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 e6b0ed232d [mtouch tests] Remove unnecessary parameter from helper method. (#1093) 2016-11-02 14:44:37 +01:00
Rolf Bjarne Kvinge 0b3ab9cc15 [mtouch] Copy third-party frameworks from extensions to the main app's Frameworks directory. Fixes #45800. (#1069)
The container app may not reference the same third-party frameworks as
extensions, which means that we must make sure the extension's frameworks are
also included in the app bundle.

So when building extensions save a list of all third-party frameworks, and
then read that list and include those frameworks when building the main app.

https://bugzilla.xamarin.com/show_bug.cgi?id=45800
2016-10-31 12:36:06 +01:00
Rolf Bjarne Kvinge bdbbea962a [tests] Unifiy namespaces in mtouch tests. (#1057) 2016-10-28 10:15:00 -04:00
Vincent Dondain 5d25bdc754 [mtouch/tests] BuildAndLaunchTime + RegistrarTime test (#1051)
- BuildAndLaunchTime is replacing AppLaunchTime as it calculates both
  build time and launch time for different linker modes.

* [mtouch/tests] Add RegistrarTime test

- Also fix MTouchTool --registrar:dynamic
2016-10-28 08:44:13 -04:00
Vincent Dondain b252093691 [mtouch/tests] Add TimingTests (#1007)
* [mtouch/tests] Add TimingTests

- New MLaunchTool.
- AppLaunchTime (mlaunch): time to launch an application on the simulators.
  How it works: we first open the simulator by launching a dummy app. This allows us to detect if there are any launch watchdogs.
  Therefore, for consistency, all measurements are done with the simulator already open.
  In the case of the AppLaunchTime test, we build the app with the default config and launch it. It's automatically killed by the simulator
  because it does not have a valid entry point but this is fine because it also kills the process and lets us stop the stopwatch.
  We then simply log the time performance.
2016-10-27 14:05:44 +02:00
Rolf Bjarne Kvinge 7e1d9820b3 [mtouch] Bundle libpinvokes.dylib in the app. (#954)
Building a dylib is somewhat useless unless it ends up in the app bundle.
2016-10-06 14:16:55 +02:00
Rolf Bjarne Kvinge 0863e412b4 Remove XI/Classic support (#926)
* [tests] Remove Classic SDK tests.

* Remove XI/Classic support.

This also means we can remove support for the legacy registrars.

* [monotouch-test] Remove legacy registrar tests.

* [tests/mtouch] Remove Classic tests (and legacy registrar logic).

* [tests/scripted] Fix tests to reference Xamarin.iOS.dll.
2016-09-30 15:02:17 -04:00
Rolf Bjarne Kvinge 98af8b7d66 [mtouch tests] Make a few simulator tests more resilient against other output from mlaunch. (#148) 2016-06-08 16:19:56 +02:00
Rolf Bjarne Kvinge ecfdea9508 [tests] Import 2016-05-26 15:06:52 +02:00