summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorsmile21prc <xiwe@microsoft.com>2016-09-07 13:51:35 -0700
committerGitHub <noreply@github.com>2016-09-07 13:51:35 -0700
commit09133905fce3b541702044b6d2bbe942a6b40155 (patch)
tree88094d8994ea83bf3ff3a54100229a39e4f525b9 /tests
parent4af09ac719a6ec7cd398b379c8062af8bd6f5e24 (diff)
parentbd59a687114248831f6343c40d2b4b80c08b01b5 (diff)
downloadcoreclr-09133905fce3b541702044b6d2bbe942a6b40155.tar.gz
coreclr-09133905fce3b541702044b6d2bbe942a6b40155.tar.bz2
coreclr-09133905fce3b541702044b6d2bbe942a6b40155.zip
Merge pull request #7016 from smile21prc/coreclr-perf
Create coreclr perf jobs for Linux. Addressed all the comments, and verified coreclr perf run for Linux with latest coreclr/corefx bits passed: http://dotnet-ci2.cloudapp.net/job/smile21prc_coreclr/job/coreclr-perf/job/perf_Linux/28/consoleFull
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/perf-prep.sh70
-rw-r--r--tests/scripts/run-xunit-perf.sh35
2 files changed, 80 insertions, 25 deletions
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