From a08d45d8dab3e8a0154d2e9fbc51afd3dd4159df Mon Sep 17 00:00:00 2001 From: Bruce Forstall Date: Fri, 21 Sep 2018 15:50:17 -0700 Subject: [PATCH 1/2] Move run-tests.sh from corefx This is the script used by Jenkins to run arm32/arm64 corefx testing in the coreclr repo. Leave the original one around, in case anyone uses it. Name it run-corefx-tests.sh, to more closely model what we have for Windows arm/arm64 corefx testing. --- netci.groovy | 5 +- tests/scripts/run-corefx-tests.sh | 439 ++++++++++++++++++++++++++++++ 2 files changed, 440 insertions(+), 4 deletions(-) create mode 100644 tests/scripts/run-corefx-tests.sh diff --git a/netci.groovy b/netci.groovy index c67fa6a5510b..59e14b36789e 100755 --- a/netci.groovy +++ b/netci.groovy @@ -2487,7 +2487,6 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR Utilities.addArchival(newJob, "${workspaceRelativeFxRootLinux}/fxruntime.zip") Utilities.addArchival(newJob, "${workspaceRelativeFxRootLinux}/fxtests.zip") - Utilities.addArchival(newJob, "${workspaceRelativeFxRootLinux}/run-test.sh") } else if (isCrossGenComparisonScenario(scenario)) { buildCommands += "${dockerCmd}\${WORKSPACE}/build-test.sh ${lowerConfiguration} ${architecture} cross generatelayoutonly" @@ -3358,8 +3357,6 @@ def static CreateOtherTestJob(def dslFactory, def project, def branch, def archi shell("mkdir -p ${workspaceRelativeFxRootLinux}") shell("wget --progress=dot:giga --directory-prefix=${workspaceRelativeFxRootLinux} ${inputUrlRoot}/${workspaceRelativeFxRootLinux}/fxtests.zip") shell("wget --progress=dot:giga --directory-prefix=${workspaceRelativeFxRootLinux} ${inputUrlRoot}/${workspaceRelativeFxRootLinux}/fxruntime.zip") - shell("wget --progress=dot:giga --directory-prefix=${workspaceRelativeFxRootLinux} ${inputUrlRoot}/${workspaceRelativeFxRootLinux}/run-test.sh") - shell("chmod +x ${workspaceRelativeFxRootLinux}/run-test.sh") } else { shell("wget --progress=dot:giga ${inputUrlRoot}/testnativebin.${lowerConfiguration}.zip") @@ -3455,7 +3452,7 @@ def static CreateOtherTestJob(def dslFactory, def project, def branch, def archi if (doCoreFxTesting) { shell("""\ -\${WORKSPACE}/${workspaceRelativeFxRootLinux}/run-test.sh --sequential --test-exclude-file \${WORKSPACE}/tests/${architecture}/corefx_linux_test_exclusions.txt --runtime \${WORKSPACE}/${workspaceRelativeFxRootLinux}/bin/testhost/netcoreapp-Linux-Release-${architecture} --arch ${architecture} --corefx-tests \${WORKSPACE}/${workspaceRelativeFxRootLinux}/bin --configurationGroup Release""") +\${WORKSPACE}/tests/scripts/run-corefx-tests.sh --sequential --test-exclude-file \${WORKSPACE}/tests/${architecture}/corefx_linux_test_exclusions.txt --runtime \${WORKSPACE}/${workspaceRelativeFxRootLinux}/bin/testhost/netcoreapp-Linux-Release-${architecture} --arch ${architecture} --corefx-tests \${WORKSPACE}/${workspaceRelativeFxRootLinux}/bin --configurationGroup Release""") } else { def runScript = "${dockerCmd}./tests/runtest.sh" diff --git a/tests/scripts/run-corefx-tests.sh b/tests/scripts/run-corefx-tests.sh new file mode 100644 index 000000000000..7173f2a08777 --- /dev/null +++ b/tests/scripts/run-corefx-tests.sh @@ -0,0 +1,439 @@ +#!/usr/bin/env bash + +wait_on_pids() +{ + # Wait on the last processes + for job in $1 + do + wait $job + if [ "$?" -ne 0 ] + then + TestsFailed=$(($TestsFailed+1)) + fi + done +} + +usage() +{ + echo "Runs .NET CoreFX tests on FreeBSD, Linux, NetBSD or OSX" + echo "usage: run-test [options]" + echo + echo "Input sources:" + echo " --runtime Location of root of the binaries directory" + echo " containing the FreeBSD, Linux, NetBSD or OSX runtime" + echo " default: /bin/testhost/netcoreapp---" + echo " --corefx-tests Location of the root binaries location containing" + echo " the tests to run" + echo " default: /bin" + echo + echo "Flavor/OS/Architecture options:" + echo " --configurationGroup ConfigurationGroup to run (Debug/Release)" + echo " default: Debug" + echo " --os OS to run (FreeBSD, Linux, NetBSD or OSX)" + echo " default: detect current OS" + echo " --arch Architecture to run (x64, arm, armel, x86, arm64)" + echo " default: detect current architecture" + echo + echo "Execution options:" + echo " --sequential Run tests sequentially (default is to run in parallel)." + echo " --restrict-proj Run test projects that match regex" + echo " default: .* (all projects)" + echo " --useServerGC Enable Server GC for this test run" + echo " --test-dir Run tests only in the specified directory. Path is relative to the directory" + echo " specified by --corefx-tests" + echo " --test-dir-file Run tests only in the directories specified by the file at . Paths are" + echo " listed one line, relative to the directory specified by --corefx-tests" + echo " --test-exclude-file Do not run tests in the directories specified by the file at . Paths are" + echo " listed one line, relative to the directory specified by --corefx-tests" + echo " --timeout