aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/test/script/runner.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-01-30 14:49:10 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-01-30 14:49:10 +0300
commit5a22b156fac945ed03503b12ebfda4cc9e80772d (patch)
tree53a3c4dff56b25ffaa4da7fe5f3d37c991a0a1d4 /libbuild2/test/script/runner.cxx
parentc4fcbad1cb603756dc4dac65392feb86be1a722d (diff)
Swap order of matching command stdout and stderr by testscript runner
Diffstat (limited to 'libbuild2/test/script/runner.cxx')
-rw-r--r--libbuild2/test/script/runner.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbuild2/test/script/runner.cxx b/libbuild2/test/script/runner.cxx
index 181c5ce..7ba25a6 100644
--- a/libbuild2/test/script/runner.cxx
+++ b/libbuild2/test/script/runner.cxx
@@ -2014,11 +2014,15 @@ namespace build2
// expectations. Note that stdout is only redirected to file for the
// last command in the pipeline.
//
+ // The thinking behind matching stderr first is that if it mismatches,
+ // then the program probably misbehaves (executes wrong functionality,
+ // etc) in which case its stdout doesn't really matter.
+ //
if (success)
success =
+ check_output (pr, esp, isp, err, ll, sp, diag, "stderr") &&
(!last ||
- check_output (pr, osp, isp, out, ll, sp, diag, "stdout")) &&
- check_output (pr, esp, isp, err, ll, sp, diag, "stderr");
+ check_output (pr, osp, isp, out, ll, sp, diag, "stdout"));
return success;
}