summaryrefslogtreecommitdiff
path: root/tests/src/CLRTest.Execute.Batch.targets
diff options
context:
space:
mode:
authorGaurav Khanna <gkhanna@microsoft.com>2016-03-28 10:54:20 -0700
committerGaurav Khanna <gkhanna@microsoft.com>2016-04-04 07:43:27 -0700
commitbe17b1f867a15164911503850f562739fabbaf9f (patch)
treebec5824f351e0e86e3a9025044d6c2973995c019 /tests/src/CLRTest.Execute.Batch.targets
parentbd05196930765de1e2ce2518904be1357128a578 (diff)
downloadcoreclr-be17b1f867a15164911503850f562739fabbaf9f.tar.gz
coreclr-be17b1f867a15164911503850f562739fabbaf9f.tar.bz2
coreclr-be17b1f867a15164911503850f562739fabbaf9f.zip
Fix to add error checks for crossgen compilation
Diffstat (limited to 'tests/src/CLRTest.Execute.Batch.targets')
-rw-r--r--tests/src/CLRTest.Execute.Batch.targets17
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/src/CLRTest.Execute.Batch.targets b/tests/src/CLRTest.Execute.Batch.targets
index 4d0f6959d1..03fb5b73e1 100644
--- a/tests/src/CLRTest.Execute.Batch.targets
+++ b/tests/src/CLRTest.Execute.Batch.targets
@@ -36,12 +36,25 @@ WARNING: When setting properties based on their current state (for example:
<!-- CrossGen will create output if it needs to crossgen. Otherwise there will be silence. -->
<CrossgenBatchScript Condition="'$(CLRTestKind)' == 'RunOnly'">
<![CDATA[
-if not exist "$([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)).Replace(".exe", ".ni.exe"))""%CORE_ROOT%\crossgen.exe" /Platform_Assemblies_Paths %CORE_ROOT%%3B. $([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)))
+if not exist "$([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)).Replace(".exe", ".ni.exe"))" (
+"%CORE_ROOT%\crossgen.exe" /Platform_Assemblies_Paths %CORE_ROOT%%3B%~dp0 $([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)))
+IF NOT "!ERRORLEVEL!"=="0" (
+ ECHO Crossgen failed with exitcode - !ERRORLEVEL!
+ Exit /b 1
+ )
+)
]]>
</CrossgenBatchScript>
<CrossgenBatchScript Condition="'$(CLRTestKind)' == 'BuildAndRun'">
<![CDATA[
-if not exist "$(MSBuildProjectName).ni.exe" "%CORE_ROOT%\crossgen.exe" /Platform_Assemblies_Paths %CORE_ROOT%%3B%~dp0 $(MSBuildProjectName).exe
+if not exist "$(MSBuildProjectName).ni.exe" (
+ echo "%CORE_ROOT%\crossgen.exe" /Platform_Assemblies_Paths %CORE_ROOT%%3B%~dp0 $(MSBuildProjectName).exe
+ "%CORE_ROOT%\crossgen.exe" /Platform_Assemblies_Paths %CORE_ROOT%%3B%~dp0 $(MSBuildProjectName).exe
+ IF NOT "!ERRORLEVEL!"=="0" (
+ ECHO Crossgen failed with exitcode - !ERRORLEVEL!
+ Exit /b 1
+ )
+ )
]]>
</CrossgenBatchScript>
</PropertyGroup>