public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] testsuite: Unbreak compat.exp testing with alt compiler (PR testsuite/93294)
@ 2020-01-16 17:24 Jakub Jelinek
  2020-01-16 17:47 ` David Malcolm
  2020-01-18  0:19 ` Jeff Law
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Jelinek @ 2020-01-16 17:24 UTC (permalink / raw)
  To: Rainer Orth, Mike Stump, David Malcolm; +Cc: gcc-patches

Hi!

The PR87488 changes include:
	* lib/prune.exp (TEST_ALWAYS_FLAGS): Add -fdiagnostics-urls=never.
Unfortunately, this broke all the compat.exp etc. compatibility testing with
alternate compilers, because those compilers (likely) don't understand this
new option and thus all alt compilations FAIL and everything that needs it
is then UNRESOLVED.

Fixed thusly, by handling it like -fdiagnostics-color=never and other
similar options.

Tested on x86_64-linux, ok for trunk?

2020-01-16  Jakub Jelinek  <jakub@redhat.com>

	PR testsuite/93294
	* lib/c-compat.exp (compat-use-alt-compiler): Handle
	-fdiagnostics-urls=never similarly to -fdiagnostics-color=never.
	(compat_setup_dfp): Likewise.

--- gcc/testsuite/lib/c-compat.exp.jj	2020-01-12 11:54:38.457382571 +0100
+++ gcc/testsuite/lib/c-compat.exp	2020-01-16 17:48:25.688227433 +0100
@@ -36,6 +36,7 @@ load_lib target-libpath.exp
 proc compat-use-alt-compiler { } {
     global GCC_UNDER_TEST ALT_CC_UNDER_TEST
     global compat_same_alt compat_alt_caret compat_alt_color compat_no_line_no
+    global compat_alt_urls
     global TEST_ALWAYS_FLAGS
 
     # We don't need to do this if the alternate compiler is actually
@@ -48,6 +49,9 @@ proc compat-use-alt-compiler { } {
 	if { $compat_alt_color == 0 } then {
 	    regsub -- "-fdiagnostics-color=never" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
 	}
+	if { $compat_alt_urls == 0 } then {
+	    regsub -- "-fdiagnostics-urls=never" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
+	}
 	if { $compat_no_line_no == 0 } then {
 	    regsub -- "-fno-diagnostics-show-line-numbers" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
 	}
@@ -80,11 +84,13 @@ proc compat_setup_dfp { } {
     global compat_have_dfp
     global compat_alt_caret
     global compat_alt_color
+    global compat_alt_urls
     global compat_no_line_no
     global TEST_ALWAYS_FLAGS compat_save_TEST_ALWAYS_FLAGS
 
     set compat_alt_caret 0
     set compat_alt_color 0
+    set compat_alt_urls 0
     set compat_no_line_no 0
     set compat_save_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
 
@@ -105,6 +111,10 @@ proc compat_setup_dfp { } {
 		int dummy; } "-fdiagnostics-color=never"] != 0 } {
 	    set compat_alt_color 1
 	}
+	if { [check_no_compiler_messages_nocache compat_alt_has_urls object {
+		int dummy; } "-fdiagnostics-urls=never"] != 0 } {
+	    set compat_alt_urls 1
+	}
 	if { [check_no_compiler_messages_nocache compat_alt_has_no_line_no object {
 		int dummy; } "-fno-diagnostics-show-line-numbers"] != 0 } {
 	    set compat_no_line_no 1


	Jakub

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

* Re: [PATCH] testsuite: Unbreak compat.exp testing with alt compiler (PR testsuite/93294)
  2020-01-16 17:24 [PATCH] testsuite: Unbreak compat.exp testing with alt compiler (PR testsuite/93294) Jakub Jelinek
@ 2020-01-16 17:47 ` David Malcolm
  2020-01-18  0:19 ` Jeff Law
  1 sibling, 0 replies; 3+ messages in thread
From: David Malcolm @ 2020-01-16 17:47 UTC (permalink / raw)
  To: Jakub Jelinek, Rainer Orth, Mike Stump; +Cc: gcc-patches

On Thu, 2020-01-16 at 18:01 +0100, Jakub Jelinek wrote:
> Hi!
> 
> The PR87488 changes include:
> 	* lib/prune.exp (TEST_ALWAYS_FLAGS): Add -fdiagnostics-
> urls=never.
> Unfortunately, this broke all the compat.exp etc. compatibility
> testing with
> alternate compilers, because those compilers (likely) don't
> understand this
> new option and thus all alt compilations FAIL and everything that
> needs it
> is then UNRESOLVED.

Sorry about that.

> Fixed thusly, by handling it like -fdiagnostics-color=never and other
> similar options.
> 
> Tested on x86_64-linux, ok for trunk?

Looks sane to me, by analogy with the "color" handling.

Dave


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

* Re: [PATCH] testsuite: Unbreak compat.exp testing with alt compiler (PR testsuite/93294)
  2020-01-16 17:24 [PATCH] testsuite: Unbreak compat.exp testing with alt compiler (PR testsuite/93294) Jakub Jelinek
  2020-01-16 17:47 ` David Malcolm
@ 2020-01-18  0:19 ` Jeff Law
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Law @ 2020-01-18  0:19 UTC (permalink / raw)
  To: Jakub Jelinek, Rainer Orth, Mike Stump, David Malcolm; +Cc: gcc-patches

On Thu, 2020-01-16 at 18:01 +0100, Jakub Jelinek wrote:
> Hi!
> 
> The PR87488 changes include:
> 	* lib/prune.exp (TEST_ALWAYS_FLAGS): Add -fdiagnostics-urls=never.
> Unfortunately, this broke all the compat.exp etc. compatibility testing with
> alternate compilers, because those compilers (likely) don't understand this
> new option and thus all alt compilations FAIL and everything that needs it
> is then UNRESOLVED.
> 
> Fixed thusly, by handling it like -fdiagnostics-color=never and other
> similar options.
> 
> Tested on x86_64-linux, ok for trunk?
> 
> 2020-01-16  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR testsuite/93294
> 	* lib/c-compat.exp (compat-use-alt-compiler): Handle
> 	-fdiagnostics-urls=never similarly to -fdiagnostics-color=never.
> 	(compat_setup_dfp): Likewise.
OK
jeff
> 

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

end of thread, other threads:[~2020-01-18  0:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 17:24 [PATCH] testsuite: Unbreak compat.exp testing with alt compiler (PR testsuite/93294) Jakub Jelinek
2020-01-16 17:47 ` David Malcolm
2020-01-18  0:19 ` Jeff Law

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