aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/test/rule.cxx9
-rw-r--r--build2/test/script/runner.cxx15
2 files changed, 9 insertions, 15 deletions
diff --git a/build2/test/rule.cxx b/build2/test/rule.cxx
index 91a6806..171cbac 100644
--- a/build2/test/rule.cxx
+++ b/build2/test/rule.cxx
@@ -634,21 +634,18 @@ namespace build2
if (pr) // First failure?
dr << fail << "test " << t << " failed"; // Multi test: test 1.
+ dr << error;
+ print_process (dr, args);
+
if (!pe.normal ())
{
- dr << error;
- print_process (dr, args);
dr << " terminated abnormally: " << pe.description ();
if (pe.core ())
dr << " (core dumped)";
}
else
- {
- dr << error;
- print_process (dr, args);
dr << " exited with code " << static_cast<uint16_t> (pe.code ());
- }
}
return pr && wr;
diff --git a/build2/test/script/runner.cxx b/build2/test/script/runner.cxx
index 5107144..105039a 100644
--- a/build2/test/script/runner.cxx
+++ b/build2/test/script/runner.cxx
@@ -342,22 +342,19 @@ namespace build2
//
if (!pe.normal () || pe.code () > 1)
{
- diag_record dr (fail (ll));
+ diag_record d (fail (ll));
+ print_process (d, args);
if (!pe.normal ())
{
- print_process (dr, args);
- dr << " terminated abnormally: " << pe.description ();
+ d << " terminated abnormally: " << pe.description ();
if (pe.core ())
- dr << " (core dumped)";
+ d << " (core dumped)";
}
else
- {
- print_process (dr, args);
- dr << " exited with code "
- << static_cast<uint16_t> (pe.code ());
- }
+ d << " exited with code "
+ << static_cast<uint16_t> (pe.code ());
}
// Output doesn't match the expected result.