Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -641,6 +642,10 @@ while :; do
__GenerateLayoutOnly=1
;;

generatetesthostonly)
exit 0
;;

buildagainstpackages)
__BuildAgainstPackagesArg=1
;;
Expand Down
82 changes: 58 additions & 24 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To allow non-debug triggers for Debug/Release, this (and the equivalent other code, below) should be:

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.*")
}

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':
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions tests/runtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -1168,6 +1172,12 @@ do
--runcrossgentests)
export RunCrossGen=1
;;
--corefxtests)
exit 0
;;
--corefxtestsall)
exit 0
;;
--sequential)
((maxProcesses = 1))
;;
Expand Down