Fix Ubuntu Perf Runs
authorDrew Scoggins <anscoggi@microsoft.com>
Sat, 21 Jan 2017 00:05:16 +0000 (16:05 -0800)
committerDrew Scoggins <anscoggi@microsoft.com>
Wed, 25 Jan 2017 01:50:37 +0000 (17:50 -0800)
After the dev/eng work the Ubuntu perf runs were broken because of
layout changes in the bin drop of CoreFX.  We relied on these for the
CoreFX that we used during perf testing.  I have made changes on the
CoreFX side to tar up the new runtime folder instead of a collection of
other bin folder.  This change allows the infrastructure to consume
this.

perf.groovy
tests/scripts/perf-prep.sh
tests/scripts/run-xunit-perf.sh

index b2dfedd..6b09310 100644 (file)
@@ -128,8 +128,7 @@ def static getOSGroup(def os) {
                 --testNativeBinDir=\"\${WORKSPACE}/bin/obj/${osGroup}.${architecture}.${configuration}/tests\" \\
                 --coreClrBinDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
                 --mscorlibDir=\"\${WORKSPACE}/bin/Product/${osGroup}.${architecture}.${configuration}\" \\
-                --coreFxBinDir=\"\${WORKSPACE}/corefx/bin/${osGroup}.AnyCPU.${configuration};\${WORKSPACE}/corefx/bin/Unix.AnyCPU.${configuration};\${WORKSPACE}/corefx/bin/AnyOS.AnyCPU.${configuration}\" \\
-                --coreFxNativeBinDir=\"\${WORKSPACE}/corefx/bin/${osGroup}.${architecture}.${configuration}\" \\
+                --coreFxBinDir=\"\${WORKSPACE}/corefx\" \\
                                --runType=\"${runType}\" \\
                                --benchViewOS=\"${os}\" \\
                                --uploadToBenchview""")
index 3f16f38..effdc0a 100755 (executable)
@@ -68,6 +68,7 @@ curl https://ci.dot.net/job/dotnet_corefx/job/master/job/ubuntu14.04_release/las
 # Unpack the corefx binaries
 pushd corefx > /dev/null
 tar -xf build.tar.gz
+rm build.tar.gz
 popd > /dev/null
 
 # Unzip the tests first.  Exit with 0
index b6f4ac1..12244aa 100755 (executable)
@@ -12,7 +12,6 @@ function print_usage {
     echo '    --coreClrBinDir="coreclr/bin/Product/Linux.x64.Debug"'
     echo '    --mscorlibDir="windows/coreclr/bin/Product/Linux.x64.Debug"'
     echo '    --coreFxBinDir="corefx/bin/Linux.AnyCPU.Debug"'
-    echo '    --coreFxNativeBinDir="corefx/bin/Linux.x64.Debug"'
     echo ''
     echo 'Required arguments:'
     echo '  --testRootDir=<path>             : Root directory of the test build (e.g. coreclr/bin/tests/Windows_NT.x64.Debug).'
@@ -22,14 +21,11 @@ function print_usage {
     echo 'Optional arguments:'
     echo '  --coreOverlayDir=<path>          : Directory containing core binaries and test dependencies. If not specified, the'
     echo '                                     default is testRootDir/Tests/coreoverlay. This switch overrides --coreClrBinDir,'
-    echo '                                     --mscorlibDir, --coreFxBinDir, and --coreFxNativeBinDir.'
+    echo '                                     --mscorlibDir, and --coreFxBinDir.'
     echo '  --coreClrBinDir=<path>           : Directory of the CoreCLR build (e.g. coreclr/bin/Product/Linux.x64.Debug).'
     echo '  --mscorlibDir=<path>             : Directory containing the built mscorlib.dll. If not specified, it is expected to be'
     echo '                                       in the directory specified by --coreClrBinDir.'
-    echo '  --coreFxBinDir="<path>[;<path>]" : List of one or more directories with CoreFX build outputs (semicolon-delimited)'
-    echo '                                     (e.g. "corefx/bin/Linux.AnyCPU.Debug;corefx/bin/Unix.AnyCPU.Debug;corefx/bin/AnyOS.AnyCPU.Debug").'
-    echo '                                     If files with the same name are present in multiple directories, the first one wins.'
-    echo '  --coreFxNativeBinDir=<path>      : Directory of the CoreFX native build (e.g. corefx/bin/Linux.x64.Debug).'
+    echo '  --coreFxBinDir="<path>"          : The path to the unpacled runtime folder that is produced as part of a CoreFX build'
        echo '  --uploadToBenchview              : Specify this flag in order to have the results of the run uploaded to Benchview.'
        echo '                                     This also requires that the os flag and runtype flag to be set.  Lastly you must'
        echo '                                     also have the BV_UPLOAD_SAS_TOKEN set to a SAS token for the Benchview upload container'
@@ -210,12 +206,6 @@ function create_core_overlay {
     if [ -z "$coreFxBinDir" ]; then
         exit_with_error "$errorSource" "One of --coreOverlayDir or --coreFxBinDir must be specified." "$printUsage"
     fi
-    if [ -z "$coreFxNativeBinDir" ]; then
-        exit_with_error "$errorSource" "One of --coreOverlayDir or --coreFxBinDir must be specified." "$printUsage"
-    fi
-    if [ ! -d "$coreFxNativeBinDir/Native" -a ! -d "$coreFxNativeBinDir/native" ]; then
-        exit_with_error "$errorSource" "Directory specified by --coreNativeFxBinDir does not exist: $coreFxNativeBinDir/Native"
-    fi
 
     # Create the overlay
     coreOverlayDir=$testRootDir/Tests/coreoverlay
@@ -225,21 +215,7 @@ function create_core_overlay {
     fi
     mkdir "$coreOverlayDir"
 
-    while IFS=';' read -ra coreFxBinDirectories; do
-        for currDir in "${coreFxBinDirectories[@]}"; do
-            if [ ! -d "$currDir" ]; then
-                exit_with_error "$errorSource" "Directory specified in --coreFxBinDir does not exist: $currDir"
-            fi
-            pushd $currDir > /dev/null
-            for dirName in $(find . -iname '*.dll' \! -iwholename '*test*' \! -iwholename '*/ToolRuntime/*' \! -iwholename '*/RemoteExecutorConsoleApp/*' \! -iwholename '*/net*' \! -iwholename '*aot*' -exec dirname {} \; | uniq | sed 's/\.\/\(.*\)/\1/g'); do
-                cp -n -v "$currDir/$dirName/$dirName.dll" "$coreOverlayDir/"
-            done
-            popd $currDur > /dev/null
-        done
-    done <<< $coreFxBinDir
-
-    cp -f -v "$coreFxNativeBinDir/Native/"*."$libExtension" "$coreOverlayDir/" 2>/dev/null
-
+       cp -f -v "$coreFxBinDir"/* "$coreOverlayDir/" 2>/dev/null
     cp -f -v "$coreClrBinDir/"* "$coreOverlayDir/" 2>/dev/null
     cp -f -v "$mscorlibDir/mscorlib.dll" "$coreOverlayDir/"
     cp -n -v "$testDependenciesDir"/* "$coreOverlayDir/" 2>/dev/null
@@ -251,7 +227,7 @@ function create_core_overlay {
 
 function precompile_overlay_assemblies {
 
-    if [ $doCrossgen == 1 ]; then
+    if [ "$doCrossgen" == "1" ]; then
 
         local overlayDir=$CORE_ROOT
 
@@ -315,7 +291,6 @@ coreOverlayDir=
 coreClrBinDir=
 mscorlibDir=
 coreFxBinDir=
-coreFxNativeBinDir=
 uploadToBenchview=
 benchViewOS=
 runType=
@@ -345,9 +320,6 @@ do
         --coreFxBinDir=*)
             coreFxBinDir=${i#*=}
             ;;
-        --coreFxNativeBinDir=*)
-            coreFxNativeBinDir=${i#*=}
-            ;;
                --benchViewOS=*)
             benchViewOS=${i#*=}
             ;;