aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-03-27 10:55:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-03-27 10:55:37 +0200
commitd9117ec3a851daeccb10f3529fc13c26a40e9ac3 (patch)
tree4c53b8bc7d5e2d2cdefcb340cee0d79c79dca8e3
parentbf36936a5f96a517871c3d3befef89fd59181b2f (diff)
Abort instead of suspending timed-out interactive builds
-rw-r--r--bbot/agent/agent.cxx30
1 files changed, 19 insertions, 11 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index d85ecf5..ff772bf 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -1007,20 +1007,28 @@ try
}
}
- if (to == 0)
- return soft_fail ("build timeout");
-
- l3 ([&]{trace << "completed build in " << build_to - to << "s";});
-
- // Parse the result manifest.
- //
- try
+ if (to != 0)
{
- r = parse_manifest<result_manifest> (rf, "result", false);
+ l3 ([&]{trace << "completed build in " << build_to - to << "s";});
+
+ // Parse the result manifest.
+ //
+ try
+ {
+ r = parse_manifest<result_manifest> (rf, "result", false);
+ }
+ catch (const failed&)
+ {
+ r.status = result_status::abnormal; // Soft-fail below.
+ }
}
- catch (const failed&)
+ else
{
- r.status = result_status::abnormal; // Soft-fail below.
+ // Suspend the machine for non-interactive builds and fall through
+ // to abort for interactive (i.e., "the user went for lunch" case).
+ //
+ if (!tm.interactive)
+ return soft_fail ("build timeout");
}
if (r.status == result_status::abnormal)