* gdb.python/python-value.exp (test_value_in_inferior): Don't use
authorPedro Alves <palves@redhat.com>
Fri, 24 Oct 2008 18:54:03 +0000 (18:54 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 24 Oct 2008 18:54:03 +0000 (18:54 +0000)
gdb_start_cmd.
Use runto_main before any test that requires execution.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/python-value.exp

index 4939d28218d1baeb8a76fc5cae5dc73ff50237ec..22a03e805b835ef184a767d11f3d4408c7c17d64 100644 (file)
@@ -1,3 +1,9 @@
+2008-10-24  Pedro Alves  <pedro@codesourcery.com>
+
+       * gdb.python/python-value.exp (test_value_in_inferior): Don't use
+       gdb_start_cmd.
+       Use runto_main before any test that requires execution.
+
 2008-10-23  Pedro Alves  <pedro@codesourcery.com>
 
        * lib/mi-support.exp (mi_expect_interrupt): Expect signal 0
index 7515ab791f1f0553a46484b91f3c39608bd3118c..99b576addf41e6266e9c81007e85a3e6e958670d 100644 (file)
@@ -199,11 +199,6 @@ proc test_value_in_inferior {} {
   global testfile
 
   gdb_breakpoint [gdb_get_line_number "break to inspect struct and union"]
-  gdb_start_cmd
-
-  # Avoid race condition where a continue command in gdb_continue_to_breakpoint
-  # is issued too early.
-  gdb_test "" "$gdb_prompt"
 
   gdb_continue_to_breakpoint "break to inspect struct and union"
 
@@ -247,4 +242,12 @@ test_value_creation
 test_value_numeric_ops
 test_value_boolean
 test_value_compare
+
+# The following tests require execution.
+
+if ![runto_main] then {
+    fail "Can't run to main"
+    return 0
+}
+
 test_value_in_inferior