lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject lucenenet git commit: build\build.ps1 - added exit code checking for test runner
Date Sun, 23 Apr 2017 11:03:31 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/api-work a340497b5 -> bc77c1ca1


build\build.ps1 - added exit code checking for test runner


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/bc77c1ca
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/bc77c1ca
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/bc77c1ca

Branch: refs/heads/api-work
Commit: bc77c1ca1577a31b28f80cf5e522c76768965d79
Parents: a340497
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Apr 23 18:02:58 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Apr 23 18:02:58 2017 +0700

----------------------------------------------------------------------
 build/build.ps1 | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bc77c1ca/build/build.ps1
----------------------------------------------------------------------
diff --git a/build/build.ps1 b/build/build.ps1
index d9031cc..e45c679 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -147,6 +147,10 @@ task Test -description "This task runs the tests" {
 			Write-Host $testExpression -ForegroundColor Magenta
 
 			Invoke-Expression $testExpression
+			# fail the build on negative exit codes (NUnit errors - if positive it is a test count
or, if 1, it could be a dotnet error)
+			if ($LASTEXITCODE -lt 0) {
+				throw "Test execution failed"
+			}
 		}
 	}
 }


Mime
View raw message