lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [5/5] git commit: adding fail scenarios for exit codes
Date Sat, 19 Jul 2014 20:42:08 GMT
adding fail scenarios for exit codes


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

Branch: refs/heads/pcl
Commit: d416bcc1a3b15574155a8a93becb168d5d9dfc1f
Parents: f83d63a
Author: Michael Herndon <mherndon@michaelherndon.com>
Authored: Sat Jul 19 13:15:04 2014 -0400
Committer: Michael Herndon <mherndon@michaelherndon.com>
Committed: Sat Jul 19 13:15:04 2014 -0400

----------------------------------------------------------------------
 build.fsx | 35 ++++++++++++++++++++++-------------
 1 file changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/d416bcc1/build.fsx
----------------------------------------------------------------------
diff --git a/build.fsx b/build.fsx
index ebec56c..a26f192 100644
--- a/build.fsx
+++ b/build.fsx
@@ -34,8 +34,11 @@ Target "Restore" (fun _ ->
                 info.FileName <- exe
                 info.Arguments <- command
             ) (TimeSpan.FromMinutes 5.0))
-    let code = sprintf "%i" out.ExitCode
-    trace code
+    
+    let exitCode = out.ExitCode
+    
+    if not (exitCode = 0 || exitCode = 100) then 
+        failwithf "Unable to Restore Packages: %i" exitCode
 )
 
 Target "Build:Core" (fun _ ->
@@ -50,7 +53,10 @@ Target "Build:Core" (fun _ ->
                 info.Arguments <- command.ToString()
             ) (TimeSpan.FromMinutes 5.0))
 
-    trace "done"
+    let exitCode = out.ExitCode
+    
+    if not (exitCode = 0 || exitCode = 100) then 
+        failwithf "Unable to Build Core: %i" exitCode
 )
 
 Target "Build:TestFramework" (fun _ ->
@@ -66,8 +72,10 @@ Target "Build:TestFramework" (fun _ ->
                 info.Arguments <- command.ToString()
             ) (TimeSpan.FromMinutes 5.0))
    
-    let code = sprintf "%i" out.ExitCode
-    trace code
+    let exitCode = out.ExitCode
+    
+    if not (exitCode = 0 || exitCode = 100) then 
+        failwithf "Unable to Build TestFramework: %i" exitCode
 )
 
 Target "Build:Core:Tests" (fun _ ->
@@ -83,8 +91,10 @@ Target "Build:Core:Tests" (fun _ ->
                 info.Arguments <- command.ToString()
             ) (TimeSpan.FromMinutes 5.0))
 
-    let code = sprintf "%i" out.ExitCode
-    trace code
+    let exitCode = out.ExitCode
+    
+    if not (exitCode = 0 || exitCode = 100) then 
+        failwithf "Unable to Build Core Tests: %i" exitCode
 )
 
 Target "Test:Core" (fun _ ->
@@ -99,15 +109,14 @@ Target "Test:Core" (fun _ ->
                 info.Arguments <- command.ToString()
             ) (TimeSpan.FromMinutes 5.0))
 
-    let code = sprintf "%i" out.ExitCode
-    let message = 
-        if out.ExitCode = 0 then "pass"
-        else "fail"
-    trace message
+    let exitCode = out.ExitCode
+    
+    if not (exitCode = 0 || exitCode = 100) then 
+        failwithf "Tests Failed: %i" exitCode
 )
 
 Target "Default" (fun _ ->
-    trace "Hello Word"
+    trace "Done!"
 )
 
 "Clean"


Mime
View raw message