summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSwaroop Sridhar <swaroops@microsoft.com>2017-05-10 02:25:16 -0700
committerSwaroop Sridhar <Swaroop.Sridhar@microsoft.com>2017-05-16 13:55:12 -0700
commitfcca93a670ce4f9916993d83f5581de4e13fec1f (patch)
tree549b07fe6a49aff98ab1d3682e97bf3daa81fd5d /tests
parentf2913a39793be26a5bb598582c41790593a5e5f8 (diff)
downloadcoreclr-fcca93a670ce4f9916993d83f5581de4e13fec1f.tar.gz
coreclr-fcca93a670ce4f9916993d83f5581de4e13fec1f.tar.bz2
coreclr-fcca93a670ce4f9916993d83f5581de4e13fec1f.zip
Add LinkBench to BenchView
1) Add LinkBench to the xunit-perf benchmark runs, as a scenario test 2) Some improvements to run-xunit-perf to - Handle tests that perform size measurement - Parametrization of test group - Tests running multiple scenarios CoreFX testing is currently disabled because it fails in the lab due to a path length limitation.
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/run-xunit-perf.cmd62
-rw-r--r--tests/src/performance/linkbench/linkbench.cs74
-rw-r--r--tests/src/performance/linkbench/scripts/build.cmd38
-rw-r--r--tests/src/performance/linkbench/scripts/clone.cmd26
4 files changed, 108 insertions, 92 deletions
diff --git a/tests/scripts/run-xunit-perf.cmd b/tests/scripts/run-xunit-perf.cmd
index 622e33a37d..130cb37c3b 100644
--- a/tests/scripts/run-xunit-perf.cmd
+++ b/tests/scripts/run-xunit-perf.cmd
@@ -21,6 +21,9 @@ setlocal
set COLLECTION_FLAGS=stopwatch
set ETW_COLLECTION=Off
set STABILITY_PREFIX=
+ set BENCHVIEW_GROUP=CoreCLR
+ set HAS_WARMUP_RUN=--drop-first-value
+ set BETTER=desc
call :parse_command_line_arguments %*
if defined USAGE_DISPLAYED exit /b %ERRORLEVEL%
@@ -68,8 +71,6 @@ rem ****************************************************************************
setlocal
set BENCHNAME=%~n1
set BENCHDIR=%~p1
- set PERFOUT=perf-%BENCHNAME%
- set XMLOUT=%PERFOUT%.xml
rem copy benchmark and any input files
call :run_cmd xcopy /s %~1 . >> %RUNLOG% || exit /b 1
@@ -102,16 +103,14 @@ setlocal
rem optionally generate results for benchview
if exist "%BENCHVIEW_PATH%" (
call :generate_results_for_benchview || exit /b 1
- ) else (
- type "%XMLOUT%" | findstr /i /c:"test name"
- )
+ )
rem Save off the results to the root directory for recovery later in Jenkins
- IF EXIST "Perf-%BENCHNAME%.xml" (
- call :run_cmd copy "Perf-%BENCHNAME%.xml" "%CORECLR_REPO%\Perf-%BENCHNAME%-%ETW_COLLECTION%.xml" || exit /b 1
+ IF EXIST "Perf-*%BENCHNAME%.xml" (
+ call :run_cmd copy "Perf-*%BENCHNAME%.xml" "%CORECLR_REPO%\Perf-%BENCHNAME%-%ETW_COLLECTION%.xml" || exit /b 1
)
- IF EXIST "Perf-%BENCHNAME%.etl" (
- call :run_cmd copy "Perf-%BENCHNAME%.etl" "%CORECLR_REPO%\Perf-%BENCHNAME%-%ETW_COLLECTION%.etl" || exit /b 1
+ IF EXIST "Perf-*%BENCHNAME%.etl" (
+ call :run_cmd copy "Perf-*%BENCHNAME%.etl" "%CORECLR_REPO%\Perf-%BENCHNAME%-%ETW_COLLECTION%.etl" || exit /b 1
)
exit /b 0
@@ -142,6 +141,17 @@ rem ****************************************************************************
shift
goto :parse_command_line_arguments
)
+ IF /I [%~1] == [-nowarmup] (
+ set HAS_WARMUP_RUN=
+ shift
+ goto :parse_command_line_arguments
+ )
+ IF /I [%~1] == [-better] (
+ set BETTER=%~2
+ shift
+ shift
+ goto :parse_command_line_arguments
+ )
IF /I [%~1] == [-runtype] (
set BENCHVIEW_RUN_TYPE=%~2
shift
@@ -183,7 +193,12 @@ rem ****************************************************************************
shift
goto :parse_command_line_arguments
)
-
+ IF /I [%~1] == [-group] (
+ set BENCHVIEW_GROUP=%~2
+ shift
+ shift
+ goto :parse_command_line_arguments
+ )
if /I [%~1] == [-?] (
call :USAGE
exit /b 0
@@ -273,15 +288,19 @@ rem ****************************************************************************
set LV_MEASUREMENT_ARGS=
set LV_MEASUREMENT_ARGS=%LV_MEASUREMENT_ARGS% %BENCHVIEW_MEASUREMENT_PARSER%
- set LV_MEASUREMENT_ARGS=%LV_MEASUREMENT_ARGS% "Perf-%BENCHNAME%.xml"
- set LV_MEASUREMENT_ARGS=%LV_MEASUREMENT_ARGS% --better desc
- set LV_MEASUREMENT_ARGS=%LV_MEASUREMENT_ARGS% --drop-first-value
+ set LV_MEASUREMENT_ARGS=%LV_MEASUREMENT_ARGS% --better %BETTER%
+ set LV_MEASUREMENT_ARGS=%LV_MEASUREMENT_ARGS% %HAS_WARMUP_RUN%
set LV_MEASUREMENT_ARGS=%LV_MEASUREMENT_ARGS% --append
- call :run_cmd py.exe "%BENCHVIEW_PATH%\measurement.py" %LV_MEASUREMENT_ARGS%
- IF %ERRORLEVEL% NEQ 0 (
- call :print_error Failed to generate BenchView measurement data.
- exit /b 1
+
+ for /f %%f in ('dir /b Perf-*%BENCHNAME%.xml 2^>nul') do (
+ call :run_cmd py.exe "%BENCHVIEW_PATH%\measurement.py" %LV_MEASUREMENT_ARGS% %%f
+
+ IF !ERRORLEVEL! NEQ 0 (
+ call :print_error Failed to generate BenchView measurement data.
+ exit /b 1
+ )
)
+
endlocal& exit /b %ERRORLEVEL%
:upload_to_benchview
@@ -293,7 +312,7 @@ setlocal
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --build ..\build.json
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --machine-data ..\machinedata.json
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --metadata ..\submission-metadata.json
- set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --group "CoreCLR"
+ set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --group "%BENCHVIEW_GROUP%"
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --type "%BENCHVIEW_RUN_TYPE%"
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --config-name "%TEST_CONFIG%"
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --config Configuration "%TEST_CONFIG%"
@@ -301,7 +320,9 @@ setlocal
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --config Profile "%ETW_COLLECTION%"
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --arch "%TEST_ARCHITECTURE%"
set LV_SUBMISSION_ARGS=%LV_SUBMISSION_ARGS% --machinepool "PerfSnake"
+
call :run_cmd py.exe "%BENCHVIEW_PATH%\submission.py" measurement.json %LV_SUBMISSION_ARGS%
+
IF %ERRORLEVEL% NEQ 0 (
call :print_error Creating BenchView submission data failed.
exit /b 1
@@ -321,7 +342,7 @@ rem ****************************************************************************
rem Script's usage.
rem ****************************************************************************
set USAGE_DISPLAYED=1
- echo run-xunit-perf.cmd -testBinLoc ^<path_to_tests^> [-library] [-arch] ^<x86^|x64^> [-configuration] ^<Release^|Debug^> [-generateBenchviewData] ^<path_to_benchview_tools^> [-runtype] ^<rolling^|private^> [-scenarioTest] [-collectionFlags] ^<default^+CacheMisses^+InstructionRetired^+BranchMispredictions^+gcapi^>
+ echo run-xunit-perf.cmd -testBinLoc ^<path_to_tests^> [-library] [-arch] ^<x86^|x64^> [-configuration] ^<Release^|Debug^> [-generateBenchviewData] ^<path_to_benchview_tools^> [-warmup] [-better] ^<asc ^| desc^> [-group] ^<group^> [-runtype] ^<rolling^|private^> [-scenarioTest] [-collectionFlags] ^<default^+CacheMisses^+InstructionRetired^+BranchMispredictions^+gcapi^>
echo/
echo For the path to the tests you can pass a parent directory and the script will grovel for
echo all tests in subdirectories and run them.
@@ -330,6 +351,9 @@ rem ****************************************************************************
echo -generateBenchviewData is used to specify a path to the Benchview tooling and when this flag is
echo set we will generate the results for upload to benchview.
echo -uploadToBenchview If this flag is set the generated benchview test data will be uploaded.
+ echo -nowarmup specifies not to discard the results of the first run
+ echo -better whether it is better to have ascending or descending numbers for the benchmark
+ echo -group specifies the Benchview group to which this data should be uploaded (default CoreCLR)
echo Runtype sets the runtype that we upload to Benchview, rolling for regular runs, and private for
echo PRs.
echo -scenarioTest should be included if you are running a scenario benchmark.
diff --git a/tests/src/performance/linkbench/linkbench.cs b/tests/src/performance/linkbench/linkbench.cs
index 2d53cbc099..f33476917c 100644
--- a/tests/src/performance/linkbench/linkbench.cs
+++ b/tests/src/performance/linkbench/linkbench.cs
@@ -235,6 +235,7 @@ namespace LinkBench
private static MetricModel SizeMetric = new MetricModel { Name = "Size", DisplayName = "File Size", Unit = "MB" };
private static MetricModel PercMetric = new MetricModel { Name = "Ratio", DisplayName = "Reduction", Unit = "Linked/Unlinked" };
public static string Workspace;
+ public static string LinkBenchRoot;
public static string ScriptDir;
public static string AssetsDir;
private static Benchmark CurrentBenchmark;
@@ -242,34 +243,33 @@ namespace LinkBench
private static Benchmark[] Benchmarks =
{
new Benchmark("HelloWorld",
- "LinkBench\\HelloWorld\\bin\\release\\netcoreapp2.0\\win10-x64\\unlinked",
- "LinkBench\\HelloWorld\\bin\\release\\netcoreapp2.0\\win10-x64\\linked",
- () => Benchmark.AddLinkerReference("LinkBench\\HelloWorld\\HelloWorld.csproj")),
+ "HelloWorld\\bin\\release\\netcoreapp2.0\\win10-x64\\unlinked",
+ "HelloWorld\\bin\\release\\netcoreapp2.0\\win10-x64\\linked",
+ () => Benchmark.AddLinkerReference("HelloWorld\\HelloWorld.csproj")),
new Benchmark("WebAPI",
- "LinkBench\\WebAPI\\bin\\release\\netcoreapp2.0\\win10-x64\\unlinked",
- "LinkBench\\WebAPI\\bin\\release\\netcoreapp2.0\\win10-x64\\linked",
- () => { Benchmark.AddLinkerReference("LinkBench\\WebAPI\\WebAPI.csproj");
- Benchmark.PreventPublishFiltering("LinkBench\\WebAPI\\WebAPI.csproj"); }),
+ "WebAPI\\bin\\release\\netcoreapp2.0\\win10-x64\\unlinked",
+ "WebAPI\\bin\\release\\netcoreapp2.0\\win10-x64\\linked",
+ () => { Benchmark.AddLinkerReference("WebAPI\\WebAPI.csproj");
+ Benchmark.PreventPublishFiltering("WebAPI\\WebAPI.csproj"); }),
new Benchmark("MusicStore",
- "LinkBench\\JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\unlinked",
- "LinkBench\\JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\linked",
- () => { Benchmark.AddLinkerReference("LinkBench\\JitBench\\src\\MusicStore\\MusicStore.csproj");
- Benchmark.SetRuntimeFrameworkVersion("LinkBench\\JitBench\\src\\MusicStore\\MusicStore.csproj"); }),
+ "JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\unlinked",
+ "JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\linked",
+ () => { Benchmark.AddLinkerReference("JitBench\\src\\MusicStore\\MusicStore.csproj");
+ Benchmark.SetRuntimeFrameworkVersion("JitBench\\src\\MusicStore\\MusicStore.csproj"); }),
new Benchmark("MusicStore_R2R",
- "LinkBench\\JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\R2R\\unlinked",
- "LinkBench\\JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\R2R\\linked"),
+ "JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\R2R\\unlinked",
+ "JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\R2R\\linked"),
new Benchmark("Corefx",
- "LinkBench\\corefx\\bin\\ILLinkTrimAssembly\\netcoreapp-Windows_NT-Release-x64\\pretrimmed",
- "LinkBench\\corefx\\bin\\ILLinkTrimAssembly\\netcoreapp-Windows_NT-Release-x64\\trimmed"),
+ "corefx\\bin\\ILLinkTrimAssembly\\netcoreapp-Windows_NT-Release-x64\\pretrimmed",
+ "corefx\\bin\\ILLinkTrimAssembly\\netcoreapp-Windows_NT-Release-x64\\trimmed"),
new Benchmark("Roslyn",
- "LinkBench\\roslyn\\Binaries\\Release\\Exes\\CscCore\\win7-x64\\publish",
- "LinkBench\\roslyn\\Binaries\\Release\\Exes\\CscCore\\win7-x64\\Linked")
+ "roslyn\\Binaries\\Release\\Exes\\CscCore\\win7-x64\\publish",
+ "roslyn\\Binaries\\Release\\Exes\\CscCore\\win7-x64\\Linked")
};
static int UsageError()
{
- Console.WriteLine("Usage: LinkBench [--clean] [--nosetup] [--nobuild] [--perf:runid <id>] [<benchmarks>]");
- Console.WriteLine(" --clean: Remove LinkBench working directory at start");
+ Console.WriteLine("Usage: LinkBench [--nosetup] [--nobuild] [--perf:runid <id>] [<benchmarks>]");
Console.WriteLine(" --nosetup: Don't clone and fixup benchmark repositories");
Console.WriteLine(" --nosetup: Don't build and link benchmarks");
Console.WriteLine(" --perf:runid: Specify the ID to append to benchmark result files");
@@ -280,7 +280,6 @@ namespace LinkBench
public static int Main(String [] args)
{
- bool doClean = false;
bool doSetup = true;
bool doBuild = true;
string runId = "";
@@ -289,11 +288,7 @@ namespace LinkBench
for (int i = 0; i < args.Length; i++)
{
- if (String.Compare(args[i], "--clean", true) == 0)
- {
- doClean = true;
- }
- else if (String.Compare(args[i], "--nosetup", true) == 0)
+ if (String.Compare(args[i], "--nosetup", true) == 0)
{
doSetup = false;
}
@@ -343,6 +338,14 @@ namespace LinkBench
{
foreach (Benchmark benchmark in Benchmarks)
{
+ if (String.Compare(benchmark.Name, "CoreFX", true) == 0)
+ {
+ // CoreFX is not enabled by default, because the lab cannot run it yet.
+ // Jenkins runs on an older OS with path-length limit, which causes
+ // CoreFX build to fail.
+ continue;
+ }
+
benchmark.SetToRun();
}
}
@@ -350,11 +353,11 @@ namespace LinkBench
// Workspace is the ROOT of the coreclr tree.
// If CORECLR_REPO is not set, the script assumes that the location of sandbox
// is <path>\coreclr\sandbox.
- string sandbox = Directory.GetCurrentDirectory();
+ LinkBenchRoot = Directory.GetCurrentDirectory();
Workspace = Environment.GetEnvironmentVariable("CORECLR_REPO");
if (Workspace == null)
{
- Workspace = Directory.GetParent(sandbox).FullName;
+ Workspace = Directory.GetParent(LinkBenchRoot).FullName;
}
if (Workspace == null)
{
@@ -366,16 +369,9 @@ namespace LinkBench
ScriptDir = linkBenchSrcDir + "scripts\\";
AssetsDir = linkBenchSrcDir + "assets\\";
- string linkBenchRoot = sandbox + "\\LinkBench";
- string __dotNet = linkBenchRoot + "\\.dotNet\\dotnet.exe";
- Environment.SetEnvironmentVariable("LinkBenchRoot", linkBenchRoot );
- Environment.SetEnvironmentVariable("__dotnet1", linkBenchRoot + "\\.dotNet\\1.0.0\\dotnet.exe");
- Environment.SetEnvironmentVariable("__dotnet2", linkBenchRoot + "\\.dotNet\\2.0.0\\dotnet.exe");
-
- if (doClean)
- {
- Directory.Delete("LinkBench", true);
- }
+ Environment.SetEnvironmentVariable("LinkBenchRoot", LinkBenchRoot);
+ Environment.SetEnvironmentVariable("__dotnet1", LinkBenchRoot + "\\.Net1\\dotnet.exe");
+ Environment.SetEnvironmentVariable("__dotnet2", LinkBenchRoot + "\\.Net2\\dotnet.exe");
// Update the build files to facilitate the link step
if (doSetup)
@@ -388,7 +384,7 @@ namespace LinkBench
setup.WaitForExit();
if (setup.ExitCode != 0)
{
- Console.WriteLine("clone failed");
+ Console.WriteLine("Benchmark Setup failed");
return -2;
}
}
@@ -415,7 +411,7 @@ namespace LinkBench
setup.WaitForExit();
if (setup.ExitCode != 0)
{
- Console.WriteLine("Setup failed");
+ Console.WriteLine("Benchmark build failed");
return -3;
}
}
diff --git a/tests/src/performance/linkbench/scripts/build.cmd b/tests/src/performance/linkbench/scripts/build.cmd
index bbdcfa5417..12f9f3f951 100644
--- a/tests/src/performance/linkbench/scripts/build.cmd
+++ b/tests/src/performance/linkbench/scripts/build.cmd
@@ -1,3 +1,4 @@
+setlocal ENABLEDELAYEDEXPANSION
@echo off
REM Usage: Build.cmd <LinkBench assets directory>
@@ -5,7 +6,6 @@ setlocal
set AssetDir=%1
set ExitCode=0
-mkdir LinkBench 2> nul
pushd %LinkBenchRoot%
set __CORFLAGS="%VS140COMNTOOLS%\..\..\..\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\CorFlags.exe"
@@ -27,9 +27,9 @@ exit /b %ExitCode%
:HelloWorld
echo Build ** HelloWorld **
pushd %LinkBenchRoot%\HelloWorld
-%__dotnet2% restore -r win10-x64
-%__dotnet2% publish -c release -r win10-x64 /p:LinkDuringPublish=false --output bin\release\netcoreapp2.0\win10-x64\Unlinked
-%__dotnet2% publish -c release -r win10-x64 --output bin\release\netcoreapp2.0\win10-x64\Linked
+call %__dotnet2% restore -r win10-x64
+call %__dotnet2% publish -c release -r win10-x64 /p:LinkDuringPublish=false --output bin\release\netcoreapp2.0\win10-x64\Unlinked
+call %__dotnet2% publish -c release -r win10-x64 --output bin\release\netcoreapp2.0\win10-x64\Linked
if errorlevel 1 set ExitCode=1
popd
exit /b
@@ -37,9 +37,9 @@ exit /b
:WebAPI
echo Build ** WebAPI **
pushd %LinkBenchRoot%\WebAPI
-%__dotnet2% restore -r win10-x64
-%__dotnet2% publish -c release -r win10-x64 /p:LinkDuringPublish=false --output bin\release\netcoreapp2.0\win10-x64\unlinked
-%__dotnet2% publish -c release -r win10-x64 --output bin\release\netcoreapp2.0\win10-x64\linked
+call %__dotnet2% restore -r win10-x64
+call %__dotnet2% publish -c release -r win10-x64 /p:LinkDuringPublish=false --output bin\release\netcoreapp2.0\win10-x64\unlinked
+call %__dotnet2% publish -c release -r win10-x64 --output bin\release\netcoreapp2.0\win10-x64\linked
if errorlevel 1 set ExitCode=1
popd
exit /b
@@ -48,9 +48,9 @@ exit /b
echo Build ** MusicStore **
pushd %LinkBenchRoot%\JitBench\src\MusicStore
copy %AssetDir%\MusicStore\MusicStoreReflection.xml .
-%__dotnet2% restore -r win10-x64
-%__dotnet2% publish -c release -r win10-x64 /p:LinkerRootDescriptors=MusicStoreReflection.xml /p:LinkDuringPublish=false --output bin\release\netcoreapp2.0\win10-x64\unlinked
-%__dotnet2% publish -c release -r win10-x64 /p:LinkerRootDescriptors=MusicStoreReflection.xml --output bin\release\netcoreapp2.0\win10-x64\linked
+call %__dotnet2% restore -r win10-x64
+call %__dotnet2% publish -c release -r win10-x64 /p:LinkerRootDescriptors=MusicStoreReflection.xml /p:LinkDuringPublish=false --output bin\release\netcoreapp2.0\win10-x64\unlinked
+call %__dotnet2% publish -c release -r win10-x64 /p:LinkerRootDescriptors=MusicStoreReflection.xml --output bin\release\netcoreapp2.0\win10-x64\linked
if errorlevel 1 set ExitCode=1
popd
exit /b
@@ -67,7 +67,7 @@ pushd %LinkBenchRoot%\JitBench\src\MusicStore
copy %AssetDir%\MusicStore\Get-Crossgen.ps1
powershell -noprofile -executionPolicy RemoteSigned -file Get-Crossgen.ps1
pushd bin\release\netcoreapp2.0\win10-x64\
-mkdir R2R 2> nul
+mkdir R2R
call :SetupR2R unlinked
if errorlevel 1 set ExitCode=1
call :SetupR2R linked
@@ -91,8 +91,8 @@ pushd %LinkBenchRoot%\roslyn
REM Fetch ILLink
if not exist illink mkdir illink
cd illink
-copy %AssetDir%\Roslyn\illinkcsproj illink.csproj >nul
-%__dotnet1% restore --packages pkg
+copy %AssetDir%\Roslyn\illinkcsproj illink.csproj
+call %__dotnet1% restore --packages pkg
if errorlevel 1 set ExitCode=1
set __IlLinkDll=%cd%\pkg\microsoft.netcore.illink\0.1.9-preview\lib\netcoreapp1.1\illink.dll
cd ..
@@ -100,7 +100,7 @@ cd ..
REM Build CscCore
call Restore.cmd
cd src\Compilers\CSharp\CscCore
-%__dotnet1% publish -c Release -r win7-x64
+call %__dotnet1% publish -c Release -r win7-x64
if errorlevel 1 set ExitCode=1
REM Published CscCore to Binaries\Release\Exes\CscCore\win7-x64\publish
cd ..\..\..\..
@@ -112,13 +112,13 @@ mkdir Linked
REM Copy Unmanaged Assets
cd publish
FOR /F "delims=" %%I IN ('DIR /b *') DO (
- %__CORFLAGS% %%I >nul 2> nul
- if errorlevel 1 copy %%I ..\Linked >nul
+ %__CORFLAGS% %%I
+ if errorlevel 1 copy %%I ..\Linked
)
copy *.ni.dll ..\Linked
REM Run Linker
-%__dotnet1% %__IlLinkDll% -t -c link -a @%AssetDir%\Roslyn\RoslynRoots.txt -x %AssetDir%\Roslyn\RoslynRoots.xml -l none -out ..\Linked
+call %__dotnet1% %__IlLinkDll% -t -c link -a @%AssetDir%\Roslyn\RoslynRoots.txt -x %AssetDir%\Roslyn\RoslynRoots.xml -l none -out ..\Linked
if errorlevel 1 set ExitCode=1
popd
exit /b
@@ -133,9 +133,9 @@ copy ..\..\..\..\..\..\crossgen.exe
FOR /F %%I IN ('dir /b *.dll ^| find /V /I ".ni.dll" ^| find /V /I "System.Private.CoreLib" ^| find /V /I "mscorlib.dll"') DO (
REM Don't crossgen Corlib, since the native image already exists.
REM For all other MSIL files (corflags returns 0), run crossgen
- %__CORFLAGS% %%I >nul 2>nul
+ %__CORFLAGS% %%I
if not errorlevel 1 (
- crossgen.exe /Platform_Assemblies_Paths . %%I >nul 2>nul
+ crossgen.exe /Platform_Assemblies_Paths . %%I
if errorlevel 1 (
exit /b 1
)
diff --git a/tests/src/performance/linkbench/scripts/clone.cmd b/tests/src/performance/linkbench/scripts/clone.cmd
index df7ab77bdc..60cfe202b6 100644
--- a/tests/src/performance/linkbench/scripts/clone.cmd
+++ b/tests/src/performance/linkbench/scripts/clone.cmd
@@ -1,12 +1,11 @@
+setlocal ENABLEDELAYEDEXPANSION
@echo off
-set ROOT=%cd%\LinkBench
set EXITCODE=0
-
-if not exist %LinkBenchRoot% mkdir %LinkBenchRoot%
pushd %LinkBenchRoot%
-if not exist .dotnet call :DotNet
+if not exist %__dotnet1% call :DotNet
+
if defined __test_HelloWorld call :HelloWorld
if defined __test_WebAPI call :WebAPI
if defined __test_MusicStore call :MusicStore
@@ -19,22 +18,19 @@ exit /b %EXITCODE%
:DotNet
REM Roslyn needs SDK 1.0.0, other benchmarks need SDK 2.0.0
-mkdir .dotnet
-cd .dotnet
-mkdir 1.0.0
-mkdir 2.0.0
+mkdir .Net1
+mkdir .Net2
powershell -noprofile -executionPolicy RemoteSigned wget https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1 -OutFile dotnet-install.ps1
-powershell -noprofile -executionPolicy RemoteSigned -file dotnet-install.ps1 -InstallDir 1.0.0
-powershell -noprofile -executionPolicy RemoteSigned -file dotnet-install.ps1 -Channel master -InstallDir 2.0.0
-if not exist %__dotnet1% set EXITCODE=1
-if not exist %__dotnet2% set EXITCODE=1
-cd ..
+powershell -noprofile -executionPolicy RemoteSigned -file dotnet-install.ps1 -InstallDir .Net1
+powershell -noprofile -executionPolicy RemoteSigned -file dotnet-install.ps1 -Channel master -InstallDir .Net2 -version 2.0.0-preview2-005905
+if not exist %__dotnet1% set EXITCODE=1&& echo DotNet.1.0.0 uninstalled
+if not exist %__dotnet2% set EXITCODE=1&& echo DotNet.2.0.0 uninstalled
exit /b
:HelloWorld
mkdir HelloWorld
cd HelloWorld
-dotnet new console
+call %__dotnet2% new console
if errorlevel 1 set EXITCODE=1
cd ..
exit /b
@@ -42,7 +38,7 @@ exit /b
:WebAPI
mkdir WebAPI
cd WebAPI
-dotnet new webapi
+call %__dotnet2% new webapi
if errorlevel 1 set EXITCODE=1
cd ..
exit /b