public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Pattern does not match when using --specs=nano.specs
@ 2024-02-06 16:58 Torbjörn SVENSSON
  2024-02-07 18:55 ` Mike Stump
  0 siblings, 1 reply; 5+ messages in thread
From: Torbjörn SVENSSON @ 2024-02-06 16:58 UTC (permalink / raw)
  To: gcc-patches; +Cc: mikestump, Torbjörn SVENSSON

Ok for trunk and releases/gcc-13?

---

When running the testsuite for newlib nano, the --specs=nano.specs
option is used.  This option prepends cpp_unique_options with
"-isystem =/include/newlib-nano" so that the newlib nano header files
override the newlib standard ones.  As the -isystem option is prepended,
the -quiet option is no longer the first option to cc1.  Adjust the test
accordingly.

Patch has been verified on Windows and Linux.

gcc/testsuite/ChangeLog:

	* gcc.misc-tests/options.exp: Allow other options before the
	-quite option for cc1.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
 gcc/testsuite/gcc.misc-tests/options.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.misc-tests/options.exp b/gcc/testsuite/gcc.misc-tests/options.exp
index ec026ecf77d..e7fcde87585 100644
--- a/gcc/testsuite/gcc.misc-tests/options.exp
+++ b/gcc/testsuite/gcc.misc-tests/options.exp
@@ -57,7 +57,7 @@ proc check_for_all_options {language gcc_options compiler_pattern as_pattern ld_
 	remote_file build delete $dumpfile
     }   
 
-    if {![regexp -- "/${compiler}(\\.exe)? -quiet.*$compiler_pattern" $gcc_output]} {
+    if {![regexp -- "/${compiler}(\\.exe)? .*-quiet.*$compiler_pattern" $gcc_output]} {
 	fail "$test (compiler options)"
 	return
     }
-- 
2.25.1


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

* Re: [PATCH] testsuite: Pattern does not match when using --specs=nano.specs
  2024-02-06 16:58 [PATCH] testsuite: Pattern does not match when using --specs=nano.specs Torbjörn SVENSSON
@ 2024-02-07 18:55 ` Mike Stump
  2024-02-08 17:44   ` [PATCH v2] " Torbjörn SVENSSON
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Stump @ 2024-02-07 18:55 UTC (permalink / raw)
  To: Torbjörn SVENSSON; +Cc: gcc-patches

On Feb 6, 2024, at 8:58 AM, Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> wrote:
> 
> Ok for trunk and releases/gcc-13?

Ok.  If .* goes across newlines, you might want to not use ..

> -    if {![regexp -- "/${compiler}(\\.exe)? -quiet.*$compiler_pattern" $gcc_output]} {
> +    if {![regexp -- "/${compiler}(\\.exe)? .*-quiet.*$compiler_pattern" $gcc_output]} {

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

* [PATCH v2] testsuite: Pattern does not match when using --specs=nano.specs
  2024-02-07 18:55 ` Mike Stump
@ 2024-02-08 17:44   ` Torbjörn SVENSSON
  2024-02-09  0:07     ` Mike Stump
  0 siblings, 1 reply; 5+ messages in thread
From: Torbjörn SVENSSON @ 2024-02-08 17:44 UTC (permalink / raw)
  To: gcc-patches; +Cc: mikestump, Torbjörn SVENSSON

Changes since v1:
- Replaced .* with [^\r\n]* to avoid matching newline.


Ok for trunk and releases/gcc-13?

--

When running the testsuite for newlib nano, the --specs=nano.specs
option is used.  This option prepends cpp_unique_options with
"-isystem =/include/newlib-nano" so that the newlib nano header files
override the newlib standard ones.  As the -isystem option is prepended,
the -quiet option is no longer the first option to cc1.  Adjust the test
accordingly.

Patch has been verified on Windows and Linux.

gcc/testsuite/ChangeLog:

	* gcc.misc-tests/options.exp: Allow other options before the
	-quite option for cc1.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
 gcc/testsuite/gcc.misc-tests/options.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.misc-tests/options.exp b/gcc/testsuite/gcc.misc-tests/options.exp
index ec026ecf77d..6e6e40c183d 100644
--- a/gcc/testsuite/gcc.misc-tests/options.exp
+++ b/gcc/testsuite/gcc.misc-tests/options.exp
@@ -57,7 +57,7 @@ proc check_for_all_options {language gcc_options compiler_pattern as_pattern ld_
 	remote_file build delete $dumpfile
     }   
 
-    if {![regexp -- "/${compiler}(\\.exe)? -quiet.*$compiler_pattern" $gcc_output]} {
+    if {![regexp -- "/${compiler}(\\.exe)? \[^\r\n\]*-quiet.*$compiler_pattern" $gcc_output]} {
 	fail "$test (compiler options)"
 	return
     }
-- 
2.25.1


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

* Re: [PATCH v2] testsuite: Pattern does not match when using --specs=nano.specs
  2024-02-08 17:44   ` [PATCH v2] " Torbjörn SVENSSON
@ 2024-02-09  0:07     ` Mike Stump
  2024-02-09  8:47       ` Torbjorn SVENSSON
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Stump @ 2024-02-09  0:07 UTC (permalink / raw)
  To: Torbjörn SVENSSON; +Cc: gcc-patches

On Feb 8, 2024, at 9:44 AM, Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> wrote:
> 
> Changes since v1:
> - Replaced .* with [^\r\n]* to avoid matching newline.
> 
> Ok for trunk and releases/gcc-13?

Ok.

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

* Re: [PATCH v2] testsuite: Pattern does not match when using --specs=nano.specs
  2024-02-09  0:07     ` Mike Stump
@ 2024-02-09  8:47       ` Torbjorn SVENSSON
  0 siblings, 0 replies; 5+ messages in thread
From: Torbjorn SVENSSON @ 2024-02-09  8:47 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches



On 2024-02-09 01:07, Mike Stump wrote:
> On Feb 8, 2024, at 9:44 AM, Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> wrote:
>>
>> Changes since v1:
>> - Replaced .* with [^\r\n]* to avoid matching newline.
>>
>> Ok for trunk and releases/gcc-13?
> 
> Ok.

Pushed as 1175d1b35ce7bf8ee7c9b37b334370f01eb95335 and 
810b0b3f75c454da3f6b5722870716796d2d7a83.

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

end of thread, other threads:[~2024-02-09  8:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-06 16:58 [PATCH] testsuite: Pattern does not match when using --specs=nano.specs Torbjörn SVENSSON
2024-02-07 18:55 ` Mike Stump
2024-02-08 17:44   ` [PATCH v2] " Torbjörn SVENSSON
2024-02-09  0:07     ` Mike Stump
2024-02-09  8:47       ` Torbjorn SVENSSON

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).