OSDN Git Service

* lib/gcc-simulate-thread.exp (simulate-thread): Improve error message.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / lib / timeout-dg.exp
1 # Copyright (C) 2008 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with GCC; see the file COPYING3.  If not see
15 # <http://www.gnu.org/licenses/>.
16
17 #
18 # dg-timeout -- Set the timout limit, in seconds, for a particular test
19 #
20
21 proc dg-timeout { args } {
22     global individual_timeout
23
24     set args [lreplace $args 0 0]
25     if { [llength $args] > 1 } {
26         if { [dg-process-target [lindex $args 1]] == "S" } {
27             set individual_timeout [lindex $args 0]
28         }
29     } else {
30         set individual_timeout [lindex $args 0]
31     }
32 }
33
34 #
35 # dg-timeout-factor -- Scale the timeout limit for a particular test
36 #
37
38 proc dg-timeout-factor { args } {
39     global timeout_factor
40
41     set args [lreplace $args 0 0]
42     if { [llength $args] > 1 } {
43         if { [dg-process-target [lindex $args 1]] == "S" } {
44             set timeout_factor [lindex $args 0]
45         }
46     } else {
47         set timeout_factor [lindex $args 0]
48     }
49 }