aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-section-script.exp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-22 13:51:08 +0000
committerTom Tromey <tromey@redhat.com>2013-08-22 13:51:08 +0000
commit8448e842cd2e67a7dbe11a591d4f9bb6dc4a28af (patch)
treee84e6b05cc0a903393aa6e23707857ed0dd13ed8 /gdb/testsuite/gdb.python/py-section-script.exp
parent16cfcbc2025e1daee61dbc3755dd143f00de0a0a (diff)
downloadgdb-8448e842cd2e67a7dbe11a591d4f9bb6dc4a28af.zip
gdb-8448e842cd2e67a7dbe11a591d4f9bb6dc4a28af.tar.gz
gdb-8448e842cd2e67a7dbe11a591d4f9bb6dc4a28af.tar.bz2
fix gdb.python to be parallel-safe
This fixes gdb.python to be parallel-safe, mostly by changing it to use gdb_remote_download. Tested on x86-64 Fedora 18. * gdb.python/py-error.exp: Use gdb_remote_download. * gdb.python/py-mi.exp: Use gdb_remote_download. * gdb.python/py-objfile-script.exp: Use standard_output_file. * gdb.python/py-prettyprint.exp: Use gdb_remote_download. (run_lang_tests): Likewise. * gdb.python/py-section-script.c: Use SCRIPT_FILE rather than filename. * gdb.python/py-section-script.exp: Set SCRIPT_FILE when compiling. Use gdb_remote_download. Update some tests. * gdb.python/py-strfns.exp (test_strfns_core_file): Use standard_output_file. * gdb.python/py-typeprint.exp: Use gdb_remote_download. * gdb.python/py-frame-args.exp: Use gdb_remote_download. * gdb.python/py-framefilter-mi.exp: Use gdb_remote_download. * gdb.python/py-framefilter.exp: Use gdb_remote_download, standard_output_file.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-section-script.exp')
-rw-r--r--gdb/testsuite/gdb.python/py-section-script.exp18
1 files changed, 11 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index 7f710d3..66f1117 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -31,7 +31,15 @@ if {![istarget *-*-linux*]
standard_testfile
-if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
+# Make this available to gdb before the program starts, it is
+# automagically loaded by gdb.
+set remote_python_file [gdb_remote_download host \
+ ${srcdir}/${subdir}/${testfile}.py]
+
+set quoted_name "\"$remote_python_file\""
+
+if {[build_executable $testfile.exp $testfile $srcfile \
+ [list debug additional_flags=-DSCRIPT_FILE=$quoted_name]] == -1} {
return -1
}
@@ -42,18 +50,14 @@ 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]
-
gdb_reinitialize_dir $srcdir/$subdir
gdb_test_no_output "set auto-load safe-path ${remote_python_file}" "set auto-load safe-path"
gdb_load ${binfile}
# Verify gdb loaded the script.
-gdb_test "info auto-load python-scripts" "Yes.*${testfile}.py.*full name: .*/${testfile}.py.*"
+gdb_test "info auto-load python-scripts" "Yes.*${testfile}.py.*"
# Again, with a regexp this time.
-gdb_test "info auto-load python-scripts ${testfile}" "Yes.*${testfile}.py.*full name: .*/${testfile}.py.*"
+gdb_test "info auto-load python-scripts ${testfile}" "Yes.*${testfile}.py.*"
# Again, with a regexp that matches no scripts.
gdb_test "info auto-load python-scripts no-script-matches-this" \
"No auto-load scripts matching no-script-matches-this."