[testsuite] Skip gdb.trace/range-stepping.exp test case if not supported
authorPierre Langlois <pierre.langlois@arm.com>
Wed, 15 Jul 2015 13:33:32 +0000 (14:33 +0100)
committerPierre Langlois <pierre.langlois@arm.com>
Wed, 15 Jul 2015 13:33:32 +0000 (14:33 +0100)
Tracepoints and range stepping are independent features.  This patch
skips the gdb.trace/range-stepping.exp test case if the target does not
support range stepping.

gdb/testsuite/ChangeLog:

* gdb.base/range-stepping.exp (gdb_range_stepping_enabled):
Move it to ...
* lib/range-stepping-support.exp (gdb_range_stepping_enabled):
... here.
* gdb.trace/range-stepping.exp: Check that the target supports
range stepping.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/range-stepping.exp
gdb/testsuite/gdb.trace/range-stepping.exp
gdb/testsuite/lib/range-stepping-support.exp

index 5e8b930f2b0fac107dde35af12ce45e6b1eb351c..cd8cc921098135d07ab5b7db15e1d290d82c7243 100644 (file)
@@ -1,3 +1,12 @@
+2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
+
+       * gdb.base/range-stepping.exp (gdb_range_stepping_enabled):
+       Move it to ...
+       * lib/range-stepping-support.exp (gdb_range_stepping_enabled):
+       ... here.
+       * gdb.trace/range-stepping.exp: Check that the target supports
+       range stepping.
+
 2015-07-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        * gdb.arch/i386-biarch-core.exp: Fix comment typo.
index 3b8db7b68ad216d884c170090f48ef0ac90b2b30..2ff371d159f010026a679ea808d696e793d7dadb 100644 (file)
@@ -27,27 +27,6 @@ if ![runto_main] {
     return -1
 }
 
-# Check whether range stepping is supported by the target.
-
-proc gdb_range_stepping_enabled { } {
-    global gdb_prompt
-
-    set command "set range-stepping on"
-    set message "probe range-stepping support"
-    gdb_test_multiple $command $message {
-        -re "Range stepping is not supported.*\r\n$gdb_prompt $" {
-           pass $message
-           return 0
-       }
-        -re "^$command\r\n$gdb_prompt $" {
-           pass $message
-           return 1
-       }
-    }
-
-    return 0
-}
-
 if ![gdb_range_stepping_enabled] {
     unsupported "range stepping not supported by the target"
     return -1
index e711072140ddd72a047c8a170ce16548fb358ea1..dfc16d546d3318780a67c84e578d952013d8c6ef 100644 (file)
@@ -34,6 +34,11 @@ if ![gdb_target_supports_trace] {
     return -1
 }
 
+if ![gdb_range_stepping_enabled] {
+    unsupported "range stepping not supported by the target"
+    return -1
+}
+
 # Check that range stepping works well with tracepoints.
 
 proc range_stepping_with_tracepoint { type } {
index 986216eb3262b1a3e775f56a395b20bdfc614766..d6c0e85fb8fea93c7cd47be9e8298ba38931fa0b 100644 (file)
@@ -52,3 +52,24 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
     gdb_test_no_output "set debug remote 0" ""
     return $ret
 }
+
+# Check whether range stepping is supported by the target.
+
+proc gdb_range_stepping_enabled { } {
+    global gdb_prompt
+
+    set command "set range-stepping on"
+    set message "probe range-stepping support"
+    gdb_test_multiple $command $message {
+        -re "Range stepping is not supported.*\r\n$gdb_prompt $" {
+           pass $message
+           return 0
+       }
+        -re "^$command\r\n$gdb_prompt $" {
+           pass $message
+           return 1
+       }
+    }
+
+    return 0
+}
This page took 0.032792 seconds and 4 git commands to generate.