diff --git a/src/SourceBuild/content/build.sh b/src/SourceBuild/content/build.sh index 2c8551761..a56de7c8f 100755 --- a/src/SourceBuild/content/build.sh +++ b/src/SourceBuild/content/build.sh @@ -33,6 +33,7 @@ usage() echo "" echo "Advanced settings:" + echo " --build-tests Build repository tests. May not be supported with --source-only" echo " --ci Set when running on CI server" echo " --clean-while-building Cleans each repo after building (reduces disk space usage, short: -cwb)" echo " --excludeCIBinarylog Don't output binary log (short: -nobl)" @@ -161,6 +162,9 @@ while [[ $# > 0 ]]; do ;; # Advanced settings + -build-tests) + properties="$properties /p:DotNetBuildTests=true" + ;; -ci) ci=true ;; diff --git a/src/SourceBuild/content/eng/build.ps1 b/src/SourceBuild/content/eng/build.ps1 index c13ce050a..b354a8342 100644 --- a/src/SourceBuild/content/eng/build.ps1 +++ b/src/SourceBuild/content/eng/build.ps1 @@ -10,6 +10,7 @@ Param( [switch][Alias('h')]$help, # Advanced settings + [switch]$buildTests, [switch]$ci, [switch][Alias('cwb')]$cleanWhileBuilding, [switch][Alias('nobl')]$excludeCIBinarylog, @@ -30,6 +31,7 @@ function Get-Usage() { Write-Host "" Write-Host "Advanced settings:" + Write-Host " -build-tests Build repository tests" Write-Host " -ci Set when running on CI server" Write-Host " -cleanWhileBuilding Cleans each repo after building (reduces disk space usage, short: -cwb)" Write-Host " -excludeCIBinarylog Don't output binary log (short: -nobl)" @@ -53,12 +55,14 @@ function Build { $bl = if ($binaryLog) { '/bl:' + (Join-Path $LogDir 'Build.binlog') } else { '' } $cwb = if ($cleanWhileBuilding) { '/p:CleanWhileBuilding=true' } else { '' } + $btst = if ($buildTests) { '/p:DotNetBuildTests=true' } else { '' } $buildProj = Join-Path $RepoRoot 'build.proj' MSBuild $buildProj ` $bl ` /p:Configuration=$configuration ` $cwb ` + $btst ` @properties }