Commit 4ef95dbda440e0aeffa26df40cc33d001e77f4c5

Authored by Jay Berkenbilt
1 parent 2a057ac0

Suppress showing failed test output by default

Provide option to show test output if requested.
Showing 2 changed files with 14 additions and 1 deletions
Makefile
... ... @@ -126,7 +126,9 @@ $(TEST_TARGETS):
126 126 if TC_SRCS="$(foreach T,$(TC_SRCS_$(subst check_,,$@)),../../$(T))" \
127 127 $(QTEST) -bindirs .:.. -datadir ../qtest -covdir ..; then \
128 128 true; \
129   - else \
  129 + elif test "$(SHOW_FAILED_TEST_OUTPUT)" = "1"; then \
130 130 cat -v qtest.log; \
131 131 false; \
  132 + else \
  133 + false; \
132 134 fi)
... ...
configure.ac
... ... @@ -212,6 +212,17 @@ AC_ARG_ENABLE(test-compare-images,
212 212 fi],
213 213 [SKIP_TEST_COMPARE_IMAGES=0])
214 214  
  215 +AC_SUBST(SHOW_FAILED_TEST_OUTPUT)
  216 +AC_ARG_ENABLE(show-failed-test-output,
  217 + AS_HELP_STRING([--enable-show-failed-test-output],
  218 + [if specified, write failed test output to the console; useful for building on build servers where you can't easily open the test output files]),
  219 + [if test "$enableval" = "no"; then
  220 + SHOW_FAILED_TEST_OUTPUT=0
  221 + else
  222 + SHOW_FAILED_TEST_OUTPUT=1
  223 + fi],
  224 + [SHOW_FAILED_TEST_OUTPUT=0])
  225 +
215 226 AC_ARG_WITH(docbook-xsl,
216 227 AS_HELP_STRING([--with-docbook-xsl=DIR],
217 228 [location of docbook 4.x xml stylesheets]),
... ...