public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh
@ 2017-06-14 12:30 Thomas Preudhomme
  2017-06-15 16:15 ` Thomas Preudhomme
  2017-06-19 15:55 ` Mike Stump
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Preudhomme @ 2017-06-14 12:30 UTC (permalink / raw)
  To: Richard Biener, Jakub Jelinek, gcc-patches

Hi,

dg-cmp-results.sh contrib script is written to work with sum file for
a single tool only. It throws away the header including the first ===
line and everything starting from the following ===, assuming it is the
test result. This does not work well for sum files with results for
multiple tools.

This patch changes the logic to instead keep everything between "Running
target" line and the beginning of Summary line. Other existing filter
mechanism will ensure only FAIL, PASS, etc. lines are kept after that.

ChangeLog entry is as follow:

*** contrib/ChangeLog ***

2017-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* dg-cmp-results.sh: Keep test result lines rather than throwing
	header and summary to support sum files with multiple tools.

Tested successfully on sum file with single tool with similar results
and on sum file with multiple tools now showing a regression with patch
proposed in https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00875.html

Is this ok for trunk?

Best regards,

Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh
  2017-06-14 12:30 [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh Thomas Preudhomme
@ 2017-06-15 16:15 ` Thomas Preudhomme
  2017-06-19 10:44   ` Thomas Preudhomme
  2017-06-19 15:55 ` Mike Stump
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Preudhomme @ 2017-06-15 16:15 UTC (permalink / raw)
  To: Richard Biener, Jakub Jelinek, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

Forgetting the patch: check!
Sending it later as a reply to the wrong message: check!

Hopefully I won't check a second time any of those.

Best regards,

Thomas

On 14/06/17 13:30, Thomas Preudhomme wrote:
> Hi,
>
> dg-cmp-results.sh contrib script is written to work with sum file for
> a single tool only. It throws away the header including the first ===
> line and everything starting from the following ===, assuming it is the
> test result. This does not work well for sum files with results for
> multiple tools.
>
> This patch changes the logic to instead keep everything between "Running
> target" line and the beginning of Summary line. Other existing filter
> mechanism will ensure only FAIL, PASS, etc. lines are kept after that.
>
> ChangeLog entry is as follow:
>
> *** contrib/ChangeLog ***
>
> 2017-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>
>     * dg-cmp-results.sh: Keep test result lines rather than throwing
>     header and summary to support sum files with multiple tools.
>
> Tested successfully on sum file with single tool with similar results
> and on sum file with multiple tools now showing a regression with patch
> proposed in https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00875.html
>
> Is this ok for trunk?
>
> Best regards,
>
> Thomas

[-- Attachment #2: multi_tool_dg-cmp-results.patch --]
[-- Type: text/x-patch, Size: 899 bytes --]

diff --git a/contrib/dg-cmp-results.sh b/contrib/dg-cmp-results.sh
index d291769547dcd2a02ecf6f80d60d6be7802af4fd..d875b4bd8bca16c1f381355612ef34f6879c5674 100755
--- a/contrib/dg-cmp-results.sh
+++ b/contrib/dg-cmp-results.sh
@@ -91,8 +91,7 @@ sed $E -e '/^[[:space:]]+===/,$d' $NFILE
 
 # Create a temporary file from the old file's interesting section.
 sed $E -e "1,/$header/d" \
-  -e '/^[[:space:]]+===/,$d' \
-  -e '/^[A-Z]+:/!d' \
+  -e '/^Running target /,/^[[:space:]]+===.*Summary ===/!d' \
   -e '/^(WARNING|ERROR):/d' \
   -e 's/\r$//' \
   -e 's/^/O:/' \
@@ -102,8 +101,7 @@ sed $E -e "1,/$header/d" \
 
 # Create a temporary file from the new file's interesting section.
 sed $E -e "1,/$header/d" \
-  -e '/^[[:space:]]+===/,$d' \
-  -e '/^[A-Z]+:/!d' \
+  -e '/^Running target /,/^[[:space:]]+===.*Summary ===/!d' \
   -e '/^(WARNING|ERROR):/d' \
   -e 's/\r$//' \
   -e 's/^/N:/' \

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh
  2017-06-15 16:15 ` Thomas Preudhomme
@ 2017-06-19 10:44   ` Thomas Preudhomme
  2017-06-19 12:28     ` Christophe Lyon
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Preudhomme @ 2017-06-19 10:44 UTC (permalink / raw)
  To: Richard Biener, Jakub Jelinek, gcc-patches

Wrong copy paste between the patch I tested and the patch I sent. The first and 
second command of the sed should be replaced, not the second and third as in the 
patch I sent. For more safety I'll rerun the tests.

Best regards,

Thomas

On 15/06/17 17:15, Thomas Preudhomme wrote:
> Forgetting the patch: check!
> Sending it later as a reply to the wrong message: check!
>
> Hopefully I won't check a second time any of those.
>
> Best regards,
>
> Thomas
>
> On 14/06/17 13:30, Thomas Preudhomme wrote:
>> Hi,
>>
>> dg-cmp-results.sh contrib script is written to work with sum file for
>> a single tool only. It throws away the header including the first ===
>> line and everything starting from the following ===, assuming it is the
>> test result. This does not work well for sum files with results for
>> multiple tools.
>>
>> This patch changes the logic to instead keep everything between "Running
>> target" line and the beginning of Summary line. Other existing filter
>> mechanism will ensure only FAIL, PASS, etc. lines are kept after that.
>>
>> ChangeLog entry is as follow:
>>
>> *** contrib/ChangeLog ***
>>
>> 2017-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>
>>     * dg-cmp-results.sh: Keep test result lines rather than throwing
>>     header and summary to support sum files with multiple tools.
>>
>> Tested successfully on sum file with single tool with similar results
>> and on sum file with multiple tools now showing a regression with patch
>> proposed in https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00875.html
>>
>> Is this ok for trunk?
>>
>> Best regards,
>>
>> Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh
  2017-06-19 10:44   ` Thomas Preudhomme
@ 2017-06-19 12:28     ` Christophe Lyon
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe Lyon @ 2017-06-19 12:28 UTC (permalink / raw)
  To: Thomas Preudhomme; +Cc: Richard Biener, Jakub Jelinek, gcc-patches

On 19 June 2017 at 12:44, Thomas Preudhomme
<thomas.preudhomme@foss.arm.com> wrote:
> Wrong copy paste between the patch I tested and the patch I sent. The first
> and second command of the sed should be replaced, not the second and third
> as in the patch I sent. For more safety I'll rerun the tests.
>

OK great. If you send an updated patch, I can re-run my tests easily.

Thanks,

Christophe

> Best regards,
>
> Thomas
>
>
> On 15/06/17 17:15, Thomas Preudhomme wrote:
>>
>> Forgetting the patch: check!
>> Sending it later as a reply to the wrong message: check!
>>
>> Hopefully I won't check a second time any of those.
>>
>> Best regards,
>>
>> Thomas
>>
>> On 14/06/17 13:30, Thomas Preudhomme wrote:
>>>
>>> Hi,
>>>
>>> dg-cmp-results.sh contrib script is written to work with sum file for
>>> a single tool only. It throws away the header including the first ===
>>> line and everything starting from the following ===, assuming it is the
>>> test result. This does not work well for sum files with results for
>>> multiple tools.
>>>
>>> This patch changes the logic to instead keep everything between "Running
>>> target" line and the beginning of Summary line. Other existing filter
>>> mechanism will ensure only FAIL, PASS, etc. lines are kept after that.
>>>
>>> ChangeLog entry is as follow:
>>>
>>> *** contrib/ChangeLog ***
>>>
>>> 2017-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>>
>>>     * dg-cmp-results.sh: Keep test result lines rather than throwing
>>>     header and summary to support sum files with multiple tools.
>>>
>>> Tested successfully on sum file with single tool with similar results
>>> and on sum file with multiple tools now showing a regression with patch
>>> proposed in https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00875.html
>>>
>>> Is this ok for trunk?
>>>
>>> Best regards,
>>>
>>> Thomas

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh
  2017-06-14 12:30 [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh Thomas Preudhomme
  2017-06-15 16:15 ` Thomas Preudhomme
@ 2017-06-19 15:55 ` Mike Stump
  2017-06-20 15:31   ` Thomas Preudhomme
  1 sibling, 1 reply; 7+ messages in thread
From: Mike Stump @ 2017-06-19 15:55 UTC (permalink / raw)
  To: Thomas Preudhomme; +Cc: Richard Biener, Jakub Jelinek, gcc-patches

On Jun 14, 2017, at 5:30 AM, Thomas Preudhomme <thomas.preudhomme@foss.arm.com> wrote:
> 
> 2017-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> 
> 	* dg-cmp-results.sh: Keep test result lines rather than throwing
> 	header and summary to support sum files with multiple tools.
> 
> Tested successfully on sum file with single tool with similar results
> and on sum file with multiple tools now showing a regression with patch
> proposed in https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00875.html
> 
> Is this ok for trunk?

Ok.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh
  2017-06-19 15:55 ` Mike Stump
@ 2017-06-20 15:31   ` Thomas Preudhomme
  2017-06-20 15:50     ` Mike Stump
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Preudhomme @ 2017-06-20 15:31 UTC (permalink / raw)
  To: Mike Stump; +Cc: Richard Biener, Jakub Jelinek, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

Hi Mike,

Sorry, there was a mistake in the patch I sent. Please find an updated patch below.

ChangeLog entry unchanged:


*** contrib/ChangeLog ***

2017-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* dg-cmp-results.sh: Keep test result lines rather than throwing
	header and summary to support sum files with multiple tools.


Is this still ok?

Best regards,

Thomas

On 19/06/17 16:55, Mike Stump wrote:
> On Jun 14, 2017, at 5:30 AM, Thomas Preudhomme <thomas.preudhomme@foss.arm.com> wrote:
>>
>> 2017-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
>>
>> 	* dg-cmp-results.sh: Keep test result lines rather than throwing
>> 	header and summary to support sum files with multiple tools.
>>
>> Tested successfully on sum file with single tool with similar results
>> and on sum file with multiple tools now showing a regression with patch
>> proposed in https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00875.html
>>
>> Is this ok for trunk?
>
> Ok.
>

[-- Attachment #2: multi_tool_dg-cmp-results.patch --]
[-- Type: text/x-patch, Size: 924 bytes --]

diff --git a/contrib/dg-cmp-results.sh b/contrib/dg-cmp-results.sh
index d291769547dcd2a02ecf6f80d60d6be7802af4fd..921e9337d1f8ffea78ef566c351fb48a8f6ca064 100755
--- a/contrib/dg-cmp-results.sh
+++ b/contrib/dg-cmp-results.sh
@@ -90,8 +90,7 @@ echo "Newer log file: $NFILE"
 sed $E -e '/^[[:space:]]+===/,$d' $NFILE
 
 # Create a temporary file from the old file's interesting section.
-sed $E -e "1,/$header/d" \
-  -e '/^[[:space:]]+===/,$d' \
+sed $E -e '/^Running target /,/^[[:space:]]+===.*Summary ===/!d' \
   -e '/^[A-Z]+:/!d' \
   -e '/^(WARNING|ERROR):/d' \
   -e 's/\r$//' \
@@ -101,8 +100,7 @@ sed $E -e "1,/$header/d" \
   >/tmp/o$$-$OBASE
 
 # Create a temporary file from the new file's interesting section.
-sed $E -e "1,/$header/d" \
-  -e '/^[[:space:]]+===/,$d' \
+sed $E -e '/^Running target /,/^[[:space:]]+===.*Summary ===/!d' \
   -e '/^[A-Z]+:/!d' \
   -e '/^(WARNING|ERROR):/d' \
   -e 's/\r$//' \

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh
  2017-06-20 15:31   ` Thomas Preudhomme
@ 2017-06-20 15:50     ` Mike Stump
  0 siblings, 0 replies; 7+ messages in thread
From: Mike Stump @ 2017-06-20 15:50 UTC (permalink / raw)
  To: Thomas Preudhomme; +Cc: Richard Biener, Jakub Jelinek, gcc-patches

On Jun 20, 2017, at 8:31 AM, Thomas Preudhomme <thomas.preudhomme@foss.arm.com> wrote:
> 
> 2017-06-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
> 
> 	* dg-cmp-results.sh: Keep test result lines rather than throwing
> 	header and summary to support sum files with multiple tools.
> 
> 
> Is this still ok?

Ok.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-06-20 15:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14 12:30 [PATCH, contrib] Support multi-tool sum files in dg-cmp-results.sh Thomas Preudhomme
2017-06-15 16:15 ` Thomas Preudhomme
2017-06-19 10:44   ` Thomas Preudhomme
2017-06-19 12:28     ` Christophe Lyon
2017-06-19 15:55 ` Mike Stump
2017-06-20 15:31   ` Thomas Preudhomme
2017-06-20 15:50     ` Mike Stump

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).