Skip to content

Commit

Permalink
Address code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
4creators committed Oct 27, 2017
1 parent 6df222e commit 2ab0c55
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
6 changes: 2 additions & 4 deletions build-test.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set __BuildOS=Windows_NT

:: 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.
set __MsgPrefix=BUILDTEST:
set "__MsgPrefix=BUILDTEST: "

:: Default to highest Visual Studio version available
::
Expand All @@ -33,7 +33,7 @@ if defined VisualStudioVersion (

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
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" (
Expand Down Expand Up @@ -123,8 +123,6 @@ if defined __BuildAgainstPackagesArg (
)
)

:: echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat"
:: call "%__VSToolsRoot%\VsDevCmd.bat"
@if defined _echo @echo on

set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch%
Expand Down
4 changes: 2 additions & 2 deletions run.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ if defined VisualStudioVersion (

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
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" (
echo Error: Visual Studio 2015 or 2017 required.
echo %__MsgPrefix%Error: Visual Studio 2015 or 2017 required.
echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
exit /b 1
)
Expand Down
10 changes: 3 additions & 7 deletions tests/runtest.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if defined VisualStudioVersion (

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
for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
)
if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
if not exist "%_VSCOMNTOOLS%" (
Expand Down Expand Up @@ -159,10 +159,6 @@ if not exist "%__VSToolsRoot%\VsDevCmd.bat" goto NoVS
:: Does MSBuild really exist?
if not exist %_msbuildexe% echo %__MsgPrefix%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 the environment for the build- VS cmd prompt
:: echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat"
:: call "%__VSToolsRoot%\VsDevCmd.bat"

if not defined VSINSTALLDIR (
echo %__MsgPrefix%Error: runtest.cmd should be run from a Visual Studio Command Prompt. Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
exit /b 1
Expand Down Expand Up @@ -331,7 +327,7 @@ if %__exitCode% neq 0 (
exit /b 0
)

echo Successfully precompiled %2
echo %__MsgPrefix%Successfully precompiled %2
exit /b 0

:jitdisasm
Expand Down Expand Up @@ -385,7 +381,7 @@ set __msbuildLogArgs=^
set __msbuildArgs=%* %__msbuildCommonArgs% %__msbuildLogArgs%

@REM The next line will overwrite the existing log file, if any.
echo %_msbuildexe% %__msbuildArgs%
echo %__MsgPrefix%%_msbuildexe% %__msbuildArgs%
echo Invoking: %_msbuildexe% %__msbuildArgs% > "%__BuildLog%"

%_msbuildexe% %__msbuildArgs%
Expand Down

0 comments on commit 2ab0c55

Please sign in to comment.