Skip tests that send ctrl-c to GDB if nointerrupts target property is set.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.threads / sigthread.exp
index 36042d82246121a097a5134ace18cdfe2888ac4d..cc1634ae95c176db4f294246b2007bd9fd45848e 100644 (file)
@@ -1,5 +1,5 @@
 # sigthread.exp -- Expect script to test thread and signal interaction
-# Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2007-2015 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-set testfile sigthread
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
         executable { debug }] != "" } {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 if ![runto_main] then {
    fail "Can't run to main"
@@ -42,6 +37,12 @@ gdb_test_multiple "continue" "continue" {
     }
 }
 
+# This test requires sending ^C to interrupt the running target.
+if [target_info exists gdb,nointerrupts] {
+    verbose "Skipping sigthread.exp because of nointerrupts."
+    return
+}
+
 # For this to work we must be sure to consume the "Continuing."
 # message first, or GDB's signal handler may not be in place.
 after 500 {send_gdb "\003"}
This page took 0.025537 seconds and 4 git commands to generate.