This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Skip py-section-script.exp if no Python support


Hello,

I noticed that gdb.python/py-section-script.exp fails if GDB does not support
Python scripting.  All other gdb.python tests are skipped in that case.

The patch below adds the skip_python_tests check to this test as well.

Tested on powerpc64-linux, both with and without Python support.
Committed to mainline.

Bye,
Ulrich

ChangeLog:

	* gdb.python/py-section-script.exp: Skip test if no Python support.

Index: gdb/testsuite/gdb.python/py-section-script.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-section-script.exp,v
retrieving revision 1.3
diff -u -p -r1.3 py-section-script.exp
--- gdb/testsuite/gdb.python/py-section-script.exp	19 Jan 2011 20:26:09 -0000	1.3
+++ gdb/testsuite/gdb.python/py-section-script.exp	13 Mar 2011 13:03:57 -0000
@@ -41,14 +41,17 @@ if { [gdb_compile "${srcdir}/${subdir}/$
     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}
 
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]