Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Nattress <nattress@gmail.com>2017-01-21 02:29:06 +0300
committerGitHub <noreply@github.com>2017-01-21 02:29:06 +0300
commita8e83020658bc908fe6f829fba828ec04905d440 (patch)
tree8e7b77d3c120b03cb0bc86bf60443b62383897d3 /tests/CoreCLR
parent56a82fa2f0784762adc44ce290afac6326a1018f (diff)
parent14e3ad3e69a77f925fd4d40b52be42c622eabcf3 (diff)
Merge pull request #2553 from nattress/coreclrtests_unix
Run CoreCLR tests on Unix
Diffstat (limited to 'tests/CoreCLR')
-rw-r--r--tests/CoreCLR/Test.csproj2
-rwxr-xr-xtests/CoreCLR/corerun30
-rwxr-xr-x[-rw-r--r--]tests/CoreCLR/runtest/runtest.sh21
-rw-r--r--tests/CoreCLR/runtest/testsFailingOutsideWindows.txt0
-rw-r--r--tests/CoreCLR/runtest/testsUnsupportedOutsideWindows.txt0
5 files changed, 50 insertions, 3 deletions
diff --git a/tests/CoreCLR/Test.csproj b/tests/CoreCLR/Test.csproj
index 7d527b0f0..12021e49d 100644
--- a/tests/CoreCLR/Test.csproj
+++ b/tests/CoreCLR/Test.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetName>$(TestFileName)</TargetName>
- <TargetExt>.Exe</TargetExt>
+ <TargetExt>.exe</TargetExt>
<OutputType>Exe</OutputType>
<OutputPath>$(MSBuildProjectDirectory)\</OutputPath>
<IntermediateOutputPath>$(MSBuildProjectDirectory)\</IntermediateOutputPath>
diff --git a/tests/CoreCLR/corerun b/tests/CoreCLR/corerun
new file mode 100755
index 000000000..88a5eeb0c
--- /dev/null
+++ b/tests/CoreCLR/corerun
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+
+# This is the Unix equivalent of build-and-run-test.cmd
+# It is invoked by each test's bash script. The reason it's called corerun is that
+# the unix CoreCLR tests don't have a custom runner override environment variable.
+# See issue https://github.com/dotnet/coreclr/issues/9007
+
+export TestExecutable=$1
+export TestFileName=${TestExecutable%.*}
+
+cp $CoreRT_TestRoot/CoreCLR/Test.csproj .
+
+__msbuild_dir=${CoreRT_TestRoot}/../Tools
+echo ${__msbuild_dir}/msbuild.sh /m /p:IlcPath=${CoreRT_ToolchainDir} /p:Configuration=${CoreRT_BuildType} Test.csproj
+${__msbuild_dir}/msbuild.sh /m /p:IlcPath=${CoreRT_ToolchainDir} /p:Configuration=${CoreRT_BuildType} Test.csproj
+
+# Some tests (interop) have native artifacts they depend on. Copy all DLLs to be sure we have them.
+cp *.dll native/ 2>/dev/null
+
+# Remove the test executable from the arg list so it isn't passed to test execution
+shift
+
+native/${TestFileName} $*
+
+testScriptExitCode=$?
+
+# Clean up test binary artifacts to save space
+rm -r native 2>/dev/null
+
+exit $testScriptExitCode
diff --git a/tests/CoreCLR/runtest/runtest.sh b/tests/CoreCLR/runtest/runtest.sh
index 0c1124f31..6e227ee42 100644..100755
--- a/tests/CoreCLR/runtest/runtest.sh
+++ b/tests/CoreCLR/runtest/runtest.sh
@@ -61,6 +61,7 @@ function print_usage {
echo ' --build-overlay-only : Exit after overlay directory is populated'
echo ' --limitedDumpGeneration : Enables the generation of a limited number of core dumps if test(s) crash, even if ulimit'
echo ' is zero when launching this script. This option is intended for use in CI.'
+ echo ' --logdir=<log folder> : Specifies a folder to emit logs to. Default is test root folder.'
echo ''
echo 'Runtime Code Coverage options:'
echo ' --coreclr-coverage : Optional argument to get coreclr code coverage reports'
@@ -126,7 +127,7 @@ fi
find . -type f -name "local_dumplings.txt" -exec rm {} \;
function xunit_output_begin {
- xunitOutputPath=$testRootDir/coreclrtests.xml
+ xunitOutputPath=$__LogDir/testResults.xml
xunitTestOutputPath=${xunitOutputPath}.test
if [ -e "$xunitOutputPath" ]; then
rm -f -r "$xunitOutputPath"
@@ -792,6 +793,12 @@ function finish_remaining_tests {
function prep_test {
local scriptFilePath=$1
+ # Skip any test that's not in the current playlist, if a playlist was
+ # given to us.
+ if [ -n "$playlistFile" ] && ! is_playlist_test "$scriptFilePath"; then
+ return
+ fi
+
test "$verbose" == 1 && echo "Preparing $scriptFilePath"
if [ ! "$noLFConversion" == "ON" ]; then
@@ -1076,6 +1083,9 @@ do
--limitedDumpGeneration)
limitedCoreDumps=ON
;;
+ --logdir=*)
+ __LogDir=${i#*=}
+ ;;
*)
echo "Unknown switch: $i"
print_usage
@@ -1105,6 +1115,10 @@ if [ ! -d "$testRootDir" ]; then
exit $EXIT_CODE_EXCEPTION
fi
+if [ -z "$__LogDir" ]; then
+ __LogDir=$testRootDir
+fi
+
# Copy native interop test libraries over to the mscorlib path in
# order for interop tests to run on linux.
if [ -z "$mscorlibDir" ]; then
@@ -1178,7 +1192,10 @@ fi
if [ "$ARCH" == "x64" ]
then
scriptPath=$(dirname $0)
- ${scriptPath}/setup-runtime-dependencies.sh --outputDir=$coreOverlayDir
+ # Disabled for CoreRT
+ # This is how CoreCLR sets up GCStress. We will probably go the .NET Native route
+ # when we get to GC Stress though.
+ #${scriptPath}/setup-runtime-dependencies.sh --outputDir=$coreOverlayDir
else
echo "Skip preparing for GC stress test. Dependent package is not supported on this architecture."
fi
diff --git a/tests/CoreCLR/runtest/testsFailingOutsideWindows.txt b/tests/CoreCLR/runtest/testsFailingOutsideWindows.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/CoreCLR/runtest/testsFailingOutsideWindows.txt
diff --git a/tests/CoreCLR/runtest/testsUnsupportedOutsideWindows.txt b/tests/CoreCLR/runtest/testsUnsupportedOutsideWindows.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/tests/CoreCLR/runtest/testsUnsupportedOutsideWindows.txt