summaryrefslogtreecommitdiff
path: root/tests/src/CLRTest.Execute.Batch.targets
diff options
context:
space:
mode:
authorBryan P. Arant <bryanar@microsoft.com>2015-10-22 18:15:39 -0700
committerBryan P. Arant <bryanar@microsoft.com>2015-10-22 18:15:39 -0700
commit76f7dfbcbe226985deb4ff25a0c9dc7ffe3ffed5 (patch)
tree938da5a17575e44ce6df03501a1f5ec17ac114c4 /tests/src/CLRTest.Execute.Batch.targets
parenta7c205d15936a409b250970b3830be0f3561d2c3 (diff)
parent3ff774096c0a6634911db24a8406d3ca1466a289 (diff)
downloadcoreclr-76f7dfbcbe226985deb4ff25a0c9dc7ffe3ffed5.tar.gz
coreclr-76f7dfbcbe226985deb4ff25a0c9dc7ffe3ffed5.tar.bz2
coreclr-76f7dfbcbe226985deb4ff25a0c9dc7ffe3ffed5.zip
Merge pull request #1832 from bryanar/enable_crossgen_tests
- Changes required to enable crossgen on the tests. - Added priority level parameter to buildtest.cmd - Added crossgen parameter to buildtest.cmd - Updated testing documentation to reflect prioritylevel testing, and crossgen testing.
Diffstat (limited to 'tests/src/CLRTest.Execute.Batch.targets')
-rw-r--r--tests/src/CLRTest.Execute.Batch.targets51
1 files changed, 47 insertions, 4 deletions
diff --git a/tests/src/CLRTest.Execute.Batch.targets b/tests/src/CLRTest.Execute.Batch.targets
index 8f3a726813..c4b62392d7 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
@@ -53,9 +77,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)
@@ -107,6 +133,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>
@@ -119,9 +152,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)" />
@@ -197,6 +234,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