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

1924 Коммитов

Автор SHA1 Сообщение Дата
Jeffrey Stedfast 439e71fbf1 [msbuild] Fixed the logic to properly codesign *.appex's inside watch apps (#1499)
Several dependency targets were not being properly run because the Condition
expressions on e.g. the _CodesignAppExtensions target depended on variables
that were empty until the dependencies set them. But dependencies are only
executed if the parent target's Conditions were met.

Also changed the _CodesignVerify target to use the _ResolvedAppExtensions
variable instead of the _AppExtensionCodesignProperties variable. This means
that the _CodesignVerify target no longer depends on the
_ReadCodesignAppExtensionProperties target being executed and thus makes it
less likely that bugs like that will slip by in the future.
2017-01-13 16:05:15 -05:00
Sebastien Pouliot 6e31a77b8e [tests] Generalize CIImage test wrt colorspace. Fixes #51493 (#1496)
So it does not to fail on some iOS versions / devices.

https://bugzilla.xamarin.com/show_bug.cgi?id=51493
2017-01-13 13:05:32 -05:00
Rolf Bjarne Kvinge 0e322fc87c [xharness] Fix test resets, to avoid logs showing up after re-running a test. (#1493) 2017-01-13 18:48:25 +01:00
Rolf Bjarne Kvinge ab997e0a30 [xharness] Remove debug spew. (#1489) 2017-01-13 17:44:57 +01:00
Rolf Bjarne Kvinge a0ac4a8915 [xharness] Improve html formatting of harness exceptions a bit by indenting multi-line messages. (#1491) 2017-01-13 17:44:24 +01:00
Sebastien Pouliot c80a1bb10d [coreanimation] Add CAScroll smart enum (to replace NSString constants) (#1487) 2017-01-13 10:41:01 -05:00
Rolf Bjarne Kvinge 660a2fad27 [xharness] Calculate aggregate in the class a field is declared. (#1492) 2017-01-13 16:36:08 +01:00
Sebastien Pouliot d2cbd993ad Merge pull request #852 from spouliot/intro-model
[test][intro] Check for API parameters that are [Model] and not the [Protocol] interface
2017-01-12 17:11:40 -05:00
Rolf Bjarne Kvinge 54bfe2c98a [xharness] Provide better failure message for failing mac tests. (#1482)
* [xharness] Don't copy a ExecutionResult before executing.

The source might be an ignored test, even though the cloned task isn't, so if
we copy the ExecutionResult we might unexpectedly ignore the cloned task.

* [xharness] Provide better failure message for failing mac tests.
2017-01-12 16:32:45 -05:00
Vincent Dondain ebb7dceaa9 Update reference to maccore (#1483)
This includes the new mlaunch -install-progress argument needed by VS
to show a progress bar when deploying to device.
2017-01-12 16:15:47 -05:00
Sebastien Pouliot 99de1a772d [uikit] Cover null arrays in new UISegmentedControl.ctor (#1485)
Follow up to PR1477 [1] to cover case [2] for bug #33163 [3]

[1] https://github.com/xamarin/xamarin-macios/pull/1477
[2] https://github.com/xamarin/xamarin-macios/pull/1477#pullrequestreview-16295268
[3] https://bugzilla.xamarin.com/show_bug.cgi?id=33163
2017-01-12 15:33:13 -05:00
Jeffrey Stedfast e26ee5ca6c [msbuild] Refactor the IBTool task to be cleaner and more efficient (#1457)
[msbuild] Refactor the IBTool task to be cleaner and more efficient

Besides making the IBTool task cleaner and easier to understand,
a side-effect of this refactor was also to optimize the collecting
of the compiled outputs because we now only need to scan the
obj/ibtool directory once to collect each of the outputs.
2017-01-12 14:49:30 -05:00
Chris Hamons 2070d75205 [XM] Update ManagedSignature to work on XM and update XAMCORE_3_0 to 4 2017-01-12 13:46:19 -06:00
Sebastien Pouliot e238dac296 [ios][uikit] Fix [Model] in public API w/workarounds 2017-01-12 14:35:11 -05:00
Rolf Bjarne Kvinge cf169d43ac [xharness] Improve handling and reporting of unexpected exceptions. (#1480)
Unexpected exceptions are now caught in a more central location
(TestTask.RunInternalAsync), which means it's not necessary to catch
unexpected exceptions in other places (so those catch handlers have been
removed).

Additionally we now set the failure message when such an exception occurs, in
addition to writing the full exception details to a custom log file.
2017-01-12 20:08:42 +01:00
Rolf Bjarne Kvinge 483e067a3e [xharness] Improve a bit how logs are parsed and the results shown. (#1481)
Also find '[FAIL]'s in execution logs (which some mac tests produce) as well.
2017-01-12 19:40:14 +01:00
Timothy Risi 687aa6f25f Port monotouch-test suite to Xamarin.Mac (#1445)
* Port the Monotouch-test suite to run on Xamarin.Mac

Adds over 1300 new API tests for XM
2017-01-12 09:13:56 -09:00
Rolf Bjarne Kvinge 6f84d37d56 [mmp] Make sure Cecil is next to mmp.exe, so we doesn't load the system one. 2017-01-12 17:38:10 +01:00
Sebastien Pouliot 5195d45ecb [tests][tvos] Ignore UI[Collection|Table]ViewSource when checking for models/protocols
Both are our own creation and can be worked around with the `Delegate`
and `DataSource` properties (or the `Weak` ones).

We'll revisit this for `XAMCORE_4_0` as the test will fail again.

With this commit the remaining failures for tvOS should all be fixed

[FAIL] `UICollectionView.get_Source` return type `UICollectionViewSource` is a concrete type `[Model]` and not an interface `[Protocol]`
[FAIL] `UICollectionView.set_Source` includes a paramater of type `UICollectionViewSource` which is a concrete type `[Model]` and not an interface `[Protocol]`
[FAIL] `UITableView.get_Source` return type `UITableViewSource` is a concrete type `[Model]` and not an interface `[Protocol]`
[FAIL] `UITableView.set_Source` includes a paramater of type `UITableViewSource` which is a concrete type `[Model]` and not an interface `[Protocol]`
2017-01-12 10:39:19 -05:00
Marek Safar c210332a93 Cecil breaking change update 2017-01-12 10:26:24 -05:00
Sebastien Pouliot 4ffcfe4b4f [tests][coreanimation] Fix the ManagedSignature to ignore (was not always a protocol) CAAnimationDelegate and only process public API. Fix reported issues on CoreAnimation 2017-01-12 09:40:14 -05:00
Rolf Bjarne Kvinge 3693700e17 [xharness] Update where we look for mlaunch. (#1479)
We're shipping mlaunch now, which means we have other file system locations
where it might be.

Also don't look in Xamarin Studio anymore, it will always be an old version,
instead check the system's Xamarin.iOS version.
2017-01-12 15:12:16 +01:00
Sebastien Pouliot b1281b259f [cecil] Bump mono to get the latest Cecil's revision. Fixes #51336 (#1478)
This includes [1] which fix the parsing of broken .mdb as seen in [2]

Also fix mtouch's resolver and the static registrar to match some Cecil
API changes.

references:
[1] 045b0f9729
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=51336
2017-01-12 08:47:06 -05:00
Sebastien Pouliot aafa135c9c [uikit] Add convenience constructors for UISegmentedControl. Fixes #33163 (#1477)
* Existing `.ctor(object[])` now
    * changed to `params` (not a breaking change);
    * accept `NSString`, along with `string` and `UIImage`;
* Added `.ctor (NSArray)` (exposing the generated code to ease subclassing)
* Added `.ctor (params NSString[])`
* Added `.ctor (params string[])`
* Added `.ctor (params UIImage[])`

Also adds unit tests for all of them.

https://bugzilla.xamarin.com/show_bug.cgi?id=33163
2017-01-11 21:17:51 -05:00
Sebastien Pouliot 94c4a90c19 [watchos][objcruntime] Avoid extra unneeded (for the platform) code/symbols for NSLog (#1472) 2017-01-11 19:32:42 -05:00
Sebastien Pouliot 1dbffeb3f8 [foundation] Return an empty NSArray that is valid for both managed and native side (#1473)
The existing code was cheating and returned a managed only instance with a `nil` handle. That was fine in many cases but some API (e.g. UISegmentedControl) don't like that (i.e. don't react like a normal, empty NSArray was supplied). It's also the right thing to do since the current behaviour is not guaranteed to remain identical on future updates of the OS.

Unit tests updated.
2017-01-11 19:32:16 -05:00
Sebastien Pouliot c98126eeda [passkit] Fix [Model] in public API w/workarounds 2017-01-11 17:34:48 -05:00
Sebastien Pouliot 9577b9ac42 [networkextension] Fix [Model] in public API w/workarounds 2017-01-11 16:17:41 -05:00
Chris Hamons ffe142d0b5 [XM] AOT support in Xamarin.Mac (#1340) 2017-01-11 14:10:39 -06:00
Rolf Bjarne Kvinge 8e229908df [runtime] Blocks must be copied, not just assigned. Fixes #44568. (#1471)
The completion handler block must be copied to the XamarinHttpConnection
instance, otherwise we'll just store a pointer to a stack block, and once we
invoke the block we'll access stack memory (probably from another thread),
which is really not what we want to do.

https://bugzilla.xamarin.com/show_bug.cgi?id=44568
2017-01-11 19:45:38 +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
Alex Soto 045493b77c Merge pull request #1465 from dalexsoto/bug51212
[generator] Provide a better error than BI0000 when gets a TypeloadException in NeedStret
2017-01-10 17:54:09 -06:00
Sebastien Pouliot 33b7d2e23b [tests] Fix monotouch-test to execute when Link All is used (#1464)
Code inside the category needs to be preserved, since it's not
directly used by C# code.

reference:
https://bugzilla.xamarin.com/show_bug.cgi?id=51335
2017-01-10 17:28:19 -05:00
Timothy Risi b4266d66a8 Fix NSFormatter.IsPartialStringValid. Fixes #50407 (#1456)
https://bugzilla.xamarin.com/show_bug.cgi?id=50407
2017-01-10 16:41:41 -05:00
Sebastien Pouliot 1559248e49 [avfoundation] Fix [Model] in public API w/workarounds 2017-01-10 16:15:06 -05:00
Sebastien Pouliot 08c54f7914 [msbuild] Fix how UnpackLibraryResources handles mscorlib.dll (and potentially other framework assemblies) (#1011)
Target _UnpackLibraryResources:
	Task "UnpackLibraryResources"
		Using task UnpackLibraryResources from Xamarin.MacDev.Tasks.UnpackLibraryResources, Xamarin.MacDev.Tasks, Version=1.0.6128.15885, Culture=neutral, PublicKeyToken=null
		UnpackLibraryResources Task
		  Prefix: monotouch
		  IntermediateOutputPath: obj/iPhone/Debug/
		  NoOverwrite:
		    obj/iPhone/Debug/ibtool-link/LaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib
		    obj/iPhone/Debug/ibtool-link/LaunchScreen.storyboardc/Info.plist
		    obj/iPhone/Debug/ibtool-link/LaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib
		    obj/iPhone/Debug/ibtool-link/Main.storyboardc/BYZ-38-t0r-view-8bC-Xf-vdC.nib
		    obj/iPhone/Debug/ibtool-link/Main.storyboardc/Info.plist
		    obj/iPhone/Debug/ibtool-link/Main.storyboardc/UIViewController-BYZ-38-t0r.nib
		  ReferencedLibraries:
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Xml.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
		    /Users/poupou/Downloads/LinkingTest-2/RMSDKWrapper/bin/Debug//RMSDKWrapper.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//mscorlib.dll
		    /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//mscorlib.dll
		  Skipping framework assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll
		  Skipping framework assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Xml.dll
		  Skipping framework assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll
		  Skipping framework assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
		  Inspecting assembly: /Users/poupou/Downloads/LinkingTest-2/RMSDKWrapper/bin/Debug//RMSDKWrapper.dll
		  Inspecting assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//mscorlib.dll
		  Inspecting assembly: /Users/poupou/git/xamarin/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS//mscorlib.dll
	Done executing task "UnpackLibraryResources"
	Done building target "_UnpackLibraryResources" in project "/Users/poupou/Downloads/LinkingTest-2/LinkingTest/LinkingTest.csproj".

The above log excerpt shows two issues:

1. mscorlib.dll is needlessly inspected as it's **not** considered a
   "framework" assembly.

   The current check was checking *how* it was resolved and not *where*
   it was resolved to. The later is the most important as it's possible
   for other assemblies to have direct paths references and we do not
   want to process them.

   This is fixed by comparing each assembly path with the (now) provided
   `TargetFrameworkDirectory`

2. mscorlib.dll is inspected twice

   That's because it's present two times in the task's input. That issue
   is upstream (not sure why) of the current task but it makes #1 twice
   as costly. The fix for #1 indirectly fix that too.

Future
------

It's worth investigating to move that logic into `mtouch`. The later must
already load all assemblies and is in charge of removing other embedded
data (e.g. native code from bindings) from the assemblies (so they are not
shipped both inside and outside the .dll in the final .app). This makes
this task seems extraneous work.

Considering that my current test case, `RMSDKWrapper.dll`, is 1.3GB in
size it's easy to see that the extra load (which has nothing to be
extracted wrt resources*) is quite visible in build time.

>  3268.201 ms  UnpackLibraryResources                                  1 calls

* it has for bindings but that's already handled by mtouch
2017-01-10 15:03:00 -05:00
Alex Soto 5f85ec618e [generator] Provide a better error than BI0000 when gets a TypeloadException in NeedStret
https://bugzilla.xamarin.com/show_bug.cgi?id=51212

Generator gets a TypeLoadException when the runtime can't load a
bad struct, we now provide a better error msg.
2017-01-10 13:43:13 -06:00
Jeffrey Stedfast 551c0be103 [msbuild] Use Xcode-specific versions of some command-line tools (#1462)
The `strip` command was already doing this, but `ar` and `dsymutil`
were using /usr/bin versions (which might not exist, depending on
the Xcode installation).
2017-01-10 13:58:22 -05:00
Rolf Bjarne Kvinge 6e987418f7 Bump maccore to get fix for launching watch apps in the simulator. (#1458) 2017-01-10 18:51:56 +01:00
Rolf Bjarne Kvinge f771761b32 Merge pull request #1444 from rolfbjarne/xharness-add-device-support
[xharness] Major rewrite (add server mode, add device support, add today extension support).
2017-01-10 17:29:37 +01:00
Sebastien Pouliot 8f2a05e6de [watchos] Fix API wrt new [Model] tests
references:
[FAIL] `NSUrlSession.FromConfiguration` includes a paramater of type `NSUrlSessionDelegate` which is a concrete type `[Model]` and not an interface `[Protocol]`
[FAIL] `NSFileCoordinator..ctor` includes a paramater of type `NSFilePresenter` which is a concrete type `[Model]` and not an interface `[Protocol]`
2017-01-10 10:51:49 -05:00
Sebastien Pouliot 5f72a25f5f Merge branch 'master' into intro-model 2017-01-10 09:05:07 -05:00
Jeffrey Stedfast 9c8a5fa28c [msbuild] Don't use a timestamped directory for the IPA (#1382)
* [msbuild] Don't use a timestamped directory for the IPA

After discussion with Mikayla Hutchinson and Madhuri Gummalla,
this naming convention is annoying to customers so just put
the *.ipa in the bin directory. This also has the added
benefit that the *.ipa will be cleaned up with /t:Clean

* [msbuild] Fixed wildcard expansion for deleting the *.ipa file

* [msbuild] Add the zipped *.ipa file to the FileWrites item group

* [msbuild] s/TaskProperty/TaskParameter/
2017-01-09 16:11:50 -05:00
Rolf Bjarne Kvinge c9d8c0af67 [jenkins] Automatically expand failed tests. 2017-01-09 20:30:11 +01:00
Rolf Bjarne Kvinge c1f4639025 [jenkins] List ignored tests in the list of test states. 2017-01-09 20:28:43 +01:00
Rolf Bjarne Kvinge be129af6da [jenkins] Rework javascript a bit to avoid eval.
`eval` isn't allowed in Jenkin's HTML publisher because of security concerns,
so try to avoid it.
2017-01-09 20:27:52 +01:00
Chris Hamons e33b78fd7a Fix inverted null check in MobileCoreServices (#1455)
https://bugzilla.xamarin.com/show_bug.cgi?id=51299
2017-01-09 12:55:57 -06:00
Rolf Bjarne Kvinge e310fc62f7 [tests] Add comment explaining why we need a dummy test in the today app container. 2017-01-09 17:53:24 +01:00
Rolf Bjarne Kvinge 1d20b18889 Revert "[msbuild] Moved _CompileToNative so it runs after importing the app extension" (#1454) 2017-01-09 17:38:20 +01:00
Rolf Bjarne Kvinge fcf98d4d3e [jenkins] Only show the running status if we're in server mode. 2017-01-09 17:03:24 +01:00