diff --git a/build-test.sh b/build-test.sh index 5339dc1116c7..b5badd09ab84 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 11aa4a5484df..fae547f5696d 100755 --- a/netci.groovy +++ b/netci.groovy @@ -1565,6 +1565,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': @@ -1626,6 +1637,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) @@ -1743,7 +1760,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 @@ -2222,10 +2239,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" @@ -2413,32 +2431,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': @@ -2808,10 +2842,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 c63ed4a30bb3..58038f35f45a 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= : Create xUnit XML report at the specifed path (default: /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= : 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)) ;;