diff options
author | Santiago Fernandez Madero <safern@microsoft.com> | 2017-04-07 01:01:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-07 01:01:36 +0300 |
commit | 3c850946db5c712c6c556efeff848fcebffcef13 (patch) | |
tree | e7734b0aa24617b32c4d7d157359003214808d35 /Tools-Override | |
parent | bf1db70da3ae2079af1ce20c6f03893f8f6216c7 (diff) |
Change netfx vertical test build and execution to be able to have helix runs (#17975)
* Change netfx vertical test bin placing and execution to be able to have runs in helix
Diffstat (limited to 'Tools-Override')
-rw-r--r-- | Tools-Override/tests.targets | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/Tools-Override/tests.targets b/Tools-Override/tests.targets index ab049d2a94..a835562911 100644 --- a/Tools-Override/tests.targets +++ b/Tools-Override/tests.targets @@ -99,7 +99,6 @@ </ItemGroup> <ItemGroup Condition="'$(BuildingNETFxVertical)' == 'true'"> <SupplementalTestData Include="$(RuntimePath)xunit.console.exe" /> - <SupplementalTestData Include="$(RuntimePath)xunit.console.exe.config" /> <SupplementalTestData Include="$(RuntimePath)xunit.execution.desktop.dll" /> </ItemGroup> </Target> @@ -124,14 +123,27 @@ </ItemGroup> </Target> - <Target Name="CopyRemoteExecutionConfigFile" - BeforeTargets="GenerateTestExecutionScripts" - Condition="'$(BuildingNETFxVertical)' == 'true' And Exists('$(TestPath)\RemoteExecutorConsoleApp.exe')"> + <!-- We need to generate a simple config file for desktop test executors to tell them to use DEVPATH environment variable to use their dependencies from there. + DEVPATH is being set for desktop runs in RunTests.cmd to the TestHostPath. We need this approach to have desktop Helix runs. --> + <Target Name="GenerateDesktopExecutorsConfigFiles" + BeforeTargets="GenerateTestExecutionScripts" + Condition="'$(BuildingNETFxVertical)' == 'true'"> + <PropertyGroup> + <XunitRunnerNetfxConfigFile>$(TestPath)\$(XunitExecutable).config</XunitRunnerNetfxConfigFile> + <RemoteExecutorConfigFile>$(TestPath)\RemoteExecutorConsoleApp.exe.config</RemoteExecutorConfigFile> + </PropertyGroup> + + <ItemGroup> + <ConfigFileLines Include="<?xml version="1.0" encoding="utf-8"?>" /> + <ConfigFileLines Include="<configuration>" /> + <ConfigFileLines Include="<runtime>" /> + <ConfigFileLines Include="<developmentMode developerInstallation="true" />" /> + <ConfigFileLines Include="</runtime>" /> + <ConfigFileLines Include="</configuration>" /> + </ItemGroup> - <Copy SourceFiles="$(RuntimePath)\xunit.console.exe.config" - DestinationFiles="$(TestPath)\RemoteExecutorConsoleApp.exe.config" - SkipUnchangedFiles="true" - /> + <WriteLinesToFile File="$(XunitRunnerNetfxConfigFile)" Lines="@(ConfigFileLines)" Overwrite="true"/> + <WriteLinesToFile Condition="Exists('$(TestPath)\RemoteExecutorConsoleApp.exe')" File="$(RemoteExecutorConfigFile)" Lines="@(ConfigFileLines)" Overwrite="true" /> </Target> <!-- Generate the script to run the tests. The script performs two high-level steps: @@ -140,7 +152,7 @@ directory. 2. Runs the tests. --> <Target Name="GenerateTestExecutionScripts" - DependsOnTargets="DiscoverTestInputs;SetupTestProperties"> + DependsOnTargets="DiscoverTestInputs;SetupTestProperties;GenerateDesktopExecutorsConfigFiles"> <PropertyGroup> <TargetOSTrait Condition="'$(TargetOS)'=='Windows_NT'">nonwindowstests</TargetOSTrait> <TargetOSTrait Condition="'$(TargetOS)'=='Linux'">nonlinuxtests</TargetOSTrait> @@ -198,6 +210,13 @@ Overwrite="true" Encoding="Ascii" /> + <!--====================================================== + Section for netfx test runs + ====================================================== --> + <ItemGroup Condition="'$(BuildingNETFxVertical)' == 'true'" > + <TestCommandLines Include="set DEVPATH=%RUNTIME_PATH%" /> + </ItemGroup> + <!--====================================================== Section for uapaot ilc test runs ====================================================== --> |