summaryrefslogtreecommitdiff
path: root/tests/runtest.sh
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2018-03-02 11:29:29 -0800
committerBruce Forstall <brucefo@microsoft.com>2018-03-26 12:47:24 -0700
commit5952ead7831bf0a3c29424e927c58bfbb7d1380f (patch)
tree78070be2d338d51f744d6cae54bddc1260cad609 /tests/runtest.sh
parent01835496c78c66e46c0770b5321c5f814168c58f (diff)
downloadcoreclr-5952ead7831bf0a3c29424e927c58bfbb7d1380f.tar.gz
coreclr-5952ead7831bf0a3c29424e927c58bfbb7d1380f.tar.bz2
coreclr-5952ead7831bf0a3c29424e927c58bfbb7d1380f.zip
Linux arm32 testing
Add support for arm Ubuntu testing on hardware. Most JIT stress jobs are enabled. GC stress jobs are not enabled currently (they haven't been tried yet). Most jobs have both PR trigger jobs as well as weekly "cron" jobs. Job frequency will be adjusted as we gain experience with the load. Initially, there are no automatically triggered PR jobs, but I plan to add one or more soon. Moved existing arm Ubuntu (on emulator) and arm Tizen (on emulator) to use new "armem" pseudo-architecture. The arm Ubuntu jobs have the product cross-built on Ubuntu/x64 in Docker, use tests built in a new Windows_NT x86 BuildOnly (`_bld`) job, and are run on hardware after copying over all the correct artifacts. Refactored lots of code related to determining if a particular combination of os/architecture/configuration/isPR/etc. should create a job. Refactored test/flow job creation. runtest.sh now creates three files based on test results that can be fed back to runtest.sh using the `--playlist` argument: coreclrtests.pass.txt, coreclrtests.fail.txt, coreclrtests.skip.txt. New script `runtesttilstable.sh` runs `runtest.sh` in a loop, rerunning failing tests until no tests fail, or a maximum iteration count is reached (default: 4). This works around existing issues with flaky test failures on Linux/arm32 hardware. Some extraneous unused jobs have been removed, such as unused `_bld` jobs and non-PR triggered `innerloop` jobs.
Diffstat (limited to 'tests/runtest.sh')
-rwxr-xr-xtests/runtest.sh61
1 files changed, 56 insertions, 5 deletions
diff --git a/tests/runtest.sh b/tests/runtest.sh
index 64d12e7d80..d0eea533d8 100755
--- a/tests/runtest.sh
+++ b/tests/runtest.sh
@@ -100,6 +100,12 @@ countSkippedTests=0
xunitOutputPath=
xunitTestOutputPath=
+# Variables for text file output. These can be passed back to runtest.sh using the "--playlist" argument
+# to rerun specific tests.
+testsPassOutputPath=
+testsFailOutputPath=
+testsSkipOutputPath=
+
# libExtension determines extension for dynamic library files
# runtimeName determines where CoreFX Runtime files will be located
OSName=$(uname -s)
@@ -301,6 +307,49 @@ function xunit_output_end {
echo '</assemblies>' >>"$xunitOutputPath"
}
+function text_file_output_begin {
+ if [ -z "$testsPassOutputPath" ]; then
+ testsPassOutputPath=$testRootDir/coreclrtests.pass.txt
+ fi
+ if ! [ -e $(basename "$testsPassOutputPath") ]; then
+ testsPassOutputPath=$testRootDir/coreclrtests.pass.txt
+ fi
+ if [ -e "$testsPassOutputPath" ]; then
+ rm -f "$testsPassOutputPath"
+ fi
+ if [ -z "$testsFailOutputPath" ]; then
+ testsFailOutputPath=$testRootDir/coreclrtests.fail.txt
+ fi
+ if ! [ -e $(basename "$testsFailOutputPath") ]; then
+ testsFailOutputPath=$testRootDir/coreclrtests.fail.txt
+ fi
+ if [ -e "$testsFailOutputPath" ]; then
+ rm -f "$testsFailOutputPath"
+ fi
+ if [ -z "$testsSkipOutputPath" ]; then
+ testsSkipOutputPath=$testRootDir/coreclrtests.skip.txt
+ fi
+ if ! [ -e $(basename "$testsSkipOutputPath") ]; then
+ testsSkipOutputPath=$testRootDir/coreclrtests.skip.txt
+ fi
+ if [ -e "$testsSkipOutputPath" ]; then
+ rm -f "$testsSkipOutputPath"
+ fi
+}
+
+function text_file_output_add_test {
+ local scriptFilePath=$1
+ local testResult=$2 # Pass, Fail, or Skip
+
+ if [ "$testResult" == "Pass" ]; then
+ echo "$scriptFilePath" >>"$testsPassOutputPath"
+ elif [ "$testResult" == "Skip" ]; then
+ echo "$scriptFilePath" >>"$testsSkipOutputPath"
+ else
+ echo "$scriptFilePath" >>"$testsFailOutputPath"
+ fi
+}
+
function exit_with_error {
local errorSource=$1
local errorMessage=$2
@@ -820,11 +869,11 @@ function finish_test {
header=$header$(printf "[%4ds]" $testRunningTime)
fi
- local xunitTestResult
+ local testResult
case $testScriptExitCode in
0)
let countPassedTests++
- xunitTestResult='Pass'
+ testResult='Pass'
if ((verbose == 1 || runFailingTestsOnly == 1)); then
echo "PASSED - ${header}${scriptFilePath}"
else
@@ -833,12 +882,12 @@ function finish_test {
;;
2)
let countSkippedTests++
- xunitTestResult='Skip'
+ testResult='Skip'
echo "SKIPPED - ${header}${scriptFilePath}"
;;
*)
let countFailedTests++
- xunitTestResult='Fail'
+ testResult='Fail'
echo "FAILED - ${header}${scriptFilePath}"
;;
esac
@@ -850,7 +899,8 @@ function finish_test {
done <"$outputFilePath"
fi
- xunit_output_add_test "$scriptFilePath" "$outputFilePath" "$xunitTestResult" "$testScriptExitCode" "$testRunningTime"
+ xunit_output_add_test "$scriptFilePath" "$outputFilePath" "$testResult" "$testScriptExitCode" "$testRunningTime"
+ text_file_output_add_test "$scriptFilePath" "$testResult"
}
function finish_remaining_tests {
@@ -1258,6 +1308,7 @@ then
fi
xunit_output_begin
+text_file_output_begin
create_core_overlay
precompile_overlay_assemblies