diff options
author | Bryan Arant <bryanar@microsoft.com> | 2015-10-21 20:19:51 -0700 |
---|---|---|
committer | Bryan Arant <bryanar@microsoft.com> | 2015-10-22 15:26:32 -0700 |
commit | 3ff774096c0a6634911db24a8406d3ca1466a289 (patch) | |
tree | fa8d6461f471c6fd11ad6ecdf95d38c61fe18849 /tests/src/CLRTest.Execute.Batch.targets | |
parent | 4be080ee4c52211247d720e24f71d87b657357ee (diff) | |
download | coreclr-3ff774096c0a6634911db24a8406d3ca1466a289.tar.gz coreclr-3ff774096c0a6634911db24a8406d3ca1466a289.tar.bz2 coreclr-3ff774096c0a6634911db24a8406d3ca1466a289.zip |
Changes required to enable crossgen on the tests.
Diffstat (limited to 'tests/src/CLRTest.Execute.Batch.targets')
-rw-r--r-- | tests/src/CLRTest.Execute.Batch.targets | 51 |
1 files changed, 47 insertions, 4 deletions
diff --git a/tests/src/CLRTest.Execute.Batch.targets b/tests/src/CLRTest.Execute.Batch.targets index acc1eaf8eb..88ca8797f1 100644 --- a/tests/src/CLRTest.Execute.Batch.targets +++ b/tests/src/CLRTest.Execute.Batch.targets @@ -18,6 +18,30 @@ WARNING: When setting properties based on their current state (for example: --> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup> + <CLRTestEnvironmentVariable Condition="'$(CrossGen)' == 'true'" Include="set complus_zaprequire=2" /> + <CLRTestEnvironmentVariable Condition="'$(CrossGen)' == 'true'" Include="set complus_zaprequireexcludelist=corerun" /> + </ItemGroup> + <!-- + Target: GetBatchCrossgenScript + This returns the portion of the execution script that generates the required lines to crossgen the test executable. + --> + <Target + Name="GetCrossgenBatchScript" + Returns="$(CrossgenBatchScript)"> + + <PropertyGroup> +<!-- CrossGen will create output if it needs to crossgen. Otherwise there will be silence. --> + <CrossgenBatchScript Condition="'$(CLRTestKind)' == 'BuildOnly' + OR '$(CLRTestKind)' == 'BuildAndRun' + OR '$(CLRTestKind)' == 'SharedLibrary'"> + <![CDATA[ +if not exist "$(OutputPath)\$(MSBuildProjectName).ni.$(OutputType)" "%CORE_ROOT%\crossgen.exe" /Platform_Assemblies_Paths %CORE_ROOT%%3B. "$(OutputPath)\$(MSBuildProjectName).$(OutputType)" + ]]> + </CrossgenBatchScript> + </PropertyGroup> + </Target> + <!-- Target: GetExecuteCmdFullPath Return Executed Cmd Relative Full Path @@ -49,9 +73,11 @@ WARNING: When setting properties based on their current state (for example: Inputs="$(MSBuildProjectFullPath)" Outputs="$(OutputPath)\$(MSBuildProjectName).cmd"> - <PropertyGroup> + <CallTarget Targets="GetCrossgenBatchScript" Condition="'$(CrossGen)' == 'true'"> + <Output TaskParameter="TargetOutputs" PropertyName="CrossgenBatchScript"/> + </CallTarget> - <!-- TODO:2 build in debugger experience support --> + <PropertyGroup> <BatchCLRTestExitCodePrep Condition="$(_CLRTestNeedsToRun)"><![CDATA[ set CLRTestExpectedExitCode=$(CLRTestExitCode) @@ -103,6 +129,13 @@ IF NOT "%CLRTestExitCode%"=="%CLRTestExpectedExitCode%" ( <Message Text="Project depends on $(_CLRTestToRunFileFullPath)." Condition="'$(_CLRTestNeedsProjectToRun)' == 'True'" /> + <ItemGroup> + <CLRTestEnvironmentVariable Condition="'$(CrossGen)' == 'true' AND '$(_CLRTestNeedsProjectToRun)' == 'true'" Include="set complus_zaprequirelist=$(_CLRTestToRunFileFullPath)" /> + <CLRTestEnvironmentVariable Condition="'$(CrossGen)' == 'true' AND '$(_CLRTestNeedsProjectToRun)' == 'false'" Include="set complus_zaprequirelist=$(MSBuildProjectName)" /> + </ItemGroup> + + + <PropertyGroup> <_CLRTestRunFile Condition="'$(_CLRTestNeedsProjectToRun)' == 'true'">"$(_CLRTestToRunFileFullPath)"</_CLRTestRunFile> <_CLRTestRunFile Condition=" '$(CLRTestIsHosted)'=='true' And $(_CLRTestNeedsProjectToRun) ">"%CORE_ROOT%\corerun.exe" $(_CLRTestToRunFileFullPath)</_CLRTestRunFile> @@ -115,9 +148,13 @@ ECHO $(_CLRTestRunFile) %CLRTestExecutionArguments% %Host_Args% %_DebuggerFullPath% $(_CLRTestRunFile) %CLRTestExecutionArguments% %Host_Args% set CLRTestExitCode=%ERRORLEVEL% ]]></BatchCLRTestLaunchCmds> - + </PropertyGroup> + <PropertyGroup> + <BatchEnvironmentVariables> +@(CLRTestEnvironmentVariable -> '%(Identity)', '%0d%0a') + </BatchEnvironmentVariables> </PropertyGroup> - + <Message Text="MSBuildProjectDirectory:$(MSBuildProjectDirectory)" /> <Message Text="_CLRTestToRunFileFullPath:$(_CLRTestToRunFileFullPath)"/> <Message Text="_CLRTestRunFile:$(_CLRTestRunFile)" /> @@ -193,6 +230,12 @@ $(BatchCLRTestExitCodePrep) REM The __TestEnv variable may be used to specify something to run before the test. IF NOT "%__TestEnv%"=="" call %__TestEnv% +REM Environment Variables +$(BatchEnvironmentVariables) + +REM CrossGen +$(CrossgenBatchScript) + REM Precommands $(CLRTestBatchPreCommands) REM Launch |