timeout-dg.exp 1.4 KB

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