aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/test')
-rw-r--r--libbuild2/test/operation.cxx4
-rw-r--r--libbuild2/test/rule.cxx16
2 files changed, 12 insertions, 8 deletions
diff --git a/libbuild2/test/operation.cxx b/libbuild2/test/operation.cxx
index 2535adb..640d2fe 100644
--- a/libbuild2/test/operation.cxx
+++ b/libbuild2/test/operation.cxx
@@ -63,7 +63,8 @@ namespace build2
"tested",
"has nothing to test", // We cannot "be tested".
execution_mode::first,
- 1 /* concurrency */,
+ 1 /* concurrency */,
+ true /* keep_going */,
&pre_test,
nullptr,
nullptr,
@@ -84,6 +85,7 @@ namespace build2
op_update.name_done,
op_update.mode,
op_update.concurrency,
+ op_update.keep_going,
op_update.pre_operation,
op_update.post_operation,
op_update.operation_pre,
diff --git a/libbuild2/test/rule.cxx b/libbuild2/test/rule.cxx
index 28eb35b..b3a73ce 100644
--- a/libbuild2/test/rule.cxx
+++ b/libbuild2/test/rule.cxx
@@ -745,7 +745,9 @@ namespace build2
//
auto term_pipe = [&timed_wait] (pipe_process* pp)
{
- diag_record dr;
+ // Delay the failure until we process the entire pipeline.
+ //
+ maybe_diag_record dr;
// Terminate processes gracefully and set the terminate flag for
// them.
@@ -962,7 +964,7 @@ namespace build2
//
if (!fail)
{
- diag_record dr;
+ maybe_diag_record dr;
// Note that there can be a race, so that the process we have
// terminated due to reaching the deadline has in fact exited
@@ -983,14 +985,14 @@ namespace build2
if (!pe)
{
- dr << "terminated: execution timeout expired";
+ *dr << "terminated: execution timeout expired";
if (p->unread_stderr)
dr << error << "stderr not closed after exit";
}
else if (!pe->normal () || pe->code () != 0)
{
- dr << *pe;
+ *dr << *pe;
if (p->unread_stderr)
dr << error << "stderr not closed after exit";
@@ -999,7 +1001,7 @@ namespace build2
{
assert (p->unread_stderr);
- dr << "stderr not closed after exit";
+ *dr << "stderr not closed after exit";
}
if (verb == 1)
@@ -1009,9 +1011,9 @@ namespace build2
for (pipe_process* p (b); p != nullptr; p = p->next)
{
if (p != b)
- dr << " | ";
+ *dr << " | ";
- print_process (dr, p->args);
+ print_process (*dr, p->args);
}
}
}