<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
- <CLRTestBashEnvironmentVariable Condition="'$(CrossGen)' == 'true'" Include="complus_zaprequire=2" />
- <CLRTestBashEnvironmentVariable Condition="'$(CrossGen)' == 'true'" Include="complus_zaprequireexcludelist=corerun" />
- <CLRTestBashEnvironmentVariable Condition="'$(GCStressLevel)' != '' and '$(GCStressLevel)' != '0'" Include="complus_gcstress=$(GCStressLevel)" />
+ <CLRTestBashEnvironmentVariable Condition="'$(CrossGen)' == 'true'" Include="export complus_zaprequire=2" />
+ <CLRTestBashEnvironmentVariable Condition="'$(CrossGen)' == 'true'" Include="export complus_zaprequireexcludelist=corerun" />
+ <CLRTestBashEnvironmentVariable Condition="'$(GCStressLevel)' != '' and '$(GCStressLevel)' != '0'" Include="export complus_gcstress=$(GCStressLevel)" />
</ItemGroup>
<!--
<CrossgenBashScript Condition="'$(CLRTestKind)' == 'RunOnly'">
<![CDATA[
if [ ! -f $([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)).Replace("\","/").Replace(".exe", ".ni.exe")) ]; then
- "$CORE_ROOT/crossgen.exe" /Platform_Assemblies_Paths $CORE_ROOT%3B. $([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)).Replace("\","/"))
+ "$CORE_ROOT/crossgen" /Platform_Assemblies_Paths $CORE_ROOT%3A$PWD $([MSBuild]::MakeRelative($(OutputPath), $(_CLRTestToRunFileFullPath)).Replace("\","/"))
+ __cgExitCode=$?
+ if [ ! $__cgExitCode == 0 ]
+ then
+ echo Crossgen failed with exitcode: $__cgExitCode
+ exit 1
+ fi
fi
]]>
</CrossgenBashScript>
<CrossgenBashScript Condition="'$(CLRTestKind)' == 'BuildAndRun'">
<![CDATA[
if [ ! -f $(MSBuildProjectName).ni.exe ]; then
- "$CORE_ROOT/crossgen" /Platform_Assemblies_Paths $CORE_ROOT%3B$PWD $(MSBuildProjectName).exe
+ echo "$CORE_ROOT/crossgen" /Platform_Assemblies_Paths $CORE_ROOT%3A$PWD $(MSBuildProjectName).exe
+ "$CORE_ROOT/crossgen" /Platform_Assemblies_Paths $CORE_ROOT%3A$PWD $(MSBuildProjectName).exe
+ __cgExitCode=$?
+ if [ ! $__cgExitCode == 0 ]
+ then
+ echo Crossgen failed with exitcode: $__cgExitCode
+ exit 1
+ fi
fi
]]>
</CrossgenBashScript>
<!-- 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>