diff options
author | Michelle McDaniel <adiaaida@gmail.com> | 2018-01-23 08:30:28 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-23 08:30:28 -0800 |
commit | 62a90aa7e52363ca56e79713443ee0b6232184d8 (patch) | |
tree | d905f429660133c48e61fcf043df176a1dab51d8 /tests | |
parent | 71f783ce59ccf7576f0415bd79e4ce967c19bb97 (diff) | |
download | coreclr-62a90aa7e52363ca56e79713443ee0b6232184d8.tar.gz coreclr-62a90aa7e52363ca56e79713443ee0b6232184d8.tar.bz2 coreclr-62a90aa7e52363ca56e79713443ee0b6232184d8.zip |
Remove hardcoded paths in linkbench scripts (#15939)
* Remove hardcoded paths in linkbench scripts
Linkbench has hardcoded paths based off of VS140COMNTOOLS, which not all
machines will have (ie, machines with only VS2017 installed). This
change removes the hardcoded paths, and replaces them with checks to
make sure the tool is on the path (which they will be if we are in a VS
environment of any kind - which we would have been in if
VS140COMNTOOLS was already set).
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/performance/linkbench/scripts/build.cmd | 8 | ||||
-rw-r--r-- | tests/src/performance/linkbench/scripts/getcert.cmd | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/src/performance/linkbench/scripts/build.cmd b/tests/src/performance/linkbench/scripts/build.cmd index 069095923d..f680ceb485 100644 --- a/tests/src/performance/linkbench/scripts/build.cmd +++ b/tests/src/performance/linkbench/scripts/build.cmd @@ -8,11 +8,7 @@ set AssetDir=%1 set ExitCode=0 pushd %LinkBenchRoot% -set __CORFLAGS="%VS140COMNTOOLS%\..\..\..\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\CorFlags.exe" -if not exist %__CORFLAGS% ( - echo corflags.exe not found - exit /b -1 -) +where.exe /Q CorFlags.exe || (echo [Error] CorFlags.exe is not on the environment & exit /b 1) if defined __test_HelloWorld call :HelloWorld if defined __test_WebAPI call :WebAPI @@ -88,7 +84,7 @@ 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 + CorFlags.exe %%I if not errorlevel 1 ( crossgen.exe /Platform_Assemblies_Paths . %%I if errorlevel 1 ( diff --git a/tests/src/performance/linkbench/scripts/getcert.cmd b/tests/src/performance/linkbench/scripts/getcert.cmd index e02f72d714..d7622b7b64 100644 --- a/tests/src/performance/linkbench/scripts/getcert.cmd +++ b/tests/src/performance/linkbench/scripts/getcert.cmd @@ -1,2 +1,5 @@ @echo off -"%VS140COMNTOOLS%\..\..\VC\bin\amd64\dumpbin.exe" /headers %1 | findstr /C:"Certificates Directory + +where.exe /Q dumpbin.exe || (echo [Error] dumpbin.exe is not on the environment & exit /b 1) + +dumpbin.exe /headers %1 | findstr /C:"Certificates Directory |