skip "attach" tests when testing against stub-like targets
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-prompt.exp
index 28f5e9aa1043cf565698a213c1cedb6a429ecd5c..55f0f5966ebd5f86dc9781ff05b42f94bb233638 100644 (file)
 
 standard_testfile
 
-# We need to use TCL's exec to get the pid.
-if [is_remote target] then {
-    return 0
-}
-
 load_lib gdb-python.exp
 load_lib prompt.exp
 
@@ -80,6 +75,10 @@ gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
         "prompt_hook argument is default prompt. 2"
 gdb_exit
 
+if {![can_spawn_for_attach]} {
+    return 0
+}
+
 set testpid [spawn_wait_for_attach $binfile]
 
 set GDBFLAGS [concat $tmp_gdbflags " -ex \"set pagination off\""]
This page took 0.027014 seconds and 4 git commands to generate.