Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Add GC Reliability Framework CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
swgillespie committed Apr 28, 2017
1 parent c983bb8 commit c93826b
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 5 deletions.
63 changes: 60 additions & 3 deletions netci.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class Constants {
'gcsimulator',
'jitdiff',
'standalone_gc',
'gc_reliability_framework',
'illink'] + r2rJitStressScenarios

def static configurationList = ['Debug', 'Checked', 'Release']
Expand Down Expand Up @@ -205,6 +206,10 @@ def static isJitDiff(def scenario) {
return (scenario == 'jitdiff')
}

def static scenarioNeedsPri1Build(def scenario) {
return (scenario == 'pri1' || scenario == 'pri1r2r' || scenario == 'gcstress15_pri1r2r'|| scenario == 'coverage' || scenario == 'gc_reliability_framework')
}

def static setTestJobTimeOut(newJob, scenario) {
if (isGCStressRelatedTesting(scenario)) {
Utilities.setJobTimeout(newJob, 4320)
Expand Down Expand Up @@ -497,6 +502,11 @@ def static addNonPRTriggers(def job, def branch, def isPR, def architecture, def
// addEmailPublisher(job, 'dotnetgctests@microsoft.com')
Utilities.addPeriodicTrigger(job, '@weekly')
break
case 'gc_reliability_framework':
assert (os == 'Ubuntu' || os == 'Windows_NT' || os == 'OSX10.12')
assert (configuration == 'Release' || configuration == 'Checked')
// Only triggered by phrase.
break
case 'ilrt':
assert !(os in bidailyCrossList)
// ILASM/ILDASM roundtrip one gets a daily build, and only for release
Expand Down Expand Up @@ -766,6 +776,16 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Simulator", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
}
break
case 'standalone_gc':
if (configuration == 'Release' || configuration == 'Checked') {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
}
break
case 'gc_reliability_framework':
if (configuration == 'Release' || configuration == 'Checked') {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Reliability Framework", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
}
break
case 'minopts':
case 'forcerelocs':
case 'jitstress1':
Expand Down Expand Up @@ -939,6 +959,11 @@ def static addTriggers(def job, def branch, def isPR, def architecture, def os,
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} Standalone GC", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
}
break
case 'gc_reliability_framework':
if (configuration == 'Release' || configuration == 'Checked') {
Utilities.addGithubPRTriggerForBranch(job, branch, "${os} ${architecture} ${configuration} GC Reliability Framework", "(?i).*test\\W+${os}\\W+${configuration}\\W+${scenario}.*")
}
break
case 'minopts':
case 'forcerelocs':
case 'jitstress1':
Expand Down Expand Up @@ -1307,7 +1332,7 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
// binaries are sent to a default directory whose name is about
// 35 characters long.

else if (scenario == 'pri1' || scenario == 'pri1r2r' || scenario == 'gcstress15_pri1r2r'|| scenario == 'coverage') {
else if (scenarioNeedsPri1Build(scenario)) {
buildCommands += "set __TestIntermediateDir=int&&build.cmd ${lowerConfiguration} ${arch} ${buildOpts} -priority=1"
}
else if (isLongGc(scenario)) {
Expand Down Expand Up @@ -1435,6 +1460,12 @@ def static calculateBuildCommands(def newJob, def scenario, def branch, def isPR
buildCommands += "%WORKSPACE%\\tests\\runtest.cmd ${runtestArguments} TestEnv ${stepScriptLocation}"
}
}
else if (scenario == 'gc_reliability_framework') {
buildCommands += "tests\\runtest.cmd ${runtestArguments} GenerateLayoutOnly"
buildCommands += "tests\\scripts\\run-gc-reliability-framework.cmd ${arch} ${configuration}"
Utilities.addArchival(newJob, "stdout.txt")
Utilities.addArchival(newJob, "Logs/**")
}
else if (architecture == 'x64' || architecture == 'x86') {
buildCommands += "tests\\runtest.cmd ${runtestArguments}"
}
Expand Down Expand Up @@ -1870,6 +1901,7 @@ combinedScenarios.each { scenario ->
return
}
break
case 'gc_reliability_framework':
case 'standalone_gc':
if (os != 'Windows_NT' && os != 'Ubuntu' && os != 'OSX10.12') {
return
Expand Down Expand Up @@ -2120,10 +2152,12 @@ combinedScenarios.each { scenario ->
return
}
break
case 'gc_reliability_framework':
case 'standalone_gc':
if (configuration != 'Release' && configuration != 'Checked') {
return
}
break
case 'coverage':
//We only want Ubuntu Release for coverage
if (os != 'Ubuntu') {
Expand Down Expand Up @@ -2164,7 +2198,7 @@ combinedScenarios.each { scenario ->
// so we didn't create a build only job for windows_nt specific to that stress mode. Just copy
// from the default scenario
def testBuildScenario = scenario
if (testBuildScenario == 'coverage' || testBuildScenario == 'pri1r2r'|| testBuildScenario == 'gcstress15_pri1r2r') {
if (scenarioNeedsPri1Build(scenario)) {
testBuildScenario = 'pri1'
}
else if ( testBuildScenario == 'r2r' || Constants.r2rJitStressScenarios.indexOf(testBuildScenario) != -1 || isLongGc(testBuildScenario)) {
Expand Down Expand Up @@ -2210,6 +2244,7 @@ combinedScenarios.each { scenario ->
def runilasmroundtripStr = ''
def gcstressStr = ''
def illinkStr = ''
def layoutOnlyStr =''

if (scenario == 'r2r' ||
scenario == 'pri1r2r' ||
Expand Down Expand Up @@ -2286,6 +2321,10 @@ combinedScenarios.each { scenario ->
}
}

if (scenario == 'gc_reliability_framework') {
layoutOnlyStr = '--build-overlay-only'
}

def folder = getJobFolder(scenario)
def newJob = job(Utilities.getFullJobName(project, jobName, isPR, folder)) {
// Add parameters for the inputs
Expand Down Expand Up @@ -2438,11 +2477,29 @@ combinedScenarios.each { scenario ->
--mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
--coreFxBinDir=\"\${WORKSPACE}/bin/CoreFxBinDir\" \\
--limitedDumpGeneration \\
${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} ${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${runilasmroundtripStr} ${illinkStr} ${sequentialString} ${playlistString}""")
${testEnvOpt} ${serverGCString} ${gcstressStr} ${crossgenStr} ${runcrossgentestsStr} ${runjitstressStr} \\
${runjitstressregsStr} ${runjitmioptsStr} ${runjitforcerelocsStr} ${runjitdisasmStr} ${runilasmroundtripStr} \\
${illinkStr} ${sequentialString} ${playlistString} ${layoutOnlyStr}""")

if (scenario == 'gc_reliability_framework') {
// runtest.sh doesn't actually execute the reliability framework - do it here.
if (serverGCString != '') {
shell("export COMPlus_gcServer=1")
}

shell("./tests/scripts/run-gc-reliability-framework.sh ${architecture} ${configuration}")
}
}
}
}

if (scenario == 'gc_reliability_framework')
{
// Both of these are emitted by the RF
Utilities.addArchival(newJob, "stdout.txt")
Utilities.addArchival(newJob, "Logs/**")
}

if (scenario == 'coverage') {
// Publish coverage reports
Utilities.addHtmlPublisher(newJob, '${WORKSPACE}/coverage/Coverage/reports', 'Code Coverage Report', 'coreclr.html')
Expand Down
10 changes: 10 additions & 0 deletions tests/scripts/run-gc-reliability-framework.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@rem Licensed to the .NET Foundation under one or more agreements.
@rem The .NET Foundation licenses this file to you under the MIT license.
@rem See the LICENSE file in the project root for more information.

@echo off

set CORE_ROOT=%CD%\bin\tests\Windows_NT.%1.%2\Tests\Core_Root
set FRAMEWORK_DIR=%CD%\bin\tests\Windows_NT.%1.%2\GC\Stress\Framework\ReliabilityFramework
powershell "%CORE_ROOT%\CoreRun.exe %FRAMEWORK_DIR%\ReliabilityFramework.exe %FRAMEWORK_DIR%\testmix_gc.config | tee stdout.txt"

6 changes: 6 additions & 0 deletions tests/scripts/run-gc-reliability-framework.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

export CORE_ROOT=`pwd`/bin/tests/Windows_NT.$1.$2/Tests/coreoverlay
FRAMEWORK_DIR=`pwd`/bin/tests/Windows_NT.$1.$2/GC/Stress/Framework/ReliabilityFramework
$CORE_ROOT/corerun $FRAMEWORK_DIR/ReliabilityFramework.exe $FRAMEWORK_DIR/testmix_gc.config | tee stdout.txt

4 changes: 2 additions & 2 deletions tests/src/GC/Stress/Framework/ReliabilityFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<OutputType>Exe</OutputType>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<CLRTestKind>BuildAndRun</CLRTestKind>
<CLRTestKind>BuildOnly</CLRTestKind>
<GenerateRunScript>false</GenerateRunScript>
<CLRTestPriority>1</CLRTestPriority>
<CLRTestExecutionArguments>testmix_gc.config /maximumExecutionTime:-1</CLRTestExecutionArguments>
<DefineConstants>$(DefineConstants);STATIC;PROJECTK_BUILD</DefineConstants>
</PropertyGroup>
<!-- Default configurations to help VS understand the configurations -->
Expand Down

0 comments on commit c93826b

Please sign in to comment.