diff options
author | Andon Andonov <anandono@microsoft.com> | 2018-07-09 10:45:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-09 10:45:24 -0700 |
commit | 7baedfdafb6979f48026ed7e01de4b6cc14b3bba (patch) | |
tree | 3f27c6abf39acb2629ef4d93b5e76f3210a95d8e | |
parent | 4349690ec1c81a28c14ba2801240c94f3f79dec4 (diff) | |
download | coreclr-7baedfdafb6979f48026ed7e01de4b6cc14b3bba.tar.gz coreclr-7baedfdafb6979f48026ed7e01de4b6cc14b3bba.tar.bz2 coreclr-7baedfdafb6979f48026ed7e01de4b6cc14b3bba.zip |
CoreFX CI Unix Staging commit (#18750)
* Modify netci.groovy
* Add script exit codes
* Ad PR Triggers for Ubuntu and OSX10.12
* Remove release PR triggers
* Rename arch
Remove IsJitStressTestScenario assert
* Add correct asserts
* Reformat conditions and add triggers for Release/Checked/Debug
* Change %WORKSPACE% to \${WORKSPACE}
-rwxr-xr-x | build-test.sh | 5 | ||||
-rwxr-xr-x | netci.groovy | 82 | ||||
-rwxr-xr-x | tests/runtest.sh | 10 |
3 files changed, 73 insertions, 24 deletions
diff --git a/build-test.sh b/build-test.sh index 5339dc1116..b5badd09ab 100755 --- a/build-test.sh +++ b/build-test.sh @@ -384,6 +384,7 @@ usage() echo "verbose - optional argument to enable verbose build output." echo "rebuild - if tests have already been built - rebuild them" echo "generatelayoutonly - only pull down dependencies and build coreroot" + echo "generatetesthostonly - only pull down dependencies and build coreroot and the CoreFX testhost" echo "buildagainstpackages - pull down and build using packages." echo "runtests - run tests after building them" echo "ziptests - zips CoreCLR tests & Core_Root for a Helix run" @@ -641,6 +642,10 @@ while :; do __GenerateLayoutOnly=1 ;; + generatetesthostonly) + exit 0 + ;; + buildagainstpackages) __BuildAgainstPackagesArg=1 ;; diff --git a/netci.groovy b/netci.groovy index d01267441a..9a9cae0c1b 100755 --- a/netci.groovy +++ b/netci.groovy @@ -1554,6 +1554,17 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") break } + + else if (scenario == 'corefx_innerloop') { + if (configuration == 'Checked') { + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} CoreFX Tests") + } + else { + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} CoreFX Tests", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+CoreFX Tests.*") + } + break + } + // fall through case 'OSX10.12': @@ -1615,6 +1626,12 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, } break + case 'corefx_innerloop': + if (configuration == 'Checked') { + Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} CoreFX Tests") + } + break + default: if (isJitStressScenario(scenario)) { def displayStr = getStressModeDisplayName(scenario) @@ -1732,7 +1749,7 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os, Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} via ILLink", "(?i).*test\\W+${os}\\W+${architecture}\\W+${configuration}\\W+${scenario}.*") break case 'corefx_innerloop': - if (configuration == 'Release' || configuration == 'Checked') { + if (configuration == 'Checked') { Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} CoreFX Tests") } break @@ -2203,10 +2220,11 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR // Create CORE_ROOT and testhost buildCommands += "build-test.cmd ${lowerConfiguration} ${arch} buildtesthostonly" buildCommands += "tests\\runtest.cmd ${runtestArguments} CoreFXTestsAll" - + // Archive and process (only) the test results Utilities.addArchival(newJob, "bin/Logs/**/testResults.xml") Utilities.addXUnitDotNETResults(newJob, "bin/Logs/**/testResults.xml") + } else { def workspaceRelativeFxRoot = "_/fx" @@ -2394,32 +2412,48 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR Utilities.addXUnitDotNETResults(newJob, '**/pal_tests.xml') } else { - // Corefx stress testing - assert os == 'Ubuntu' - assert architecture == 'x64' - assert lowerConfiguration == 'checked' - assert isJitStressScenario(scenario) + if(scenario == 'corefx_innerloop') { + assert os == 'Ubuntu' || 'OSX10.12' + assert architecture == 'x64' - // Build coreclr - buildCommands += "./build.sh ${lowerConfiguration} ${architecture}" + buildCommands += "./build.sh ${lowerConfiguration} ${architecture} skiptests" + buildCommands += "./build-test.sh ${lowerConfiguration} ${architecture} generatetesthostonly" + buildCommands += "./tests/runtest.sh --corefxtestsall --testHostDir=\${WORKSPACE}/bin/tests/${osGroup}.${architecture}.${configuration}/testhost/ --coreclr-src=\${WORKSPACE}" + + break + // TODO - uncomment once https://github.com/dotnet/coreclr/pull/18753 has been merged + // Archive and process (only) the test results + // Utilities.addArchival(newJob, "bin/Logs/**/testResults.xml") + // Utilities.addXUnitDotNETResults(newJob, "bin/Logs/**/testResults.xml") + } + else { + // Corefx stress testing + assert os == 'Ubuntu' + assert architecture == 'x64' + assert lowerConfiguration == 'checked' + assert isJitStressScenario(scenario) - def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh" + // Build coreclr + buildCommands += "./build.sh ${lowerConfiguration} ${architecture}" - def envScriptCmds = envScriptCreate(os, scriptFileName) - envScriptCmds += envScriptSetStressModeVariables(os, Constants.jitStressModeScenarios[scenario], scriptFileName) - envScriptCmds += envScriptFinalize(os, scriptFileName) - buildCommands += envScriptCmds + def scriptFileName = "\$WORKSPACE/set_stress_test_env.sh" - // Build and text corefx - def workspaceRelativeFxRoot = "_/fx" - def absoluteFxRoot = "\$WORKSPACE/${workspaceRelativeFxRoot}" - def fxBranch = getFxBranch(branch) + def envScriptCmds = envScriptCreate(os, scriptFileName) + envScriptCmds += envScriptSetStressModeVariables(os, Constants.jitStressModeScenarios[scenario], scriptFileName) + envScriptCmds += envScriptFinalize(os, scriptFileName) + buildCommands += envScriptCmds + + // Build and text corefx + def workspaceRelativeFxRoot = "_/fx" + def absoluteFxRoot = "\$WORKSPACE/${workspaceRelativeFxRoot}" + def fxBranch = getFxBranch(branch) - buildCommands += "python -u \$WORKSPACE/tests/scripts/run-corefx-tests.py -arch ${architecture} -ci_arch ${architecture} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${fxBranch} -env_script ${scriptFileName}" + buildCommands += "python -u \$WORKSPACE/tests/scripts/run-corefx-tests.py -arch ${architecture} -ci_arch ${architecture} -build_type ${configuration} -fx_root ${absoluteFxRoot} -fx_branch ${fxBranch} -env_script ${scriptFileName}" - // Archive and process (only) the test results - Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml") - Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml") + // Archive and process (only) the test results + Utilities.addArchival(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml") + Utilities.addXUnitDotNETResults(newJob, "${workspaceRelativeFxRoot}/bin/**/testResults.xml") + } } break case 'armem': @@ -2773,10 +2807,10 @@ def static shouldGenerateJob(def scenario, def isPR, def architecture, def confi } break case 'corefx_innerloop': - if (os != 'Windows_NT'|| architecture != 'x64') { + if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX10.12') { return false } - if(configuration != 'Release' && configuration != 'Checked') { + if (architecture != 'x64') { return false } break diff --git a/tests/runtest.sh b/tests/runtest.sh index c63ed4a30b..58038f35f4 100755 --- a/tests/runtest.sh +++ b/tests/runtest.sh @@ -67,6 +67,10 @@ function print_usage { echo ' is zero when launching this script. This option is intended for use in CI.' echo ' --xunitOutputPath=<path> : Create xUnit XML report at the specifed path (default: <test root>/coreclrtests.xml)' echo '' + echo 'CoreFX Test Options ' + echo ' --corefxtests : Runs CoreFX tests' + echo ' --corefxtestsall : Runs all available CoreFX tests' + echo '' echo 'Runtime Code Coverage options:' echo ' --coreclr-coverage : Optional argument to get coreclr code coverage reports' echo ' --coreclr-objs=<path> : Location of root of the object directory' @@ -1168,6 +1172,12 @@ do --runcrossgentests) export RunCrossGen=1 ;; + --corefxtests) + exit 0 + ;; + --corefxtestsall) + exit 0 + ;; --sequential) ((maxProcesses = 1)) ;; |