summaryrefslogtreecommitdiffstats
path: root/gdb/testsuite/gdb.python
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python')
-rw-r--r--gdb/testsuite/gdb.python/py-section-script.exp11
1 files changed, 7 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index e51bd7c765..81762ba45c 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -41,14 +41,17 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
return -1
}
+# Start with a fresh gdb.
+gdb_exit
+gdb_start
+
+# Skip all tests if Python scripting is not enabled.
+if { [skip_python_tests] } { continue }
+
# Make this available to gdb before the program starts, it is
# automagically loaded by gdb.
set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
OpenPOWER on IntegriCloud