[14/14] gdb/testsuite: Skip some compile.exp tests when running with gdb-comm board
Commit Message
From: Anton Kolesov <Anton.Kolesov@synopsys.com>
gdb/testsuite/ChangeLog:
2016-08-19 Anton Kolesov <Anton.Kolesov@synopsys.com>
* gdb.compile/compile.exp: Skip if "gdb_comm" was used.
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
---
gdb/testsuite/gdb.compile/compile.exp | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
@@ -40,17 +40,20 @@ clean_restart ${testfile}
#
# Test command without an running inferior.
#
-gdb_test "compile code int i=2;" \
- "The program must be running for the compile command to work.*" \
- "test compile code command without running inferior"
-
-gdb_test "compile int i=2;" \
- "The program must be running for the compile command to work.*" \
- "test compile command without running inferior"
-
-gdb_test "compile file -r ${srcdir}/${subdir}/${testfile}-mod.c" \
- "The program must be running for the compile command to work.*" \
- "test compile file command without running inferior"
+# If target is run via gdb_comm board, then there is already running inferior.
+if {[target_info protocol] != "gdb_comm"} {
+ gdb_test "compile code int i=2;" \
+ "The program must be running for the compile command to work.*" \
+ "test compile code command without running inferior"
+
+ gdb_test "compile int i=2;" \
+ "The program must be running for the compile command to work.*" \
+ "test compile command without running inferior"
+
+ gdb_test "compile file -r ${srcdir}/${subdir}/${testfile}-mod.c" \
+ "The program must be running for the compile command to work.*" \
+ "test compile file command without running inferior"
+}
if ![runto_main] {
return -1