diff options
author | Pedro Alves <palves@redhat.com> | 2017-10-12 18:20:25 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2017-10-13 18:11:31 +0100 |
commit | 300b6685f17cae131166eaf2fcafe10dab06466b (patch) | |
tree | 5ca5331347e01f842a7dd3bc15e2f42f9fde9809 /gdb/testsuite/gdb.cp | |
parent | 50500caf810fcc6c05e3fd89bc37fe8f9e4adb07 (diff) | |
download | gdb-300b6685f17cae131166eaf2fcafe10dab06466b.zip gdb-300b6685f17cae131166eaf2fcafe10dab06466b.tar.gz gdb-300b6685f17cae131166eaf2fcafe10dab06466b.tar.bz2 |
Skip a few tests on targets that can't use the "run" commmand.
These tests want to use raw "run", so skip them on targets that can't
do that.
Also adds a small utility procedure that clearly conveys intent instead of
explicitly checking use_gdb_stub in the testcases.
This makes sure these testcases continue to be skipped with
--target_board=native-gdbserver once that board stops setting
is_remote.
gdb/testsuite/ChangeLog:
2017-10-13 Pedro Alves <palves@redhat.com>
* lib/gdb.exp (target_can_use_run_cmd): New procedure.
* gdb.base/annota1.exp: Use it instead of is_remote.
* gdb.base/annota3.exp: Use it instead of is_remote.
* gdb.cp/annota2.exp: Use it instead of is_remote.
* gdb.cp/annota3.exp: Use it instead of is_remote.
* gdb.multi/bkpt-multi-exec.exp: Use it instead of is_remote.
Diffstat (limited to 'gdb/testsuite/gdb.cp')
-rw-r--r-- | gdb/testsuite/gdb.cp/annota2.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/annota3.exp | 8 |
2 files changed, 6 insertions, 10 deletions
diff --git a/gdb/testsuite/gdb.cp/annota2.exp b/gdb/testsuite/gdb.cp/annota2.exp index a00161d..78e8795 100644 --- a/gdb/testsuite/gdb.cp/annota2.exp +++ b/gdb/testsuite/gdb.cp/annota2.exp @@ -29,12 +29,10 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ return -1 } -# are we on a target board? If so, don't run these tests. -# note: this is necessary because we cannot use runto_main (which would -# work for remote targets too) because of the different prompt we get -# when using annotation level 2. +# This testcase cannot use runto_main because of the different prompt +# we get when using annotation level 2. # -if [is_remote target] then { +if ![target_can_use_run_cmd] { return 0 } diff --git a/gdb/testsuite/gdb.cp/annota3.exp b/gdb/testsuite/gdb.cp/annota3.exp index 4215e76..3141251 100644 --- a/gdb/testsuite/gdb.cp/annota3.exp +++ b/gdb/testsuite/gdb.cp/annota3.exp @@ -29,12 +29,10 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \ return -1 } -# are we on a target board? If so, don't run these tests. -# note: this is necessary because we cannot use runto_main (which would -# work for remote targets too) because of the different prompt we get -# when using annotation level 2. +# This testcase cannot use runto_main because of the different prompt +# we get when using annotation level 2. # -if [is_remote target] then { +if ![target_can_use_run_cmd] { return 0 } |