summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorGleb Balykov <g.balykov@samsung.com>2020-07-13 16:44:25 +0300
committerAlexander Soldatov/AI Compiler Lab /SRR/Staff Engineer/Samsung Electronics <soldatov.a@samsung.com>2020-07-23 16:00:54 +0300
commit497415b1aa2b7d43f2d0fd16b94235d5c75007a5 (patch)
treeb4db5c1bad8622a5b28b4f7f157f8b23a8f5090c /tests/src
parentdc8a20f7da7313d22fb35a7ddb72cf98b91a43a1 (diff)
downloadcoreclr-497415b1aa2b7d43f2d0fd16b94235d5c75007a5.tar.gz
coreclr-497415b1aa2b7d43f2d0fd16b94235d5c75007a5.tar.bz2
coreclr-497415b1aa2b7d43f2d0fd16b94235d5c75007a5.zip
[Tizen] Add updated scripts to run tests
- CLRTest.CrossGen.targets is used as a template for crossgen part of individual test script - runtest.sh is used for launching tests
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/CLRTest.CrossGen.targets85
1 files changed, 40 insertions, 45 deletions
diff --git a/tests/src/CLRTest.CrossGen.targets b/tests/src/CLRTest.CrossGen.targets
index 9dc441f636..efbe05732b 100644
--- a/tests/src/CLRTest.CrossGen.targets
+++ b/tests/src/CLRTest.CrossGen.targets
@@ -41,29 +41,47 @@ WARNING: When setting properties based on their current state (for example:
if [ ! -z ${RunCrossGen+x} ]%3B then
export COMPlus_ZapRequire=$(ZapRequire)
export COMPlus_ZapRequireList=$(MSBuildProjectName)
- if [ ! -f $(MSBuildProjectName).org ]%3B then
- TakeLock
- if [ ! -f $(MSBuildProjectName).org ]%3B then
- mkdir IL
- cp $(MSBuildProjectName).exe IL/$(MSBuildProjectName).exe
- mv $(MSBuildProjectName).exe $(MSBuildProjectName).org
- echo $_DebuggerFullPath "$CORE_ROOT/crossgen" /Platform_Assemblies_Paths $CORE_ROOT%3A$PWD/IL%3A$PWD /in $(MSBuildProjectName).org /out $(MSBuildProjectName).exe
- $_DebuggerFullPath "$CORE_ROOT/crossgen" /Platform_Assemblies_Paths $CORE_ROOT%3A$PWD/IL%3A$PWD /in $(MSBuildProjectName).org /out $(MSBuildProjectName).exe
- __cgExitCode=$?
- if [ $__cgExitCode -ne 0 ]
- then
- echo Crossgen failed with exitcode: $__cgExitCode
- ReleaseLock
- exit 1
- fi
- fi
- ReleaseLock
- fi
-fi
- ]]>
+
+ if [ -d IL ]%3B then
+ echo Inconsistency, IL dir already exists, reinstall tests
+ exit 1
+ fi
+
+ mkdir IL
+ cp *.{dll,exe} IL/
+
+ __Command="$CORE_ROOT/crossgen $CrossGenOptions /p $CORE_ROOT%3A$PWD/IL /in $PWD/IL/$(MSBuildProjectName).exe /out $PWD/$(MSBuildProjectName).ni.exe"
+
+ echo "Running CrossGen: $__Command"
+ $__Command
+ __cgExitCode=$?
+ if [ $__cgExitCode -ne 0 ]
+ then
+ mv IL/* .
+ rm -rf $(MSBuildProjectName).ni.exe
+ rm -rf IL
+ echo Crossgen failed with exitcode: $__cgExitCode
+ exit 1
+ fi
+
+ # Need to copy this to coreroot so that ni gets into TPA list (it's not loaded otherwise)
+ mv $(MSBuildProjectName).ni.exe $CORE_ROOT
+fi
+ ]]>
</CrossgenBashScript>
+ <CrossgenCleanupBashScript Condition="'$(CLRTestKind)' == 'BuildAndRun' and '$(CrossGenTest)' != 'false'">
+ <![CDATA[
+if [ ! -z ${RunCrossGen+x} ] || [ ! -z ${RunCrossGen2+x} ]%3B then
+ mv IL/* .
+ rm -rf $CORE_ROOT/$(MSBuildProjectName).ni.exe
+ rm -rf IL
+fi
+ ]]>
+ </CrossgenCleanupBashScript>
+
<BashCLRTestPreCommands>$(BashCLRTestPreCommands);$(CrossgenBashScript)</BashCLRTestPreCommands>
+ <BashCLRTestPostCommands>$(BashCLRTestPostCommands);$(CrossgenCleanupBashScript)</BashCLRTestPostCommands>
</PropertyGroup>
</Target>
@@ -73,29 +91,6 @@ fi
<CrossgenBatchScript Condition="'$(CLRTestKind)' == 'BuildAndRun'">
<![CDATA[
-REM CrossGen Script
-if defined RunCrossGen (
- if defined LargeVersionBubble ( set OptionalArguments=!OptionalArguments! /largeversionbubble)
- set COMPlus_ZapRequire=$(ZapRequire)
- set COMPlus_ZapRequireList=$(MSBuildProjectName)
- if not exist "$(MSBuildProjectName).org" (
- call :TakeLock
- set CrossGenStatus=0
- if not exist "$(MSBuildProjectName).org" (
- mkdir IL
- copy $(MSBuildProjectName).exe IL\$(MSBuildProjectName).exe
- ren $(MSBuildProjectName).exe $(MSBuildProjectName).org
- echo "%_DebuggerFullPath% %CORE_ROOT%\crossgen.exe" !OptionalArguments! /Platform_Assemblies_Paths %CORE_ROOT%%3B%25cd%25\IL%3B%25cd%25 /in $(MSBuildProjectName).org /out $(MSBuildProjectName).exe
- %_DebuggerFullPath% "%CORE_ROOT%\crossgen.exe" !OptionalArguments! /Platform_Assemblies_Paths %CORE_ROOT%%3B%25cd%25\IL%3B%25cd%25 /in $(MSBuildProjectName).org /out $(MSBuildProjectName).exe
- set CrossGenStatus=!ERRORLEVEL!
- )
- call :ReleaseLock
- IF NOT !CrossGenStatus!==0 (
- ECHO Crossgen failed with exitcode - !CrossGenStatus!
- Exit /b 1
- )
- )
-)
]]>
</CrossgenBatchScript>
@@ -104,5 +99,5 @@ if defined RunCrossGen (
</Target>
-
-</Project> \ No newline at end of file
+
+</Project>