summaryrefslogtreecommitdiff
path: root/tests/buildtest.cmd
diff options
context:
space:
mode:
authorKyungwoo Lee <kyulee@microsoft.com>2016-02-19 11:06:41 -0800
committerKyungwoo Lee <kyulee@microsoft.com>2016-02-19 14:35:45 -0800
commit06f6edeffcae1905cc77a130c7bc916188eba1c7 (patch)
treed479e2d123a1d88baad9cc66850d55f452f8f547 /tests/buildtest.cmd
parent5a49e66de150413ad8277bdbc8c2dacf0d461eae (diff)
downloadcoreclr-06f6edeffcae1905cc77a130c7bc916188eba1c7.tar.gz
coreclr-06f6edeffcae1905cc77a130c7bc916188eba1c7.tar.bz2
coreclr-06f6edeffcae1905cc77a130c7bc916188eba1c7.zip
Fix clean test build
I often fall into a build failure like the following when passing /clean E:\Github\coreclr\tests\runtest.proj : error MSB4057: The target "rebuild" does not exist in the project. runtest.proj is actually invoked in two places one from a part of build.cmd targeting CreateTestOverlay only, and the other from runtest.cmd, which creates wrapper and actually running the tests. So, definining "rebuild" target that does "clean" and "build" doesn't solve this problem. The fix is to not target "rebuild" in the former case since we are explicitly targeting "CreateTestOverlay" only. Instead of putting "/t:rebuild" in the common msbuild argument, I added it to each instance except this case.
Diffstat (limited to 'tests/buildtest.cmd')
-rw-r--r--tests/buildtest.cmd6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/buildtest.cmd b/tests/buildtest.cmd
index 279ec2a5d3..3e1b4afddd 100644
--- a/tests/buildtest.cmd
+++ b/tests/buildtest.cmd
@@ -156,7 +156,7 @@ if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see h
:: The issue is that we extend the build with our own targets which
:: means that that rebuilding cannot successfully delete the task
:: assembly.
-set __msbuildCommonArgs=/nologo /nodeReuse:false %__msbuildCleanBuildArgs% %__msbuildExtraArgs%
+set __msbuildCommonArgs=/nologo /nodeReuse:false %__msbuildExtraArgs%
if not defined __BuildSequential (
set __msbuildCommonArgs=%__msbuildCommonArgs% /maxcpucount
@@ -204,7 +204,7 @@ if not exist "%__NativeTestIntermediatesDir%\install.vcxproj" (
)
set __BuildLogRootName=Tests_Native
-call :msbuild "%__NativeTestIntermediatesDir%\install.vcxproj" /p:Configuration=%__BuildType% /p:Platform=%__BuildArch%
+call :msbuild "%__NativeTestIntermediatesDir%\install.vcxproj" %__msbuildCleanBuildArgs% /p:Configuration=%__BuildType% /p:Platform=%__BuildArch%
if errorlevel 1 exit /b 1
REM endlocal to rid us of environment changes from vcvarsall.bat
@@ -230,7 +230,7 @@ if not defined VSINSTALLDIR (
exit /b 1
)
-set __msbuildManagedBuildArgs=
+set __msbuildManagedBuildArgs=%__msbuildCleanBuildArgs%
if defined __crossgen (
echo Building tests with CrossGen enabled.