diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2022-11-24 12:20:02 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2022-11-24 12:20:02 +0300 |
commit | 830240bc527331c9b4998810b50a3cd6c57f9f60 (patch) | |
tree | e917729845d6a0c3857398f0e3d794cff3caf4aa | |
parent | a98ddbbf1c88e4ff29b20b8256e8b9c8fc1c2507 (diff) |
Fix forcing diag buffering for diff in simple test
-rw-r--r-- | libbuild2/test/rule.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libbuild2/test/rule.cxx b/libbuild2/test/rule.cxx index 5992414..0ee7641 100644 --- a/libbuild2/test/rule.cxx +++ b/libbuild2/test/rule.cxx @@ -692,9 +692,11 @@ namespace build2 for (next++; *next != nullptr; next++) ; next++; + bool last (*next == nullptr); + // Redirect stdout to a pipe unless we are last. // - int out (*next != nullptr ? -1 : ofd); + int out (last ? ofd : -1); // Propagate the pointer to the left-most program. // @@ -704,7 +706,7 @@ namespace build2 // pipe_process pp (t.ctx, args, - next == nullptr && ofd == 2, + last && ofd == 2, prev, prev != nullptr ? prev->next : nullptr); @@ -1023,7 +1025,7 @@ namespace build2 } })); - if (*next != nullptr) + if (!last) run_test (t, next, ofd, deadline, &pp); // Complete the pipeline execution, if not done yet. |