[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[win-pv-devel] [PATCH] Handle return codes from MSBuild


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Tue, 10 Mar 2020 10:47:03 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=owen.smith@xxxxxxxxxx; spf=Pass smtp.mailfrom=owen.smith@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Tue, 10 Mar 2020 10:47:33 +0000
  • Ironport-sdr: XGYeDTmyS2mlwa6d+hSIlioVt5iWjxgV6ZRflEuMXJ9CpftMnl3KtpOomz8NdMT6ALgeIgCrPu fQT8Nu9XvDeQNKN/bkWHJGBZ3P054CzxPlepOP8q1WjEdIBYvGp/dubYizlL2WRAfmpdtZ5aSl /WqP0KWVDPoVCnxHTJjyfi6FqLM3BjkJse99EgUp7KDrwox7Em4FtouCnndAxYWHk158MJYAb8 d/pMddnf/6ul9kQbkzovMfDtfqqd/KyS5la9TnrXOR4eXDnUAOKeY4yTWDSpLB85Mss1b9/BGX 8aU=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

If MSBuild fails, it returns a non-zero return value. Forward this
failure to the calling scripts to fail earlier.

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 build.ps1   | 4 ++++
 msbuild.ps1 | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/build.ps1 b/build.ps1
index cc352e0..c66ac05 100644
--- a/build.ps1
+++ b/build.ps1
@@ -29,6 +29,10 @@ Function Build {
                Type = $Type
                }
        & ".\msbuild.ps1" @params
+       if ($LASTEXITCODE -ne 0) {
+               Write-Host -ForegroundColor Red "ERROR: Build failed, code:" 
$LASTEXITCODE
+               Exit $LASTEXITCODE
+       }
 }
 
 Function SdvBuild {
diff --git a/msbuild.ps1 b/msbuild.ps1
index 17c1a3b..670050c 100644
--- a/msbuild.ps1
+++ b/msbuild.ps1
@@ -31,6 +31,10 @@ Function Run-MSBuild {
        $c += Join-Path -Path $SolutionPath -ChildPath $Name
 
        Invoke-Expression $c
+       if ($LASTEXITCODE -ne 0) {
+               Write-Host -ForegroundColor Red "ERROR: MSBuild failed, code:" 
$LASTEXITCODE
+               Exit $LASTEXITCODE
+       }
 }
 
 Function Run-MSBuildSDV {
-- 
2.16.2.windows.1


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.