This is the mail archive of the
mailing list for the GCC project.
Re: RFA: speeding up dg-extract-results.sh
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Charles Baylis <charles dot baylis at linaro dot org>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 19 May 2014 19:07:28 +0100
- Subject: Re: RFA: speeding up dg-extract-results.sh
- Authentication-results: sourceware.org; auth=none
- References: <878utfe5g0 dot fsf at talisman dot default> <CADnVucCA0ozSz=x3z8vexBOkWRj3pquKVuWsFq4xZre0CfxFyQ at mail dot gmail dot com>
Charles Baylis <email@example.com> writes:
> On 13 February 2014 09:18, Richard Sandiford <firstname.lastname@example.org> wrote:
>> This patch tries to reduce that by providing an alternative single-script
>> version. I was torn between Python and Tcl, but given how most people
>> tend to react to Tcl, I thought I'd better go for Python. I wouldn't
>> mind rewriting it in Tcl if that seems better though, not least because
>> expect is already a prerequisite.
> This seems to have broken parallel "make check". I normally use "make
> -j8 check" but now that results in empty *.sum and *.log files.
> This is caused because the python script aborts with a fatal error
> ('saw test result before harness name') when it encounters this
> WARNING: Assuming target board is the local machine (which is probably wrong).
> You may need to set your DEJAGNU environment variable.
> In my configuration (arm-unknown-linux-gnueabihf target,
> x86_64-linux-gnu host, running tests using qemu and binfmt_misc) the
> warning is bogus, so I think that make check should succeed despite
> I've attached a sample file which triggers the error with this command
> $ <gcc_path>/contrib/dg-extract-results.sh gcc.sum.sep
> gcc.sum.sep: saw test result before harness name
> The attached patch is a hack, intended for demonstration purposes. It
> isn't ideal as the 'You may need to set...' line is lost, but it
> allows my testing to work.
Sorry for the breakage. I wanted to make the script as picky as I could
get away with though, so that results aren't lost accidentally.
Could you try the attached?
--- contrib/dg-extract-results.py (revision 210601)
+++ contrib/dg-extract-results.py (working copy)
@@ -264,8 +264,12 @@
# the harness segment, so that if a run for a particular harness
# has been split up, we can reassemble the individual segments
# in a sensible order.
+ # dejagnu sometimes issues warnings about the testing environment
+ # before running any tests. Treat these as part of the header
+ # rather than as a test result.
match = self.result_re.match (line)
- if match:
+ if match and (harness or not line.startswith ('WARNING:')):
if not harness:
self.fatal (filename, 'saw test result before harness name')
name = match.group (2)