diff options
author | Jan Kotas <jkotas@microsoft.com> | 2017-10-04 05:12:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-04 05:12:19 +0300 |
commit | d1223d2c92e1de67cebfa5c8668b67e6d6265d8c (patch) | |
tree | 3ced99ab743065aa833726a8979844c40edcd32b /tests | |
parent | e1df35035d7388003b0234941de278f557ef314d (diff) |
Delete VS2015 support (#4660)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CoreCLR/runtest/runtest.cmd | 33 | ||||
-rw-r--r-- | tests/runtest.cmd | 23 |
2 files changed, 17 insertions, 39 deletions
diff --git a/tests/CoreCLR/runtest/runtest.cmd b/tests/CoreCLR/runtest/runtest.cmd index f89a6fced..928f6057c 100644 --- a/tests/CoreCLR/runtest/runtest.cmd +++ b/tests/CoreCLR/runtest/runtest.cmd @@ -7,10 +7,8 @@ set __BuildType=Debug set __BuildOS=Windows_NT :: Default to highest Visual Studio version available -set __VSVersion=vs2015 - -if defined VS120COMNTOOLS set __VSVersion=vs2013 -if defined VS140COMNTOOLS set __VSVersion=vs2015 +set __VSVersion=vs2017 +set __VSProductVersion=150 :: Define a prefix for most output progress messages that come from this script. That makes :: it easier to see where these are coming from. Note that there is a trailing space here. @@ -48,9 +46,6 @@ if /i "%1" == "debug" (set __BuildType=Debug&shift&goto Arg_Loop if /i "%1" == "release" (set __BuildType=Release&shift&goto Arg_Loop) if /i "%1" == "checked" (set __BuildType=Checked&shift&goto Arg_Loop) -if /i "%1" == "vs2013" (set __VSVersion=%1&shift&goto Arg_Loop) -if /i "%1" == "vs2015" (set __VSVersion=%1&shift&goto Arg_Loop) - if /i "%1" == "SkipWrapperGeneration" (set __SkipWrapperGeneration=true&shift&goto Arg_Loop) if /i "%1" == "Exclude" (set __Exclude=%2&shift&shift&goto Arg_Loop) if /i "%1" == "Exclude0" (set __Exclude0=%2&shift&shift&goto Arg_Loop) @@ -96,31 +91,15 @@ if not defined XunitTestReportDirBase set XunitTestReportDirBase=%XunitTestBinB if not exist %__LogsDir% md %__LogsDir% -set __VSProductVersion= -if /i "%__VSVersion%" == "vs2013" set __VSProductVersion=120 -if /i "%__VSVersion%" == "vs2015" set __VSProductVersion=140 - :: Check presence of VS if not defined VS%__VSProductVersion%COMNTOOLS goto NoVS set __VSToolsRoot=!VS%__VSProductVersion%COMNTOOLS! if %__VSToolsRoot:~-1%==\ set "__VSToolsRoot=%__VSToolsRoot:~0,-1%" -:: Does VS really exist? -if not exist "%__VSToolsRoot%\..\IDE\devenv.exe" goto NoVS -if not exist "%__VSToolsRoot%\..\..\VC\vcvarsall.bat" goto NoVS -if not exist "%__VSToolsRoot%\VsDevCmd.bat" goto NoVS - -if /i "%__VSVersion%" =="vs2015" goto MSBuild14 -set _msbuildexe="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe" -if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe" -if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" -goto :CheckMSBuild14 -:MSBuild14 -set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe" -:CheckMSBuild14 -if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe" -if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions. && exit /b 1 +set _msbuildexe="%VSINSTALLDIR%\MSBuild\15.0\Bin\MSBuild.exe" + +if not exist !_msbuildexe! (echo Error: Could not find MSBuild.exe. Please see https://github.com/dotnet/corert/blob/master/Documentation/prerequisites-for-building.md for build instructions. && exit /b 1) :: Set the environment for the build- VS cmd prompt echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat" @@ -373,6 +352,6 @@ echo CORE_ROOT The path to the runtime exit /b 1 :NoVS -echo Visual Studio 2013+ ^(Community is free^) is a prerequisite to build this repository. +echo Visual Studio 2017 ^(Community is free^) is a prerequisite to build this repository. echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites exit /b 1 diff --git a/tests/runtest.cmd b/tests/runtest.cmd index fc2cf9c8a..684234174 100644 --- a/tests/runtest.cmd +++ b/tests/runtest.cmd @@ -14,10 +14,6 @@ set CoreRT_CoreCLRTargetsFile= set CoreRT_TestLogFileName=testresults.xml set CoreRT_TestName=* -:: Default to highest Visual Studio version available -set CoreRT_VSVersion=vs2015 -if defined VS150COMNTOOLS set CoreRT_VSVersion=vs2017 - :ArgLoop if "%1" == "" goto :ArgsDone if /i "%1" == "/?" goto :Usage @@ -25,9 +21,6 @@ if /i "%1" == "x64" (set CoreRT_BuildArch=x64&&shift&goto ArgLoop) if /i "%1" == "x86" (set CoreRT_BuildArch=x86&&shift&goto ArgLoop) if /i "%1" == "arm" (set CoreRT_BuildArch=arm&&shift&goto ArgLoop) -if /i "%1" == "vs2017" (set CoreRT_VSVersion=vs2017&shift&goto Arg_Loop) -if /i "%1" == "vs2015" (set CoreRT_VSVersion=vs2015&shift&goto Arg_Loop) - if /i "%1" == "debug" (set CoreRT_BuildType=Debug&shift&goto ArgLoop) if /i "%1" == "release" (set CoreRT_BuildType=Release&shift&goto ArgLoop) if /i "%1" == "/coreclr" ( @@ -110,13 +103,19 @@ if NOT "%CoreRT_MultiFileConfiguration%" == "" ( set __LogDir=%CoreRT_TestRoot%\..\bin\Logs\%__BuildStr%\tests -:: VS2017 changed the location of vcvarsall.bat. -if /i "%__VSVersion%" == "vs2017" ( - call "!VS150COMNTOOLS!\..\..\VC\Auxiliary\Build\vcvarsall.bat" %CoreRT_BuildArch% -) else ( - call "!VS140COMNTOOLS!\..\..\VC\vcvarsall.bat" %CoreRT_BuildArch% +if defined VisualStudioVersion goto :RunVCVars + +set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" +if exist %_VSWHERE% ( + for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools ) +call "%_VSCOMNTOOLS%\VsDevCmd.bat" + +:RunVCVars + +call "!VS150COMNTOOLS!\..\..\VC\Auxiliary\Build\vcvarsall.bat" %CoreRT_BuildArch% + if "%CoreRT_RunCoreCLRTests%"=="true" goto :TestExtRepo if /i "%__BuildType%"=="Debug" ( |