diff options
Diffstat (limited to 'bbot/agent/agent.cxx')
-rw-r--r-- | bbot/agent/agent.cxx | 30 |
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) |