diff options
author | Smile Wei <xiwe@microsoft.com> | 2016-08-30 12:31:25 -0700 |
---|---|---|
committer | Smile Wei <xiwe@microsoft.com> | 2016-08-30 14:27:14 -0700 |
commit | cb24fe3c2ac3670f3367fe4e934a35bbf6d2cca2 (patch) | |
tree | 32c39801c74f39773be7b881ae23365269f0eed5 /perf.groovy | |
parent | 981ebfbb75ae51c040a88e637250cee079102f6d (diff) | |
download | coreclr-cb24fe3c2ac3670f3367fe4e934a35bbf6d2cca2.tar.gz coreclr-cb24fe3c2ac3670f3367fe4e934a35bbf6d2cca2.tar.bz2 coreclr-cb24fe3c2ac3670f3367fe4e934a35bbf6d2cca2.zip |
Create coreclr perf jobs for Linux.
Diffstat (limited to 'perf.groovy')
-rw-r--r-- | perf.groovy | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/perf.groovy b/perf.groovy index 53106ec627..d9acb610d3 100644 --- a/perf.groovy +++ b/perf.groovy @@ -6,6 +6,24 @@ def project = GithubProject def branch = GithubBranchName def projectFolder = Utilities.getFolderName(project) + '/' + Utilities.getFolderName(branch) +def static getOSGroup(def os) { + def osGroupMap = ['Ubuntu':'Linux', + 'RHEL7.2': 'Linux', + 'Ubuntu16.04': 'Linux', + 'Debian8.4':'Linux', + 'Fedora23':'Linux', + 'OSX':'OSX', + 'Windows_NT':'Windows_NT', + 'FreeBSD':'FreeBSD', + 'CentOS7.1': 'Linux', + 'OpenSUSE13.2': 'Linux', + 'OpenSUSE42.1': 'Linux', + 'LinuxARMEmulator': 'Linux'] + def osGroup = osGroupMap.get(os, null) + assert osGroup != null : "Could not find os group for ${os}" + return osGroupMap[os] +} + [true, false].each { isPR -> ['Windows_NT'].each { os -> def newJob = job(Utilities.getFullJobName(project, "perf_${os}", isPR)) { @@ -37,3 +55,79 @@ def projectFolder = Utilities.getFolderName(project) + '/' + Utilities.getFolder } } } + +// Create the Linux/OSX/CentOS coreclr test leg for debug and release and each scenario +[true, false].each { isPR -> + ['Ubuntu'].each { os -> + def osGroup = getOSGroup(os) + def architecture = 'x64' + def configuration = 'Checked' + def newJob = job(Utilities.getFullJobName(project, "perf_${osGroup}", isPR)) { + parameters { + stringParam('CORECLR_WINDOWS_BUILD', '', 'Build number to copy CoreCLR windows test binaries from') + stringParam('CORECLR_BUILD', '', "Build number to copy CoreCLR ${osGroup} binaries from") + } + + steps { + // Set up the copies + // Coreclr build containing the tests and mscorlib + copyArtifacts("dotnet_coreclr/master/x64_checked_windows_nt_pri1_bld") { + excludePatterns('**/testResults.xml', '**/*.ni.dll') + buildSelector { + buildNumber('${CORECLR_WINDOWS_BUILD}') + } + } + + // Coreclr build we are trying to test + copyArtifacts("dotnet_coreclr/master/checked_ubuntu") { + excludePatterns('**/testResults.xml', '**/*.ni.dll') + buildSelector { + buildNumber('${CORECLR_BUILD}') + } + } + + def corefxFolder = Utilities.getFolderName('dotnet/corefx') + '/' + 'master' + + // Corefx components. We now have full stack builds on all distros we test here, so we can copy straight from CoreFX jobs. + def osJobName = (os == 'Ubuntu') ? 'ubuntu14.04' : os.toLowerCase() + copyArtifacts("${corefxFolder}/${osJobName}_release") { + includePatterns('bin/build.tar.gz') + buildSelector { + latestSuccessful(true) + } + } + + // Unpack the corefx binaries + shell("tar -xf ./bin/build.tar.gz") + + // Unzip the tests first. Exit with 0 + shell("unzip -q -o ./bin/tests/tests.zip -d ./bin/tests/Windows_NT.${architecture}.${configuration} || exit 0") + + // Execute the tests + shell('./init-tools.sh') + + shell("""sudo bash ./tests/scripts/run-xunit-perf.sh \\ + --testRootDir=\"\${WORKSPACE}/bin/tests/Windows_NT.${architecture}.${configuration}\" \\ + --testNativeBinDir=\"\${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\ + --coreClrBinDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\ + --mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\ + --coreFxBinDir=\"\${WORKSPACE}/bin/${osGroup}.AnyCPU.Release;\${WORKSPACE}/bin/Unix.AnyCPU.Release;\${WORKSPACE}/bin/AnyOS.AnyCPU.Release\" \\ + --coreFxNativeBinDir=\"\${WORKSPACE}/bin/${osGroup}.${architecture}.Release\"""") + } + } + + // Save machinedata.json to /artifact/bin/ Jenkins dir + def archiveSettings = new ArchivalSettings() + archiveSettings.addFiles('perf-*.xml') + Utilities.addArchival(newJob, archiveSettings) + + Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}") + if (isPR) { + Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} Perf Tests") // Add a PR trigger. + } + else { + // Set a push trigger + Utilities.addGithubPushTrigger(newJob) + } + } // os +} // isPR |