aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2011-02-22 08:01:16 +0000
committerJoel Brobecker <brobecker@gnat.com>2011-02-22 08:01:16 +0000
commitc45f3c548d7ba59939c70f7e132de22db190de56 (patch)
tree8e5d73c55c3b1268e5b30f47cd1473a85dee3d0a /gdb/testsuite
parent36238dbca5681409b8747c7dc0eda8c68b4bb4c5 (diff)
downloadgdb-c45f3c548d7ba59939c70f7e132de22db190de56.zip
gdb-c45f3c548d7ba59939c70f7e132de22db190de56.tar.gz
gdb-c45f3c548d7ba59939c70f7e132de22db190de56.tar.bz2
minor adjustments in gdb.python/py-block.exp
gdb/testsuite/ChangeLog: * gdb.python/py-block.exp: Simplify using prepare_for_testing. Delete variable binfile, no longer use. Add or modify test comments to make them unique.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.python/py-block.exp20
2 files changed, 13 insertions, 13 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5d273ea..46225c0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-02-22 Joel Brobecker <brobecker@adacore.com>
+
+ * gdb.python/py-block.exp: Simplify using prepare_for_testing.
+ Delete variable binfile, no longer use. Add or modify test
+ comments to make them unique.
+
2011-02-21 Michael Snyder <msnyder@vmware.com>
* Makefile.in: Update for make clean.
diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp
index b1a49d6..c400df7 100644
--- a/gdb/testsuite/gdb.python/py-block.exp
+++ b/gdb/testsuite/gdb.python/py-block.exp
@@ -24,18 +24,10 @@ load_lib gdb-python.exp
set testfile "py-block"
set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "Couldn't compile ${srcfile}"
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
return -1
}
-# Start with a fresh gdb.
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
# Skip all tests if Python scripting is not enabled.
if { [skip_python_tests] } { continue }
@@ -60,11 +52,13 @@ gdb_test "python print block.end" "${decimal}" "Check end not None"
gdb_test_no_output "python block = block.superblock" "Get superblock"
gdb_test "python print block.function" "None" "Second anonymous block"
gdb_test_no_output "python block = block.superblock" "Get superblock 2"
-gdb_test "python print block.function" "block_func"
+gdb_test "python print block.function" "block_func" \
+ "Print superblock 2 function"
# Switch frames, then test for main block.
gdb_test "up" ".*"
-gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame" 0
-gdb_py_test_silent_cmd "python block = frame.block()" "Get block" 0
-gdb_test "python print block" "<gdb.Block object at $hex>" "Check block not None"
+gdb_py_test_silent_cmd "python frame = gdb.selected_frame()" "Get Frame 2" 0
+gdb_py_test_silent_cmd "python block = frame.block()" "Get Frame 2's block" 0
+gdb_test "python print block" "<gdb.Block object at $hex>" \
+ "Check Frame 2's block not None"
gdb_test "python print block.function" "main" "main block"