Add Managed->Native tests for our WinRT primitives (#23529)
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Fri, 17 May 2019 00:40:23 +0000 (17:40 -0700)
committerGitHub <noreply@github.com>
Fri, 17 May 2019 00:40:23 +0000 (17:40 -0700)
commit6a2c6a4735bcec975ff94ea016ea44f7d592b918
treead0f971949859107f2772cd60300e8d9578cfcba
parentb4c2b142c700e8ec58783138aca2340ac05b24d5
Add Managed->Native tests for our WinRT primitives (#23529)

* First pass generating the contracts for the WinRT tests. Managed ones are manually written, Native are generated via C++/WinRT.

* Don't overwrite the public implementation files when we run cppwinrt

* Don't output a MIDL-processed header.

* Add default constructor for BindingViewModel.

* Partial implementation of most of the native winrt component.

* Finish implementation of native winrt component.

* Get native component building correctly (cppwinrt doesn't include wrappers for the "Windows::UI::Xaml::Interop::IBindable*" collection types.

* Add WinRT primitive marshalling tests.

* Add testing for projected types used for binding.

* Add license headers to native files.

* Disable WinRT tests on non-WinRT platforms (detection copied from CoreFX).

* Use WINDOWS_SDK_VERSION variable in all locations.

* Use Windows SDK version determined by CMake in WinRT build.

* Resolve WinMDs via globs so the build can roll between different Windows SDK versions that have required APIs seamlessly.

* Add logging of cppwinrt version.

* Try to construct path to cppwinrt when finding it

* Just directly construct the cppwinrt path.

* Remove -prefix flag from cppwinrt invocation

* PR feedback.

* Fix syntax in BindableVectorWrapper.

* Disable winrt binding test on Nano Server.

* Add enum testing. Clean up WinRT tests to hopefully build on CI (or at least fail at a later point).

* Add some more logging to try to determine why an older SDK version is being picked.

* Try to define CMAKE_SYSTEM_VERSION and see if that selects the correct SDK version (it seems to work on the build.cmd script)

* Clean up WinRT CMake now that it builds on AzDO CI.

* Disable WinRT binding test on pre-Win10V1809 systems.
47 files changed:
build-test.cmd
tests/src/Common/CoreCLRTestLibrary/Assertion.cs
tests/src/Common/CoreCLRTestLibrary/Utilities.cs
tests/src/Interop/CMakeLists.txt
tests/src/Interop/WinRT/Contracts/Component.Contracts.cs [new file with mode: 0644]
tests/src/Interop/WinRT/Contracts/Component.Contracts.idl [new file with mode: 0644]
tests/src/Interop/WinRT/Contracts/NativeComponent.cs [new file with mode: 0644]
tests/src/Interop/WinRT/Contracts/WindowsRuntimeImportAttribute.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Bindings/BindingTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Bindings/NETClientBindings.csproj [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Bindings/Program.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/ArrayTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/BooleanTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/EnumTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/ExceptionTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/KeyValuePairTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/NETClientPrimitives.csproj [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/NullableTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/Program.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/StringTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/TypeTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NETClients/Primitives/UriTests.cs [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/CMakeLists.txt [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.ArrayTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.ArrayTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.BindingProjectionsTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.BindingProjectionsTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.BindingViewModel.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.BindingViewModel.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.BooleanTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.BooleanTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.EnumTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.EnumTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.ExceptionTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.ExceptionTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.KeyValuePairTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.KeyValuePairTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.NullableTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.NullableTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.StringTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.StringTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.TypeTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.TypeTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.UriTesting.cpp [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Component.Contracts.UriTesting.h [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/Exports.def [new file with mode: 0644]
tests/src/Interop/WinRT/NativeComponent/pch.h [new file with mode: 0644]