summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perf.groovy54
-rw-r--r--tests/scripts/perf-prep.sh70
-rw-r--r--tests/scripts/run-xunit-perf.sh35
3 files changed, 86 insertions, 73 deletions
diff --git a/perf.groovy b/perf.groovy
index e7100f8de9..71a93f4dd5 100644
--- a/perf.groovy
+++ b/perf.groovy
@@ -4,7 +4,8 @@ import jobs.generation.*;
def project = GithubProject
def branch = GithubBranchName
-def projectFolder = Utilities.getFolderName(project) + '/' + Utilities.getFolderName(branch)
+def projectName = Utilities.getFolderName(project)
+def projectFolder = projectName + '/' + Utilities.getFolderName(branch)
def static getOSGroup(def os) {
def osGroupMap = ['Ubuntu':'Linux',
@@ -67,51 +68,11 @@ def static getOSGroup(def os) {
['Ubuntu'].each { os ->
def osGroup = getOSGroup(os)
def architecture = 'x64'
- def configuration = 'Checked'
+ def configuration = 'Release'
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/perf-prep.sh --branch=${projectName}")
+ 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\" \\
@@ -122,10 +83,7 @@ def static getOSGroup(def os) {
}
}
- // Save machinedata.json to /artifact/bin/ Jenkins dir
- def archiveSettings = new ArchivalSettings()
- archiveSettings.addFiles('perf-*.xml')
- Utilities.addArchival(newJob, archiveSettings)
+ Utilities.setMachineAffinity(newJob, os, 'latest-or-auto') // Just run against Linux VM’s for now.
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
if (isPR) {
diff --git a/tests/scripts/perf-prep.sh b/tests/scripts/perf-prep.sh
new file mode 100644
index 0000000000..3c232b0c2e
--- /dev/null
+++ b/tests/scripts/perf-prep.sh
@@ -0,0 +1,70 @@
+#!/usr/bin/env bash
+
+function print_usage {
+ echo ''
+ echo 'CoreCLR perf test environment set up script on Linux.'
+ echo ''
+ echo 'Typical command line:'
+ echo ''
+ echo 'coreclr/tests/scripts/perf-perp.sh'
+ echo ' --branch="dotnet_coreclr"'
+ echo ''
+ echo 'Required arguments:'
+ echo ' --branch=<path> : branch where coreclr/corefx/test bits are copied from (e.g. dotnet_coreclr).'
+}
+
+# Exit code constants
+readonly EXIT_CODE_SUCCESS=0 # Script ran normally.
+
+# Argument variables
+perfArch="x64"
+perfConfig="Release"
+perfBranch=
+
+for i in "$@"
+do
+ case $i in
+ -h|--help)
+ print_usage
+ exit $EXIT_CODE_SUCCESS
+ ;;
+ --branch=*)
+ perfBranch=${i#*=}
+ ;;
+ *)
+ echo "Unknown switch: $i"
+ print_usage
+ exit $EXIT_CODE_SUCCESS
+ ;;
+ esac
+done
+
+perfBranch="dotnet_coreclr"
+echo "branch = $perfBranch"
+echo "architecture = $perfArch"
+echo "configuration = $perfConfig"
+
+# Set up the copies
+# Coreclr build containing the tests and mscorlib
+curl http://dotnet-ci.cloudapp.net/job/$perfBranch/job/master/job/release_windows_nt/lastSuccessfulBuild/artifact/bin/tests/tests.zip -o tests.zip
+
+# Coreclr build we are trying to test
+curl http://dotnet-ci.cloudapp.net/job/$perfBranch/job/master/job/release_ubuntu/lastSuccessfulBuild/artifact/*zip*/archive.zip -o bin.zip
+
+# Corefx components. We now have full stack builds on all distros we test here, so we can copy straight from CoreFX jobs.
+curl http://dotnet-ci.cloudapp.net/job/dotnet_corefx/job/master/job/ubuntu14.04_release/lastSuccessfulBuild/artifact/bin/build.tar.gz -o build.tar.gz
+
+# Unpack the corefx binaries
+tar -xf build.tar.gz
+
+# Unzip the coreclr binaries
+unzip -q -o bin.zip
+
+# Copy coreclr binaries to the right dir
+cp -R ./archive/bin/obj ./bin
+cp -R ./archive/bin/Product ./bin
+
+# Unzip the tests first. Exit with 0
+mkdir ./bin/tests
+unzip -q -o tests.zip -d ./bin/tests/Windows_NT.$perfArch.$perfConfig || exit 0
+echo "unzip tests to ./bin/tests/Windows_NT.$perfArch.$perfConfig"
diff --git a/tests/scripts/run-xunit-perf.sh b/tests/scripts/run-xunit-perf.sh
index cea29c0214..e56194ce8b 100644
--- a/tests/scripts/run-xunit-perf.sh
+++ b/tests/scripts/run-xunit-perf.sh
@@ -371,11 +371,6 @@ fi
export NUGET_PACKAGES=$testNativeBinDir/../../../../packages
echo "NUGET_PACKAGES = $NUGET_PACKAGES"
-echo "dir $testNativeBinDir/../../../../Tools"
-dir $testNativeBinDir/../../../../Tools
-echo "dir $testNativeBinDir/../../../../Tools/dotnetcli"
-dir $testNativeBinDir/../../../../Tools/dotnetcli
-
pushd $testNativeBinDir/../../../../tests/scripts
$testNativeBinDir/../../../../Tools/dotnetcli/dotnet restore --fallbacksource https://dotnet.myget.org/F/dotnet-buildtools/ --fallbacksource https://dotnet.myget.org/F/dotnet-core/
popd
@@ -385,35 +380,24 @@ create_core_overlay
precompile_overlay_assemblies
copy_test_native_bin_to_test_root
-echo "find $testNativeBinDir/../../../../../../ -name 'Microsoft.DotNet.xunit.performance.runner.cli.dll'"
-find $testNativeBinDir/../../../../../../ -name 'Microsoft.DotNet.xunit.performance.runner.cli.dll'
-echo "find $testNativeBinDir/../../../../../ -name 'Microsoft.DotNet.xunit.performance.runner.cli.dll'"
-find $testNativeBinDir/../../../../../ -name 'Microsoft.DotNet.xunit.performance.runner.cli.dll'
-
# Deploy xunit performance packages
cd $CORE_ROOT
+echo "CORE_ROOT dir = $CORE_ROOT"
DO_SETUP=TRUE
-if [ ${DO_SETUP} == "TRUE" ]; then
-
-echo "dir $testNativeBinDir/../../../../../"
-dir $testNativeBinDir/../../../../../
-echo "dir $testNativeBinDir/../../../../../packages"
+dir $testNativeBinDir/../../../../..
+echo 'dir $testNativeBinDir/../../../../..'
dir $testNativeBinDir/../../../../../packages
-echo "dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli"
+echo 'dir $testNativeBinDir/../../../../../packages'
dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli
-echo "dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035"
+echo 'dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli'
dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035
-echo "dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib"
-dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib
-echo "dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib/netstandard1.3"
-dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib/netstandard1.3
-
-sudo cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib/netstandard1.3/Microsoft.DotNet.xunit.performance.runner.cli.dll .
-
-sudo cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.run.core/1.0.0-alpha-build0035/lib/dotnet/*.dll .
+echo 'dir $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035'
+if [ ${DO_SETUP} == "TRUE" ]; then
+cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.runner.cli/1.0.0-alpha-build0035/lib/netstandard1.3/Microsoft.DotNet.xunit.performance.runner.cli.dll .
+cp $testNativeBinDir/../../../../../packages/Microsoft.DotNet.xunit.performance.run.core/1.0.0-alpha-build0035/lib/dotnet/*.dll .
fi
# Run coreclr performance tests
@@ -428,6 +412,7 @@ echo "....Running $testname"
cp $testcase .
+chmod u+x ./corerun
./corerun Microsoft.DotNet.xunit.performance.runner.cli.dll $test -runner xunit.console.netcore.exe -runnerhost ./corerun -verbose -runid perf-$testname
done