public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH v2 77/79] Rename to allow_guile_tests
Date: Wed, 11 Jan 2023 20:00:50 -0700	[thread overview]
Message-ID: <20230112030052.3306113-78-tom@tromey.com> (raw)
In-Reply-To: <20230112030052.3306113-1-tom@tromey.com>

This changes skip_guile_tests to invert the sense, and renames it to
allow_guile_tests.  It also rewrites this proc to check the output of
"gdb --configuration", as was done for Python.  Then it changes the
code to use "require" where possible.
---
 gdb/testsuite/gdb.guile/scm-arch.exp          |  5 ++---
 gdb/testsuite/gdb.guile/scm-block.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-breakpoint.exp    |  5 ++---
 gdb/testsuite/gdb.guile/scm-cmd.exp           |  5 ++---
 gdb/testsuite/gdb.guile/scm-disasm.exp        |  5 ++---
 gdb/testsuite/gdb.guile/scm-equal.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-error.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-frame-args.exp    |  5 ++---
 gdb/testsuite/gdb.guile/scm-frame-inline.exp  |  5 ++---
 gdb/testsuite/gdb.guile/scm-frame.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-gsmob.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-iterator.exp      |  5 ++---
 gdb/testsuite/gdb.guile/scm-lazy-string.exp   |  5 ++---
 gdb/testsuite/gdb.guile/scm-math.exp          |  5 ++---
 .../gdb.guile/scm-objfile-script.exp          |  5 ++---
 gdb/testsuite/gdb.guile/scm-objfile.exp       |  5 ++---
 gdb/testsuite/gdb.guile/scm-parameter.exp     |  5 ++---
 gdb/testsuite/gdb.guile/scm-ports.exp         |  5 ++---
 gdb/testsuite/gdb.guile/scm-pretty-print.exp  |  5 ++---
 gdb/testsuite/gdb.guile/scm-progspace.exp     |  5 ++---
 .../gdb.guile/scm-section-script.exp          |  5 ++---
 gdb/testsuite/gdb.guile/scm-symbol.exp        |  5 ++---
 gdb/testsuite/gdb.guile/scm-symtab.exp        |  5 ++---
 gdb/testsuite/gdb.guile/scm-type.exp          |  2 +-
 gdb/testsuite/gdb.guile/scm-value-cc.exp      |  5 +----
 gdb/testsuite/gdb.guile/scm-value.exp         |  5 ++---
 gdb/testsuite/gdb.guile/types-module.exp      |  5 ++---
 gdb/testsuite/lib/gdb-guile.exp               | 21 ++++---------------
 28 files changed, 56 insertions(+), 97 deletions(-)

diff --git a/gdb/testsuite/gdb.guile/scm-arch.exp b/gdb/testsuite/gdb.guile/scm-arch.exp
index 7ec1db108ef..c2554d853d9 100644
--- a/gdb/testsuite/gdb.guile/scm-arch.exp
+++ b/gdb/testsuite/gdb.guile/scm-arch.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-block.exp b/gdb/testsuite/gdb.guile/scm-block.exp
index 666d6fd458d..20fbd1784b5 100644
--- a/gdb/testsuite/gdb.guile/scm-block.exp
+++ b/gdb/testsuite/gdb.guile/scm-block.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-breakpoint.exp b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
index cd469ca4488..a9e656ddfc0 100644
--- a/gdb/testsuite/gdb.guile/scm-breakpoint.exp
+++ b/gdb/testsuite/gdb.guile/scm-breakpoint.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 proc_with_prefix test_bkpt_basic { } {
     global srcfile testfile hex decimal
 
diff --git a/gdb/testsuite/gdb.guile/scm-cmd.exp b/gdb/testsuite/gdb.guile/scm-cmd.exp
index 1d4e13d7aef..a7fb59b0089 100644
--- a/gdb/testsuite/gdb.guile/scm-cmd.exp
+++ b/gdb/testsuite/gdb.guile/scm-cmd.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-disasm.exp b/gdb/testsuite/gdb.guile/scm-disasm.exp
index 6609c746756..37b710f9f99 100644
--- a/gdb/testsuite/gdb.guile/scm-disasm.exp
+++ b/gdb/testsuite/gdb.guile/scm-disasm.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-equal.exp b/gdb/testsuite/gdb.guile/scm-equal.exp
index d2fb9ef0161..3f6e0c51986 100644
--- a/gdb/testsuite/gdb.guile/scm-equal.exp
+++ b/gdb/testsuite/gdb.guile/scm-equal.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-error.exp b/gdb/testsuite/gdb.guile/scm-error.exp
index b0de521cb5c..168d71d1b9e 100644
--- a/gdb/testsuite/gdb.guile/scm-error.exp
+++ b/gdb/testsuite/gdb.guile/scm-error.exp
@@ -19,13 +19,12 @@ set testfile "scm-error"
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 # Test error while loading .scm.
 
 set remote_guile_file_1 [gdb_remote_download host \
diff --git a/gdb/testsuite/gdb.guile/scm-frame-args.exp b/gdb/testsuite/gdb.guile/scm-frame-args.exp
index 075f4419c17..67c10f65b3e 100644
--- a/gdb/testsuite/gdb.guile/scm-frame-args.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame-args.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-frame-inline.exp b/gdb/testsuite/gdb.guile/scm-frame-inline.exp
index 88a69fd882b..1f73ed67b90 100644
--- a/gdb/testsuite/gdb.guile/scm-frame-inline.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame-inline.exp
@@ -15,15 +15,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-frame.exp b/gdb/testsuite/gdb.guile/scm-frame.exp
index 3118d6bcd2f..2e854967d36 100644
--- a/gdb/testsuite/gdb.guile/scm-frame.exp
+++ b/gdb/testsuite/gdb.guile/scm-frame.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 # The following tests require execution.
 
 if ![gdb_guile_runto_main] {
diff --git a/gdb/testsuite/gdb.guile/scm-gsmob.exp b/gdb/testsuite/gdb.guile/scm-gsmob.exp
index ded2a85c9d2..a7c95c01c11 100644
--- a/gdb/testsuite/gdb.guile/scm-gsmob.exp
+++ b/gdb/testsuite/gdb.guile/scm-gsmob.exp
@@ -18,13 +18,12 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_reinitialize_dir $srcdir/$subdir
 
 gdb_install_guile_utils
diff --git a/gdb/testsuite/gdb.guile/scm-iterator.exp b/gdb/testsuite/gdb.guile/scm-iterator.exp
index 15974523324..0bf459518a1 100644
--- a/gdb/testsuite/gdb.guile/scm-iterator.exp
+++ b/gdb/testsuite/gdb.guile/scm-iterator.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-lazy-string.exp b/gdb/testsuite/gdb.guile/scm-lazy-string.exp
index 9b2960a4093..605235648a3 100644
--- a/gdb/testsuite/gdb.guile/scm-lazy-string.exp
+++ b/gdb/testsuite/gdb.guile/scm-lazy-string.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 #gdb_install_guile_utils
 #gdb_install_guile_module
 
diff --git a/gdb/testsuite/gdb.guile/scm-math.exp b/gdb/testsuite/gdb.guile/scm-math.exp
index 97a2e58766b..42e195a0778 100644
--- a/gdb/testsuite/gdb.guile/scm-math.exp
+++ b/gdb/testsuite/gdb.guile/scm-math.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 proc test_value_numeric_ops {} {
@@ -335,9 +337,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c}]} {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-objfile-script.exp b/gdb/testsuite/gdb.guile/scm-objfile-script.exp
index bd0fd003cb6..5b480d1ea55 100644
--- a/gdb/testsuite/gdb.guile/scm-objfile-script.exp
+++ b/gdb/testsuite/gdb.guile/scm-objfile-script.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
@@ -28,9 +30,6 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 # Make the -gdb.scm script available to gdb, it is automagically loaded by gdb.
 # Care is taken to put it in the same directory as the binary so that
 # gdb will find it.
diff --git a/gdb/testsuite/gdb.guile/scm-objfile.exp b/gdb/testsuite/gdb.guile/scm-objfile.exp
index eb49600aa2c..f27c9f4027c 100644
--- a/gdb/testsuite/gdb.guile/scm-objfile.exp
+++ b/gdb/testsuite/gdb.guile/scm-objfile.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-parameter.exp b/gdb/testsuite/gdb.guile/scm-parameter.exp
index db76fc2d1c8..d62ae473faa 100644
--- a/gdb/testsuite/gdb.guile/scm-parameter.exp
+++ b/gdb/testsuite/gdb.guile/scm-parameter.exp
@@ -18,14 +18,13 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_install_guile_utils
 gdb_install_guile_module
 
diff --git a/gdb/testsuite/gdb.guile/scm-ports.exp b/gdb/testsuite/gdb.guile/scm-ports.exp
index 318c434241a..f0af5d4bbad 100644
--- a/gdb/testsuite/gdb.guile/scm-ports.exp
+++ b/gdb/testsuite/gdb.guile/scm-ports.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-pretty-print.exp b/gdb/testsuite/gdb.guile/scm-pretty-print.exp
index f21ed41bffd..3c20edf5061 100644
--- a/gdb/testsuite/gdb.guile/scm-pretty-print.exp
+++ b/gdb/testsuite/gdb.guile/scm-pretty-print.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 # Start with a fresh gdb.
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 proc run_lang_tests {exefile lang} {
     with_test_prefix "lang=$lang" {
 	global srcdir subdir srcfile testfile hex
diff --git a/gdb/testsuite/gdb.guile/scm-progspace.exp b/gdb/testsuite/gdb.guile/scm-progspace.exp
index f43e65e9673..c12a81e8ed1 100644
--- a/gdb/testsuite/gdb.guile/scm-progspace.exp
+++ b/gdb/testsuite/gdb.guile/scm-progspace.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
@@ -30,9 +32,6 @@ gdb_exit
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_install_guile_utils
 gdb_install_guile_module
 
diff --git a/gdb/testsuite/gdb.guile/scm-section-script.exp b/gdb/testsuite/gdb.guile/scm-section-script.exp
index 34ee6de3fdb..9e52939aae3 100644
--- a/gdb/testsuite/gdb.guile/scm-section-script.exp
+++ b/gdb/testsuite/gdb.guile/scm-section-script.exp
@@ -30,6 +30,8 @@ if {![istarget *-*-linux*]
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 # Make this available to gdb before the program starts, it is
@@ -48,9 +50,6 @@ if {[build_executable $testfile.exp $testfile $srcfile \
 gdb_exit
 gdb_start
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_reinitialize_dir $srcdir/$subdir
 
 # Try first with a restrictive safe-path.
diff --git a/gdb/testsuite/gdb.guile/scm-symbol.exp b/gdb/testsuite/gdb.guile/scm-symbol.exp
index f4b935f787f..fa2cf778284 100644
--- a/gdb/testsuite/gdb.guile/scm-symbol.exp
+++ b/gdb/testsuite/gdb.guile/scm-symbol.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 # These tests are done before we call gdb_guile_runto_main so we have to
 # import the gdb module ourselves.
 gdb_install_guile_utils
diff --git a/gdb/testsuite/gdb.guile/scm-symtab.exp b/gdb/testsuite/gdb.guile/scm-symtab.exp
index 33308e0f008..0f468b7d373 100644
--- a/gdb/testsuite/gdb.guile/scm-symtab.exp
+++ b/gdb/testsuite/gdb.guile/scm-symtab.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile scm-symtab.c scm-symtab-2.c
 
 if {[prepare_for_testing "failed to prepare" $testfile \
@@ -25,9 +27,6 @@ if {[prepare_for_testing "failed to prepare" $testfile \
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-type.exp b/gdb/testsuite/gdb.guile/scm-type.exp
index f8902a30a62..45139cba0d5 100644
--- a/gdb/testsuite/gdb.guile/scm-type.exp
+++ b/gdb/testsuite/gdb.guile/scm-type.exp
@@ -43,7 +43,7 @@ proc restart_gdb {exefile} {
     gdb_reinitialize_dir $srcdir/$subdir
     gdb_load ${exefile}
 
-    if { [skip_guile_tests] } {
+    if { ![allow_guile_tests] } {
 	return 0
     }
 
diff --git a/gdb/testsuite/gdb.guile/scm-value-cc.exp b/gdb/testsuite/gdb.guile/scm-value-cc.exp
index 5b2a3c96c80..921d7a939a3 100644
--- a/gdb/testsuite/gdb.guile/scm-value-cc.exp
+++ b/gdb/testsuite/gdb.guile/scm-value-cc.exp
@@ -18,7 +18,7 @@
 
 load_lib gdb-guile.exp
 
-require allow_cplus_tests
+require allow_cplus_tests allow_guile_tests
 
 standard_testfile .cc
 
@@ -26,9 +26,6 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
     return
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
    return
 }
diff --git a/gdb/testsuite/gdb.guile/scm-value.exp b/gdb/testsuite/gdb.guile/scm-value.exp
index 9858b1c1a38..a00c9409086 100644
--- a/gdb/testsuite/gdb.guile/scm-value.exp
+++ b/gdb/testsuite/gdb.guile/scm-value.exp
@@ -18,6 +18,8 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile
 
 set has_argv0 [gdb_has_argv0]
@@ -427,9 +429,6 @@ if { [build_inferior "${binfile}" "c"] < 0 } {
 # Start with a fresh gdb.
 clean_restart ${binfile}
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 gdb_install_guile_utils
 gdb_install_guile_module
 
diff --git a/gdb/testsuite/gdb.guile/types-module.exp b/gdb/testsuite/gdb.guile/types-module.exp
index 520c9021575..2b90d1b613a 100644
--- a/gdb/testsuite/gdb.guile/types-module.exp
+++ b/gdb/testsuite/gdb.guile/types-module.exp
@@ -18,15 +18,14 @@
 
 load_lib gdb-guile.exp
 
+require allow_guile_tests
+
 standard_testfile .cc
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Skip all tests if Guile scripting is not enabled.
-if { [skip_guile_tests] } { continue }
-
 if ![gdb_guile_runto_main] {
     return
 }
diff --git a/gdb/testsuite/lib/gdb-guile.exp b/gdb/testsuite/lib/gdb-guile.exp
index 845d584b914..f2307372b8b 100644
--- a/gdb/testsuite/lib/gdb-guile.exp
+++ b/gdb/testsuite/lib/gdb-guile.exp
@@ -18,24 +18,11 @@
 # Guile doesn't print the 0x prefix on hex numbers.
 set ghex {[0-9a-f]+}
 
-# Return a 1 for configurations that do not support Guile scripting.
+# Return a 1 for configurations that support Guile scripting.
 
-proc skip_guile_tests {} {
-    global gdb_prompt
-
-    gdb_test_multiple "guile (display \"test\\n\")" "verify guile support" {
-	-re "Undefined command.*$gdb_prompt $" {
-	    unsupported "Guile not supported."
-	    return 1
-	}
-	-re "not supported.*$gdb_prompt $" {
-	    unsupported "Guile support is disabled."
-	    return 1
-	}
-	-re "$gdb_prompt $" {}
-    }
-
-    return 0
+gdb_caching_proc allow_guile_tests {
+    set output [exec $::GDB --configuration]
+    return [expr {[string first "--with-guile" $output] != -1}]
 }
 
 # Run a command in GDB, and report a failure if a Scheme exception is thrown.
-- 
2.39.0


  parent reply	other threads:[~2023-01-12  3:01 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-12  2:59 [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Tom Tromey
2023-01-12  2:59 ` [PATCH v2 01/79] Don't use ensure_gdb_index with require Tom Tromey
2023-01-12  2:59 ` [PATCH v2 02/79] Change 'require' to accept a list of predicates Tom Tromey
2023-01-12  2:59 ` [PATCH v2 03/79] Use unsupported in 'require' Tom Tromey
2023-01-12  2:59 ` [PATCH v2 04/79] Use require supports_reverse Tom Tromey
2023-01-12  2:59 ` [PATCH v2 05/79] Use require supports_process_record Tom Tromey
2023-01-12  2:59 ` [PATCH v2 06/79] Use require dwarf2_support Tom Tromey
2023-01-12  2:59 ` [PATCH v2 07/79] Use require is_x86_like_target Tom Tromey
2023-01-12  2:59 ` [PATCH v2 08/79] Use require skip_cplus_tests Tom Tromey
2023-01-12  3:56   ` Kevin Buettner
2023-01-12  2:59 ` [PATCH v2 09/79] Use require skip_shlib_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 10/79] Use require skip_dlmopen_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 11/79] Use require skip_stl_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 12/79] Use require skip_rust_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 13/79] Use require skip_fortran_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 14/79] Use require skip_ada_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 15/79] Use require skip_go_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 16/79] Use require skip_d_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 17/79] Use require skip_ctf_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 18/79] Use require skip_hw_watchpoint_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 19/79] Use require skip_ifunc_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 20/79] Use require skip_aarch64_sve_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 21/79] Use require skip_btrace_pt_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 22/79] Use require skip_btrace_tests Tom Tromey
2023-01-12  2:59 ` [PATCH v2 23/79] Use require skip_avx_* Tom Tromey
2023-01-12  2:59 ` [PATCH v2 24/79] Use require support_displaced_stepping Tom Tromey
2023-01-12  2:59 ` [PATCH v2 25/79] Use require is_aarch64_target Tom Tromey
2023-01-12  2:59 ` [PATCH v2 26/79] Use require is_aarch32_target Tom Tromey
2023-01-12  3:00 ` [PATCH v2 27/79] Use require is_amd64_regs_target Tom Tromey
2023-01-12  3:00 ` [PATCH v2 28/79] Use require is_elf_target Tom Tromey
2023-01-12  3:00 ` [PATCH v2 29/79] Use require can_single_step_to_signal_handler Tom Tromey
2023-01-12  3:00 ` [PATCH v2 30/79] Use require supports_get_siginfo_type Tom Tromey
2023-01-12  3:00 ` [PATCH v2 31/79] Use require support_go_compile Tom Tromey
2023-01-12  3:00 ` [PATCH v2 32/79] Use require use_gdb_stub Tom Tromey
2023-01-12  3:00 ` [PATCH v2 33/79] Use require can_spawn_for_attach Tom Tromey
2023-01-12  3:00 ` [PATCH v2 34/79] Use require isnative Tom Tromey
2023-01-12  3:00 ` [PATCH v2 35/79] Use require skip_gdbserver_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 36/79] Use require skip_shlib_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 37/79] Use require is_c_compiler_gcc Tom Tromey
2023-01-12  3:00 ` [PATCH v2 38/79] Use require gdb_debug_enabled Tom Tromey
2023-01-12  3:00 ` [PATCH v2 39/79] Use require gdb_skip_xml_test Tom Tromey
2023-01-12  3:00 ` [PATCH v2 40/79] Use require gdb_trace_common_supports_arch Tom Tromey
2023-01-12  3:00 ` [PATCH v2 41/79] Use require skip_perf_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 42/79] Use require skip_opencl_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 43/79] Use require target_can_use_run_cmd Tom Tromey
2023-01-12  3:00 ` [PATCH v2 44/79] Use require using_fission Tom Tromey
2023-01-12  3:00 ` [PATCH v2 45/79] Use require skip_debuginfod_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 46/79] Use require gnat_runtime_has_debug_info Tom Tromey
2023-01-12  3:00 ` [PATCH v2 47/79] Rewrite skip_python_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 48/79] Remove mi_skip_python_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 49/79] Fix latent bug in default_prompt_gdb_start Tom Tromey
2023-01-12  3:00 ` [PATCH v2 50/79] Use "require" for Python tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 51/79] Rename to allow_xml_test Tom Tromey
2023-01-12  3:00 ` [PATCH v2 52/79] Rename to allow_aarch64_sve_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 53/79] Rename to allow_ada_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 54/79] Rename to allow_avx512bf16_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 55/79] Rename to allow_avx512fp16_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 56/79] Rename to allow_btrace_pt_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 57/79] Rename to allow_btrace_tests Tom Tromey
2023-01-12  6:39   ` Metzger, Markus T
2023-01-12  3:00 ` [PATCH v2 58/79] Rename to allow_cplus_tests and allow_stl_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 59/79] Rename to allow_ctf_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 60/79] Rename to allow_debuginfod_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 61/79] Rename to allow_dlmopen_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 62/79] Rename to allow_d_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 63/79] Rename to allow_fortran_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 64/79] Rename to allow_gdbserver_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 65/79] Rename to allow_go_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 66/79] Rename to allow_hw_watchpoint_access_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 67/79] Rename to allow_hw_watchpoint_multi_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 68/79] Rename to allow_hw_watchpoint_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 69/79] Rename to allow_ifunc_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 70/79] Rename to allow_opencl_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 71/79] Rename to allow_perf_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 72/79] Rename to allow_python_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 73/79] Rename to allow_rust_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 74/79] Rename to allow_shlib_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 75/79] Rename to allow_tsx_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 76/79] Rename to allow_hw_breakpoint_tests Tom Tromey
2023-01-12  3:00 ` Tom Tromey [this message]
2023-01-14 16:22   ` [PATCH v2 77/79] Rename to allow_guile_tests Tom de Vries
2023-01-14 19:50     ` Tom Tromey
2023-01-12  3:00 ` [PATCH v2 78/79] Rename to allow_tui_tests Tom Tromey
2023-01-12  3:00 ` [PATCH v2 79/79] Consolidate calls to require Tom Tromey
2023-01-13 12:48   ` Pedro Alves
2023-01-13 14:07     ` Tom Tromey
2023-01-13 14:45       ` Pedro Alves
2023-01-13 19:13         ` Tom Tromey
2023-01-12  4:45 ` [PATCH v2 00/79] Rewrite "require" test procedure and use it more often Kevin Buettner
2023-01-13  3:51   ` Tom Tromey
2023-01-13 20:18 ` Tom Tromey

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=20230112030052.3306113-78-tom@tromey.com \
    --to=tom@tromey.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).