diff options
author | Havard Skinnemoen <hskinnemoen@google.com> | 2020-06-28 14:30:46 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-07-10 18:02:15 -0400 |
commit | 3bcb5840f1b3ef9970da963bf94f637b665387ef (patch) | |
tree | 26618e5f32611e676f65e722db66c931967f3b75 | |
parent | a2d57703b3e735c700689b030c126fa8ba6793b9 (diff) |
tests: Inject test name also when the test fails
If a test is unsuccessful, the result is "not ok", which does not match
the regex because it includes a space.
This regex matches both "ok" and "not ok".
Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Message-Id: <20200628213046.2028271-1-hskinnemoen@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | tests/Makefile.include | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/Makefile.include b/tests/Makefile.include index 3f4448a20b..09df2d3f86 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -637,7 +637,7 @@ define do_test_tap { export MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$(( $${RANDOM:-0} % 255 + 1))} $2; \ $(foreach COMMAND, $1, \ $(COMMAND) -m=$(SPEED) -k --tap < /dev/null \ - | sed "s/^[a-z][a-z]* [0-9]* /&$(notdir $(COMMAND)) /" || true; ) } \ + | sed "s/^\(not \)\?ok [0-9]* /&$(notdir $(COMMAND)) /" || true; ) } \ | ./scripts/tap-merge.pl | tee "$@" \ | ./scripts/tap-driver.pl $(if $(V),, --show-failures-only), \ "TAP","$@") |