Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Guard compile tests from running when unsupported + harden feature support check
@ 2015-08-19 12:54 Luis Machado
  2015-08-19 13:15 ` Pedro Alves
  0 siblings, 1 reply; 10+ messages in thread
From: Luis Machado @ 2015-08-19 12:54 UTC (permalink / raw)
  To: gdb-patches

In our test environment i noticed a few compile tests, though unsupported,
were still being executed and causing spurious FAIL's.

The following change adds a missing feature support check to compile-ifunc.exp
and also adds one more pattern to the feature support check function.

With this change, none of the compile tests run when they're not supposed to.

OK?

gdb/testsuite/ChangeLog:

2015-08-19  Luis Machado  <lgustavo@codesourcery.com>

	* lib/gdb.exp (skip_compile_feature_tests): Check for unsupported
	compiler language.
	* gdb.compile/compile-ifunc.exp (with_test_prefix): Check feature
	support before running tests.
---
 gdb/testsuite/gdb.compile/compile-ifunc.exp | 5 +++++
 gdb/testsuite/lib/gdb.exp                   | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp
index 026c62f..80d7bb4 100644
--- a/gdb/testsuite/gdb.compile/compile-ifunc.exp
+++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp
@@ -46,6 +46,11 @@ with_test_prefix "debug" {
 	return -1
     }
 
+    if {[skip_compile_feature_tests]} {
+	untested "compile command not supported (could not find libcc1 shared library?)"
+	return -1
+    }
+
     # gnu_ifunc (10): error: too many arguments to function 'gnu_ifunc'
     gdb_test_no_output "compile code resultvar = gnu_ifunc_alias (10);"
 
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 56cde7a..fcf9cac 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3005,6 +3005,9 @@ proc skip_compile_feature_tests {} {
 	-re "Command not supported on this host\\..*\r\n$gdb_prompt $" {
 	    set result 1
 	}
+	-re "No compiler support for this language\\.\r\n$gdb_prompt $" {
+	    set result 1
+	}
 	-re "\r\n$gdb_prompt $" {
 	}
     }
-- 
1.9.1


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

end of thread, other threads:[~2015-08-27  4:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-19 12:54 [PATCH] Guard compile tests from running when unsupported + harden feature support check Luis Machado
2015-08-19 13:15 ` Pedro Alves
2015-08-19 13:34   ` Luis Machado
2015-08-19 13:46     ` Pedro Alves
2015-08-19 18:01       ` Luis Machado
2015-08-19 19:57         ` [PATCH] Fix language of compilation unit with unknown file extension (Re: [PATCH] Guard compile tests from running when unsupported + harden feature support check) Pedro Alves
2015-08-19 20:02           ` Pedro Alves
2015-08-19 20:43             ` Doug Evans
2015-08-20 11:37               ` Pedro Alves
2015-08-27  4:57       ` [PATCH] Guard compile tests from running when unsupported + harden feature support check Luis Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox