From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 1/3] Remove one copy of skip_compile_feature_tests
Date: Wed, 30 Nov 2022 12:35:29 -0700 [thread overview]
Message-ID: <20221130193531.2464972-2-tromey@adacore.com> (raw)
In-Reply-To: <20221130193531.2464972-1-tromey@adacore.com>
I noticed that there are two identical copies of
skip_compile_feature_tests in the test suite. This removes one from
gdb.exp, in favor of the one in compile-support.exp.
---
gdb/testsuite/gdb.base/options.exp | 1 +
gdb/testsuite/gdb.compile/compile-ifunc.exp | 2 ++
gdb/testsuite/gdb.compile/compile-ops.exp | 1 +
gdb/testsuite/gdb.compile/compile-print.exp | 2 ++
gdb/testsuite/gdb.compile/compile-setjmp.exp | 2 ++
gdb/testsuite/gdb.compile/compile-tls.exp | 2 ++
gdb/testsuite/gdb.compile/compile.exp | 2 ++
gdb/testsuite/lib/gdb.exp | 20 --------------------
8 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/gdb/testsuite/gdb.base/options.exp b/gdb/testsuite/gdb.base/options.exp
index d10e7f8d66f..8fd968de1ad 100644
--- a/gdb/testsuite/gdb.base/options.exp
+++ b/gdb/testsuite/gdb.base/options.exp
@@ -31,6 +31,7 @@
# - thread apply
# - taas
+load_lib compile-support.exp
load_lib completion-support.exp
standard_testfile .c
diff --git a/gdb/testsuite/gdb.compile/compile-ifunc.exp b/gdb/testsuite/gdb.compile/compile-ifunc.exp
index 4f671c6453f..07de52c3f67 100644
--- a/gdb/testsuite/gdb.compile/compile-ifunc.exp
+++ b/gdb/testsuite/gdb.compile/compile-ifunc.exp
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+load_lib compile-support.exp
+
if {[skip_ifunc_tests]} {
return 0
}
diff --git a/gdb/testsuite/gdb.compile/compile-ops.exp b/gdb/testsuite/gdb.compile/compile-ops.exp
index 76f284f52f3..cff2f946c93 100644
--- a/gdb/testsuite/gdb.compile/compile-ops.exp
+++ b/gdb/testsuite/gdb.compile/compile-ops.exp
@@ -16,6 +16,7 @@
# Some coverage testing of DWARF operators for the compiler
# integration.
+load_lib compile-support.exp
load_lib dwarf.exp
# This test can only be run on targets which support DWARF-2 and use gas.
diff --git a/gdb/testsuite/gdb.compile/compile-print.exp b/gdb/testsuite/gdb.compile/compile-print.exp
index 051cfabe3ea..5d01c1a53d0 100644
--- a/gdb/testsuite/gdb.compile/compile-print.exp
+++ b/gdb/testsuite/gdb.compile/compile-print.exp
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+load_lib compile-support.exp
+
standard_testfile
if { [prepare_for_testing "failed to prepare" "$testfile"] } {
diff --git a/gdb/testsuite/gdb.compile/compile-setjmp.exp b/gdb/testsuite/gdb.compile/compile-setjmp.exp
index 89a65fb0da1..c883b2bd570 100644
--- a/gdb/testsuite/gdb.compile/compile-setjmp.exp
+++ b/gdb/testsuite/gdb.compile/compile-setjmp.exp
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+load_lib compile-support.exp
+
standard_testfile .c compile-setjmp-mod.c
if { [prepare_for_testing "failed to prepare" $testfile] } {
diff --git a/gdb/testsuite/gdb.compile/compile-tls.exp b/gdb/testsuite/gdb.compile/compile-tls.exp
index f9c9ee5e2f7..beffe7fd5be 100644
--- a/gdb/testsuite/gdb.compile/compile-tls.exp
+++ b/gdb/testsuite/gdb.compile/compile-tls.exp
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
+load_lib compile-support.exp
+
standard_testfile .c
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp
index f2515586c39..c712070872a 100644
--- a/gdb/testsuite/gdb.compile/compile.exp
+++ b/gdb/testsuite/gdb.compile/compile.exp
@@ -13,6 +13,8 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+load_lib compile-support.exp
+
standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c
set options {}
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 23e3cc0c2d4..5067e240507 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -4195,26 +4195,6 @@ proc skip_libstdcxx_probe_tests {} {
return [skip_libstdcxx_probe_tests_prompt "$gdb_prompt $"]
}
-# Return 1 if we should skip tests of the "compile" feature.
-# This must be invoked after the inferior has been started.
-
-proc skip_compile_feature_tests {} {
- global gdb_prompt
-
- set result 0
- gdb_test_multiple "compile code -- ;" "check for working compile command" {
- "Could not load libcc1.*\r\n$gdb_prompt $" {
- set result 1
- }
- -re "Command not supported on this host\\..*\r\n$gdb_prompt $" {
- set result 1
- }
- -re "\r\n$gdb_prompt $" {
- }
- }
- return $result
-}
-
# Helper for gdb_is_target_* procs. TARGET_NAME is the name of the target
# we're looking for (used to build the test name). TARGET_STACK_REGEXP
# is a regexp that will match the output of "maint print target-stack" if
--
2.34.3
next prev parent reply other threads:[~2022-11-30 19:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 19:35 Fix some problems in gdb.compile Tom Tromey
2022-11-30 19:35 ` Tom Tromey [this message]
2022-11-30 19:35 ` [PATCH 2/3] Remove obsolete check from skip_compile_feature_tests Tom Tromey
2022-11-30 19:35 ` [PATCH 3/3] Avoid timeouts in gdb.compile Tom Tromey
2022-12-01 0:17 ` Fix some problems " Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221130193531.2464972-2-tromey@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).