This is the mail archive of the gdb-cvs@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]

[binutils-gdb] [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=42422cc7d6c2e816ef1c4d268f41b58c031344f2

commit 42422cc7d6c2e816ef1c4d268f41b58c031344f2
Author: Pierre Langlois <pierre.langlois@arm.com>
Date:   Wed Jul 15 14:33:32 2015 +0100

    [testsuite] Skip gdb.trace/range-stepping.exp test case if not supported
    
    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.

Diff:
---
 gdb/testsuite/ChangeLog                      |  9 +++++++++
 gdb/testsuite/gdb.base/range-stepping.exp    | 21 ---------------------
 gdb/testsuite/gdb.trace/range-stepping.exp   |  5 +++++
 gdb/testsuite/lib/range-stepping-support.exp | 21 +++++++++++++++++++++
 4 files changed, 35 insertions(+), 21 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5e8b930..cd8cc92 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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.
diff --git a/gdb/testsuite/gdb.base/range-stepping.exp b/gdb/testsuite/gdb.base/range-stepping.exp
index 3b8db7b..2ff371d 100644
--- a/gdb/testsuite/gdb.base/range-stepping.exp
+++ b/gdb/testsuite/gdb.base/range-stepping.exp
@@ -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
diff --git a/gdb/testsuite/gdb.trace/range-stepping.exp b/gdb/testsuite/gdb.trace/range-stepping.exp
index e711072..dfc16d5 100644
--- a/gdb/testsuite/gdb.trace/range-stepping.exp
+++ b/gdb/testsuite/gdb.trace/range-stepping.exp
@@ -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 } {
diff --git a/gdb/testsuite/lib/range-stepping-support.exp b/gdb/testsuite/lib/range-stepping-support.exp
index 986216e..d6c0e85 100644
--- a/gdb/testsuite/lib/range-stepping-support.exp
+++ b/gdb/testsuite/lib/range-stepping-support.exp
@@ -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
+}


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