From e9f9661589acd0e553496c06aad4f89c9953ab5c Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Thu, 10 Nov 2016 22:44:19 -0800 Subject: [PATCH] Script now verifies our build output --- build/Targets/Dependencies.props | 1 + build/scripts/test-build-correctness.ps1 | 32 ++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/build/Targets/Dependencies.props b/build/Targets/Dependencies.props index a94c441c9af..dd5daee8ee4 100644 --- a/build/Targets/Dependencies.props +++ b/build/Targets/Dependencies.props @@ -4,6 +4,7 @@ 1.9.4 14.3.0 + 1.0.58 14.3.0 1.1.0 1.0.27 diff --git a/build/scripts/test-build-correctness.ps1 b/build/scripts/test-build-correctness.ps1 index b64deab7f4e..73f117cc7d7 100644 --- a/build/scripts/test-build-correctness.ps1 +++ b/build/scripts/test-build-correctness.ps1 @@ -25,8 +25,10 @@ function Get-PackagesPath { return $packagesPath } +pushd $sourcePath try { + # TODO: RepoUtil needs to generate a powershell file that can be imported for # values like this. $structuredLoggerVersion = "1.0.58" @@ -35,14 +37,40 @@ try write-host "Building Roslyn.sln with logging support" $structuredLoggerPath = join-path $packagesPath "Microsoft.Build.Logging.StructuredLogger\$structuredLoggerVersion\lib\net46\StructuredLogger.dll" - $roslynSlnPath = join-path $sourcePath "Roslyn.sln" $logPath = join-path $binariesPath "build.xml" - & msbuild /v:m /m /logger:StructuredLogger`,$structuredLoggerPath`;$logPath $roslynSlnPath + & msbuild /v:m /m /logger:StructuredLogger`,$structuredLoggerPath`;$logPath Roslyn.sln + if (-not $?) { + exit 1 + } + write-host "" + + # Verify the state of our various build artifacts + write-host "Running BuildBoss" + $buildBossPath = join-path $binariesPath "Exes\BuildBoss\BuildBoss.exe" + & $buildBossPath Roslyn.sln Compilers.sln src\Samples\Samples.sln CrossPlatform.sln "build\Targets" $logPath + if (-not $?) { + exit 1 + } + write-host "" + + # Verify the state of our project.jsons + write-host "Running RepoUtil" + $repoUtilPath = join-path $binariesPath "Exes\RepoUtil\RepoUtil.exe" + & $repoUtilPath verify + if (-not $?) { + exit 1 + } + write-host "" + exit 0 } catch [exception] { write-host $_.Exception exit -1 } +finally +{ + popd +} -- GitLab