build-pspp: Improve build failure handling.
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 21 Mar 2024 20:11:37 +0000 (13:11 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 21 Mar 2024 20:11:37 +0000 (13:11 -0700)
build-pspp

index 09a0e89c375c71eefb743c175253b259ba60b39b..b449a5c89c5efee0df14c94dfed2243e0a58b530 100755 (executable)
@@ -117,6 +117,7 @@ def write_timing(id, time):
 
 
 def fail():
+    set_var("result", "failure")
     sys.stderr.write("Build failed, refer to:\n\t%s\nfor details.\n" % logfile)
     sys.exit(1)
 
@@ -414,7 +415,7 @@ if len(args) == 2:
     if gnulib_commit is None:
         sys.stderr.write("%s does not specify a Git commit number\n"
                          % fullname)
-        sys.exit(1)
+        fail()
     set_var("gnulib_commit", gnulib_commit)
 
     version = add_commit_to_version("pspp", revision, "pspp",
@@ -586,3 +587,4 @@ if build_binary:
     # distcleancheck
 
 start_step("Success")
+set_var("result", "success")