diff mbox

RFA: speeding up dg-extract-results.sh

Message ID 874n0llk0v.fsf@talisman.default
State New
Headers show

Commit Message

Richard Sandiford May 19, 2014, 6:07 p.m. UTC
Charles Baylis <charles.baylis@linaro.org> writes:
> On 13 February 2014 09:18, Richard Sandiford <rdsandiford@googlemail.com> 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:
> 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
> it.
>
> 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?

Thanks,
Richard

Comments

Charles Baylis May 19, 2014, 6:49 p.m. UTC | #1
On 19 May 2014 19:07, Richard Sandiford <rdsandiford@googlemail.com> wrote:
>
> 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?

That works for me.

Thanks for looking into it.
Richard Sandiford May 20, 2014, 10:09 a.m. UTC | #2
Charles Baylis <charles.baylis@linaro.org> writes:
> On 19 May 2014 19:07, Richard Sandiford <rdsandiford@googlemail.com> wrote:
>>
>> 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?
>
> That works for me.

Thanks.  I also tested it on x86_64-linux-gnu.  Applied as obvious (I hope).

Richard
diff mbox

Patch

Index: contrib/dg-extract-results.py
===================================================================
--- 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)