[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: print test failures sooner

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Mon, 19 Apr 2010 10:02:15 +0100

On Sun, 2010-04-18, neels wrote:
> I have this small patch that prints test failures right after each
> tests section during 'make check', so that it looks like this:
> [[[
> Running tests in utf-test [31/75]...................success
> Running tests in window-test [32/75]................success
> Running tests in authz_tests.py [33/75].............success
> Running tests in autoprop_tests.py [34/75]..........FAILURE
> FAIL: autoprop_tests.py 1: add: config=no, commandline=none
> FAIL: autoprop_tests.py 2: add: config=yes, commandline=none
> ]]]
> I like this cause I don't need to go dig into tests.log myself if I
> want to know the specific failing test numbers before 'make check'
> completed. For me it's especially handy when I run the tests on a
> remote computer.

There is a "log to stdout" option - "make check LOG_TO_STDOUT=1" or
"build/run_tests.py --log-to-stdout". Can you use that instead?

Oh... run_tests.py doesn't show the "--log-to-stdout" option in its help
text. Fixing... r935477.

> + # Also try to print the failures of this test.
> + self.log.seek(log_start)
> + for line in self.log.readlines():
> + if line.startswith('FAIL'):
> + print line,
> + self.log.seek(0, os.SEEK_END)

(I would prefer such a patch to share a "print failures" subroutine with
the existing code. It seems a bit... I don't know... arbitrary to
insert this particular bunch of messages into the progress notification
stream. For one thing, doesn't the definition of "FAILURE" include
"XPASS" results?)

- Julian
Received on 2010-04-19 11:02:54 CEST

This is an archived mail posted to the Subversion Dev mailing list.