mirror of git://gcc.gnu.org/git/gcc.git
re PR testsuite/28870 (configuring, over-riding timeout values in testsuite)
gcc/ PR testsuite/28870 * doc/sourcebuild.texi (Test Directives): Add dg-timeout and dg-timeout-factor. gcc/testsuite/ PR testsuite/28870 * lib/timeout.exp: New. * lib/timeout-dg.exp: New. * lib/gcc-dg.exp: Include new timeout library files. (dg-test): Unset timeout variables. * lib/gcc.exp (gcc_target_compile): Set timeout value from new proc. * lib/g++.exp (g++_target_compile): Ditto. * lib/gfortran.exp (gfortran_target_compile): Ditto. * lib/objc.exp (objc_target_compile): Ditto. * lib/obj-c++.exp (obj-c++_target_compile): Ditto. * lib/obj-c++.exp (obj-c++_target_compile): Ditto. * lib/gnat.exp (gnat_target_compile): Ditto. libstdc++-v3/ PR testsuite/28870 * testsuite/lib/libstdc++.exp: Include new timeout library files. (libstdc++_init): Define tool_timeout. (dg-test): Override DejaGnu proc. (v3_target_compile): Set timeout value from new proc. (v3_target_compile_as_c): Ditto. libmudflap/ PR testsuite/28870 * testsuite/lib/mfdg.exp (dg-test): Use new timeout support. (dg-timeout): Remove. (standard-wait): Remove. * testsuite/lib/libmudflap.exp: Include new timeout library files. (libmudflap_target_compile): Set timeout value from new proc. libgomp/ PR testsuite/28870 * testsuite/lib/libgomp.exp: Include new timeout library files. (libgomp_target_compile): Set timeout value from new proc. From-SVN: r142225
This commit is contained in:
parent
13fd89472d
commit
d4038ca243
|
@ -1,3 +1,9 @@
|
||||||
|
2008-11-26 Janis Johnson <janis187@us.ibm.com>
|
||||||
|
|
||||||
|
PR testsuite/28870
|
||||||
|
* doc/sourcebuild.texi (Test Directives): Add dg-timeout and
|
||||||
|
dg-timeout-factor.
|
||||||
|
|
||||||
2008-11-26 Uros Bizjak <ubizjak@gmail.com>
|
2008-11-26 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
* config/i386/sync.md (memory_barrier_nosse): Disable also for
|
* config/i386/sync.md (memory_barrier_nosse): Disable also for
|
||||||
|
|
|
@ -990,6 +990,26 @@ The target's C99 runtime (both headers and libraries).
|
||||||
and only then in certain modes.
|
and only then in certain modes.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@item @{ dg-timeout @var{n} [@{target @var{selector} @}] @}
|
||||||
|
Set the time limit for the compilation and for the execution of the test
|
||||||
|
to the specified number of seconds.
|
||||||
|
|
||||||
|
@item @{ dg-timeout-factor @var{x} [@{ target @var{selector} @}] @}
|
||||||
|
Multiply the normal time limit for compilation and execution of the test
|
||||||
|
by the specified floating-point factor. The normal timeout limit, in
|
||||||
|
seconds, is found by searching the following in order:
|
||||||
|
|
||||||
|
@itemize @bullet
|
||||||
|
@item the value defined by an earlier @code{dg-timeout} directive in
|
||||||
|
the test
|
||||||
|
|
||||||
|
@item variable @var{tool_timeout} defined by the set of tests
|
||||||
|
|
||||||
|
@item @var{gcc,,timeout} set in the target board
|
||||||
|
|
||||||
|
@item 300
|
||||||
|
@end itemize
|
||||||
|
|
||||||
@item @{ dg-skip-if @var{comment} @{ @var{selector} @} @{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
|
@item @{ dg-skip-if @var{comment} @{ @var{selector} @} @{ @var{include-opts} @} @{ @var{exclude-opts} @} @}
|
||||||
Skip the test if the test system is included in @var{selector} and if
|
Skip the test if the test system is included in @var{selector} and if
|
||||||
each of the options in @var{include-opts} is in the set of options with
|
each of the options in @var{include-opts} is in the set of options with
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
2008-11-26 Janis Johnson <janis187@us.ibm.com>
|
||||||
|
|
||||||
|
PR testsuite/28870
|
||||||
|
* lib/timeout.exp: New.
|
||||||
|
* lib/timeout-dg.exp: New.
|
||||||
|
* lib/gcc-dg.exp: Include new timeout library files.
|
||||||
|
(dg-test): Unset timeout variables.
|
||||||
|
* lib/gcc.exp (gcc_target_compile): Set timeout value from new proc.
|
||||||
|
* lib/g++.exp (g++_target_compile): Ditto.
|
||||||
|
* lib/gfortran.exp (gfortran_target_compile): Ditto.
|
||||||
|
* lib/objc.exp (objc_target_compile): Ditto.
|
||||||
|
* lib/obj-c++.exp (obj-c++_target_compile): Ditto.
|
||||||
|
* lib/obj-c++.exp (obj-c++_target_compile): Ditto.
|
||||||
|
* lib/gnat.exp (gnat_target_compile): Ditto.
|
||||||
|
|
||||||
2008-11-26 H.J. Lu <hongjiu.lu@intel.com>
|
2008-11-26 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
PR middle-end/37843
|
PR middle-end/37843
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#
|
#
|
||||||
load_lib prune.exp
|
load_lib prune.exp
|
||||||
load_lib gcc-defs.exp
|
load_lib gcc-defs.exp
|
||||||
|
load_lib timeout.exp
|
||||||
load_lib target-libpath.exp
|
load_lib target-libpath.exp
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -279,6 +280,7 @@ proc g++_target_compile { source dest type options } {
|
||||||
|
|
||||||
lappend options "additional_flags=[libio_include_flags]"
|
lappend options "additional_flags=[libio_include_flags]"
|
||||||
lappend options "compiler=$GXX_UNDER_TEST"
|
lappend options "compiler=$GXX_UNDER_TEST"
|
||||||
|
lappend options "timeout=[timeout_value]"
|
||||||
|
|
||||||
set options [concat $gpp_compile_options $options]
|
set options [concat $gpp_compile_options $options]
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,8 @@ load_lib scanasm.exp
|
||||||
load_lib scanrtl.exp
|
load_lib scanrtl.exp
|
||||||
load_lib scantree.exp
|
load_lib scantree.exp
|
||||||
load_lib scanipa.exp
|
load_lib scanipa.exp
|
||||||
|
load_lib timeout.exp
|
||||||
|
load_lib timeout-dg.exp
|
||||||
load_lib prune.exp
|
load_lib prune.exp
|
||||||
load_lib libgloss.exp
|
load_lib libgloss.exp
|
||||||
load_lib target-libpath.exp
|
load_lib target-libpath.exp
|
||||||
|
@ -580,12 +582,14 @@ if { [info procs saved-dg-test] == [list] } {
|
||||||
if [info exists compiler_conditional_xfail_data] {
|
if [info exists compiler_conditional_xfail_data] {
|
||||||
unset compiler_conditional_xfail_data
|
unset compiler_conditional_xfail_data
|
||||||
}
|
}
|
||||||
|
unset_timeout_vars
|
||||||
error $errmsg $saved_info
|
error $errmsg $saved_info
|
||||||
}
|
}
|
||||||
set additional_files ""
|
set additional_files ""
|
||||||
set additional_sources ""
|
set additional_sources ""
|
||||||
set additional_prunes ""
|
set additional_prunes ""
|
||||||
set shouldfail 0
|
set shouldfail 0
|
||||||
|
unset_timeout_vars
|
||||||
if [info exists compiler_conditional_xfail_data] {
|
if [info exists compiler_conditional_xfail_data] {
|
||||||
unset compiler_conditional_xfail_data
|
unset compiler_conditional_xfail_data
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
load_lib libgloss.exp
|
load_lib libgloss.exp
|
||||||
load_lib prune.exp
|
load_lib prune.exp
|
||||||
load_lib gcc-defs.exp
|
load_lib gcc-defs.exp
|
||||||
|
load_lib timeout.exp
|
||||||
|
|
||||||
#
|
#
|
||||||
# GCC_UNDER_TEST is the compiler under test.
|
# GCC_UNDER_TEST is the compiler under test.
|
||||||
|
@ -147,9 +148,7 @@ proc gcc_target_compile { source dest type options } {
|
||||||
if [info exists TOOL_OPTIONS] {
|
if [info exists TOOL_OPTIONS] {
|
||||||
set options [concat "{additional_flags=$TOOL_OPTIONS}" $options]
|
set options [concat "{additional_flags=$TOOL_OPTIONS}" $options]
|
||||||
}
|
}
|
||||||
if [target_info exists gcc,timeout] {
|
lappend options "timeout=[timeout_value]"
|
||||||
lappend options "timeout=[target_info gcc,timeout]"
|
|
||||||
}
|
|
||||||
lappend options "compiler=$GCC_UNDER_TEST"
|
lappend options "compiler=$GCC_UNDER_TEST"
|
||||||
set options [dg-additional-files-options $options $source]
|
set options [dg-additional-files-options $options $source]
|
||||||
return [target_compile $source $dest $type $options]
|
return [target_compile $source $dest $type $options]
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#
|
#
|
||||||
load_lib prune.exp
|
load_lib prune.exp
|
||||||
load_lib gcc-defs.exp
|
load_lib gcc-defs.exp
|
||||||
|
load_lib timeout.exp
|
||||||
load_lib target-libpath.exp
|
load_lib target-libpath.exp
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -193,6 +194,7 @@ proc gfortran_target_compile { source dest type options } {
|
||||||
}
|
}
|
||||||
|
|
||||||
lappend options "compiler=$GFORTRAN_UNDER_TEST"
|
lappend options "compiler=$GFORTRAN_UNDER_TEST"
|
||||||
|
lappend options "timeout=[timeout_value]"
|
||||||
|
|
||||||
set options [concat "$ALWAYS_GFORTRANFLAGS" $options]
|
set options [concat "$ALWAYS_GFORTRANFLAGS" $options]
|
||||||
set options [dg-additional-files-options $options $source]
|
set options [dg-additional-files-options $options $source]
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
load_lib libgloss.exp
|
load_lib libgloss.exp
|
||||||
load_lib prune.exp
|
load_lib prune.exp
|
||||||
load_lib gcc-defs.exp
|
load_lib gcc-defs.exp
|
||||||
|
load_lib timeout.exp
|
||||||
|
|
||||||
#
|
#
|
||||||
# GNAT_UNDER_TEST is the compiler under test.
|
# GNAT_UNDER_TEST is the compiler under test.
|
||||||
|
@ -131,6 +132,7 @@ proc gnat_target_compile { source dest type options } {
|
||||||
set ld_library_path ".:${gnat_libgcc_s_path}"
|
set ld_library_path ".:${gnat_libgcc_s_path}"
|
||||||
lappend options "compiler=$GNAT_UNDER_TEST -q -f"
|
lappend options "compiler=$GNAT_UNDER_TEST -q -f"
|
||||||
lappend options "incdir=${rootme}/ada/rts"
|
lappend options "incdir=${rootme}/ada/rts"
|
||||||
|
lappend options "timeout=[timeout_value]
|
||||||
|
|
||||||
if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
|
if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
|
||||||
lappend options "libs=${gluefile}"
|
lappend options "libs=${gluefile}"
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#
|
#
|
||||||
load_lib prune.exp
|
load_lib prune.exp
|
||||||
load_lib gcc-defs.exp
|
load_lib gcc-defs.exp
|
||||||
|
load_lib timeout.exp
|
||||||
load_lib target-libpath.exp
|
load_lib target-libpath.exp
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -324,6 +325,7 @@ proc obj-c++_target_compile { source dest type options } {
|
||||||
|
|
||||||
lappend options "additional_flags=[libio_include_flags]"
|
lappend options "additional_flags=[libio_include_flags]"
|
||||||
lappend options "compiler=$OBJCXX_UNDER_TEST";
|
lappend options "compiler=$OBJCXX_UNDER_TEST";
|
||||||
|
lappend options "timeout=[timeout_value]"
|
||||||
|
|
||||||
set options [concat $gpp_compile_options $options]
|
set options [concat $gpp_compile_options $options]
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
load_lib libgloss.exp
|
load_lib libgloss.exp
|
||||||
load_lib prune.exp
|
load_lib prune.exp
|
||||||
load_lib gcc-defs.exp
|
load_lib gcc-defs.exp
|
||||||
|
load_lib timeout.exp
|
||||||
load_lib target-libpath.exp
|
load_lib target-libpath.exp
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -193,6 +194,7 @@ proc objc_target_compile { source dest type options } {
|
||||||
set source [concat "-x objective-c-header" $source]
|
set source [concat "-x objective-c-header" $source]
|
||||||
}
|
}
|
||||||
lappend options "compiler=$OBJC_UNDER_TEST"
|
lappend options "compiler=$OBJC_UNDER_TEST"
|
||||||
|
lappend options "timeout=[timeout_value]
|
||||||
|
|
||||||
set_ld_library_path_env_vars
|
set_ld_library_path_env_vars
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
# Copyright (C) 2008 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
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GCC; see the file COPYING3. If not see
|
||||||
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#
|
||||||
|
# dg-timeout -- Set the timout limit, in seconds, for a particular test
|
||||||
|
#
|
||||||
|
|
||||||
|
proc dg-timeout { args } {
|
||||||
|
global individual_timeout
|
||||||
|
|
||||||
|
set args [lreplace $args 0 0]
|
||||||
|
if { [llength $args] > 1 } {
|
||||||
|
if { [dg-process-target [lindex $args 1]] == "S" } {
|
||||||
|
set individual_timeout [lindex $args 0]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
set individual_timeout [lindex $args 0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# dg-timeout-factor -- Scale the timeout limit for a particular test
|
||||||
|
#
|
||||||
|
|
||||||
|
proc dg-timeout-factor { args } {
|
||||||
|
global timeout_factor
|
||||||
|
|
||||||
|
set args [lreplace $args 0 0]
|
||||||
|
if { [llength $args] > 1 } {
|
||||||
|
if { [dg-process-target [lindex $args 1]] == "S" } {
|
||||||
|
set timeout_factor [lindex $args 0]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
set timeout_factor [lindex $args 0]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,81 @@
|
||||||
|
# Copyright (C) 2008 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
|
||||||
|
# the Free Software Foundation; either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with GCC; see the file COPYING3. If not see
|
||||||
|
# <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#
|
||||||
|
# unset_timeout_vars -- Unset variables used for timeouts
|
||||||
|
#
|
||||||
|
|
||||||
|
proc unset_timeout_vars { args } {
|
||||||
|
global individual_timeout
|
||||||
|
global timeout_factor
|
||||||
|
|
||||||
|
if [info exists individual_timeout] {
|
||||||
|
unset individual_timeout
|
||||||
|
}
|
||||||
|
if [info exists timeout_factor] {
|
||||||
|
unset timeout_factor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# timeout_value -- Return the integer timeout value to use for this test
|
||||||
|
#
|
||||||
|
|
||||||
|
proc timeout_value { args } {
|
||||||
|
global tool_timeout
|
||||||
|
global individual_timeout
|
||||||
|
global timeout_factor
|
||||||
|
|
||||||
|
# Find the current timeout limit, in seconds.
|
||||||
|
if [info exists individual_timeout] {
|
||||||
|
set val $individual_timeout
|
||||||
|
} elseif [info exists tool_timeout] {
|
||||||
|
set val $tool_timeout
|
||||||
|
} elseif [target_info exists gcc,timeout] {
|
||||||
|
set val [target_info gcc,timeout]
|
||||||
|
} else {
|
||||||
|
# This is really, REALLY ugly, but this is the default from
|
||||||
|
# remote.exp deep within DejaGnu.
|
||||||
|
set val 300
|
||||||
|
}
|
||||||
|
|
||||||
|
# If the test specified a timeout factor, adjust by that.
|
||||||
|
if [info exists timeout_factor] {
|
||||||
|
set val [expr int([expr $val * $timeout_factor])]
|
||||||
|
}
|
||||||
|
|
||||||
|
return $val
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# standard_wait -- Set the timeout value used by DejaGnu
|
||||||
|
#
|
||||||
|
|
||||||
|
# Override standard_wait from DejaGnu to use timeout value specified by
|
||||||
|
# by the user or by the target board, possibly multiplied by a factor
|
||||||
|
# for a particular test.
|
||||||
|
|
||||||
|
if { [info procs standard_wait] != [list] \
|
||||||
|
&& [info procs saved_standard_wait] == [list] } {
|
||||||
|
rename standard_wait saved_standard_wait
|
||||||
|
proc standard_wait { dest timeout } {
|
||||||
|
set val [timeout_value]
|
||||||
|
if { $val != 0 } {
|
||||||
|
set timeout $val
|
||||||
|
}
|
||||||
|
saved_standard_wait $dest $timeout
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,3 +1,9 @@
|
||||||
|
2008-11-26 Janis Johnson <janis187@us.ibm.com>
|
||||||
|
|
||||||
|
PR testsuite/28870
|
||||||
|
* testsuite/lib/libgomp.exp: Include new timeout library files.
|
||||||
|
(libgomp_target_compile): Set timeout value from new proc.
|
||||||
|
|
||||||
2008-11-13 Steve Ellcey <sje@cup.hp.com>
|
2008-11-13 Steve Ellcey <sje@cup.hp.com>
|
||||||
|
|
||||||
PR libgomp/37938
|
PR libgomp/37938
|
||||||
|
|
|
@ -22,6 +22,8 @@ load_gcc_lib target-libpath.exp
|
||||||
load_gcc_lib wrapper.exp
|
load_gcc_lib wrapper.exp
|
||||||
load_gcc_lib gcc-defs.exp
|
load_gcc_lib gcc-defs.exp
|
||||||
load_gcc_lib torture-options.exp
|
load_gcc_lib torture-options.exp
|
||||||
|
load_gcc_lib timeout.exp
|
||||||
|
load_gcc_lib timeout-dg.exp
|
||||||
load_gcc_lib gcc-dg.exp
|
load_gcc_lib gcc-dg.exp
|
||||||
load_gcc_lib gfortran-dg.exp
|
load_gcc_lib gfortran-dg.exp
|
||||||
|
|
||||||
|
@ -180,6 +182,7 @@ proc libgomp_target_compile { source dest type options } {
|
||||||
}
|
}
|
||||||
|
|
||||||
lappend options "additional_flags=[libio_include_flags]"
|
lappend options "additional_flags=[libio_include_flags]"
|
||||||
|
lappend options "timeout=[timeout_value]"
|
||||||
lappend options "compiler=$GCC_UNDER_TEST"
|
lappend options "compiler=$GCC_UNDER_TEST"
|
||||||
|
|
||||||
set options [concat $libgomp_compile_options $options]
|
set options [concat $libgomp_compile_options $options]
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
2008-11-26 Janis Johnson <janis187@us.ibm.com>
|
||||||
|
|
||||||
|
PR testsuite/28870
|
||||||
|
* testsuite/lib/mfdg.exp (dg-test): Use new timeout support.
|
||||||
|
(dg-timeout): Remove.
|
||||||
|
(standard-wait): Remove.
|
||||||
|
* testsuite/lib/libmudflap.exp: Include new timeout library files.
|
||||||
|
(libmudflap_target_compile): Set timeout value from new proc.
|
||||||
|
|
||||||
2008-11-10 Jakub Jelinek <jakub@redhat.com>
|
2008-11-10 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR middle-end/35314
|
PR middle-end/35314
|
||||||
|
|
|
@ -29,6 +29,8 @@ proc load_gcc_lib { filename } {
|
||||||
load_lib mfdg.exp
|
load_lib mfdg.exp
|
||||||
load_lib libgloss.exp
|
load_lib libgloss.exp
|
||||||
load_gcc_lib target-libpath.exp
|
load_gcc_lib target-libpath.exp
|
||||||
|
load_gcc_lib timeout.exp
|
||||||
|
load_gcc_lib timeout-dg.exp
|
||||||
|
|
||||||
proc libmudflap-init { language } {
|
proc libmudflap-init { language } {
|
||||||
global env
|
global env
|
||||||
|
@ -213,6 +215,7 @@ proc libmudflap_target_compile { source dest type options } {
|
||||||
set cxx_final [concat $cxx_final $libs]
|
set cxx_final [concat $cxx_final $libs]
|
||||||
|
|
||||||
lappend options "compiler=$cxx_final"
|
lappend options "compiler=$cxx_final"
|
||||||
|
lappend options "timeout=[timeout_value]"
|
||||||
|
|
||||||
# Picks up the freshly-built testsuite library corresponding to the
|
# Picks up the freshly-built testsuite library corresponding to the
|
||||||
# multilib under test.
|
# multilib under test.
|
||||||
|
|
|
@ -40,8 +40,7 @@ proc dg-test { args } {
|
||||||
set keep 0
|
set keep 0
|
||||||
set i 0
|
set i 0
|
||||||
set dg-repetitions 1 ;# may be overridden by { dg-repetitions N }
|
set dg-repetitions 1 ;# may be overridden by { dg-repetitions N }
|
||||||
global dg-timeout
|
unset_timeout_vars
|
||||||
set dg-timeout 0 ;# likewise by { dg-timeout N }
|
|
||||||
|
|
||||||
if { [string index [lindex $args 0] 0] == "-" } {
|
if { [string index [lindex $args 0] 0] == "-" } {
|
||||||
for { set i 0 } { $i < [llength $args] } { incr i } {
|
for { set i 0 } { $i < [llength $args] } { incr i } {
|
||||||
|
@ -347,31 +346,3 @@ proc dg-repetitions { line value } {
|
||||||
upvar dg-repetitions repetitions
|
upvar dg-repetitions repetitions
|
||||||
set repetitions $value
|
set repetitions $value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Indicate that this test case is to be run with a short timeout.
|
|
||||||
# The embedded format is "{ dg-timeout N }", where N is in seconds.
|
|
||||||
#
|
|
||||||
proc dg-timeout { line value } {
|
|
||||||
global dg-timeout
|
|
||||||
set dg-timeout $value
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# dejagnu's config/unix.exp hard-codes 300 seconds as the timeout
|
|
||||||
# for any natively run executable. That's too long for tests run
|
|
||||||
# multiple times and that may possibly hang. So we override it here
|
|
||||||
# to provide some degree of control.
|
|
||||||
rename standard_wait hooked_standard_wait
|
|
||||||
proc standard_wait { dest timeout } {
|
|
||||||
global dg-timeout
|
|
||||||
if {[info exists dg-timeout]} {
|
|
||||||
if {${dg-timeout} > 0} {
|
|
||||||
verbose -log "Overriding timeout = ${dg-timeout}"
|
|
||||||
set timeout ${dg-timeout}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hooked_standard_wait $dest $timeout
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
2008-11-26 Janis Johnson <janis187@us.ibm.com>
|
||||||
|
|
||||||
|
PR testsuite/28870
|
||||||
|
* testsuite/lib/libstdc++.exp: Include new timeout library files.
|
||||||
|
(libstdc++_init): Define tool_timeout.
|
||||||
|
(dg-test): Override DejaGnu proc.
|
||||||
|
(v3_target_compile): Set timeout value from new proc.
|
||||||
|
(v3_target_compile_as_c): Ditto.
|
||||||
|
|
||||||
2008-11-24 Paolo Carlini <paolo.carlini@oracle.com>
|
2008-11-24 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR libstdc++/38244 (cont, debug bits)
|
PR libstdc++/38244 (cont, debug bits)
|
||||||
|
|
|
@ -53,6 +53,8 @@ load_gcc_lib target-supports-dg.exp
|
||||||
load_lib prune.exp
|
load_lib prune.exp
|
||||||
load_lib dg-options.exp
|
load_lib dg-options.exp
|
||||||
load_gcc_lib target-libpath.exp
|
load_gcc_lib target-libpath.exp
|
||||||
|
load_gcc_lib timeout.exp
|
||||||
|
load_gcc_lib timeout-dg.exp
|
||||||
load_gcc_lib wrapper.exp
|
load_gcc_lib wrapper.exp
|
||||||
|
|
||||||
# Useful for debugging. Pass the name of a variable and the verbosity
|
# Useful for debugging. Pass the name of a variable and the verbosity
|
||||||
|
@ -89,6 +91,7 @@ proc libstdc++_init { testfile } {
|
||||||
global ld_library_path
|
global ld_library_path
|
||||||
global target_triplet
|
global target_triplet
|
||||||
global flags_file
|
global flags_file
|
||||||
|
global tool_timeout
|
||||||
|
|
||||||
# We set LC_ALL and LANG to C so that we get the same error
|
# We set LC_ALL and LANG to C so that we get the same error
|
||||||
# messages as expected.
|
# messages as expected.
|
||||||
|
@ -184,6 +187,9 @@ proc libstdc++_init { testfile } {
|
||||||
set compiler [transform "g++"]
|
set compiler [transform "g++"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Set the default timeout for v3 tests.
|
||||||
|
set tool_timeout 600
|
||||||
|
|
||||||
# Default settings.
|
# Default settings.
|
||||||
set cxx [transform "g++"]
|
set cxx [transform "g++"]
|
||||||
set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
|
set cxxflags "-g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0"
|
||||||
|
@ -346,6 +352,24 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } {
|
||||||
return [list $comp_output $output_file]
|
return [list $comp_output $output_file]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Override the DejaGnu dg-test in order to clear flags after a test, as
|
||||||
|
# is done for compiler tests in gcc-dg.exp.
|
||||||
|
|
||||||
|
if { [info procs saved-dg-test] == [list] } {
|
||||||
|
rename dg-test saved-dg-test
|
||||||
|
|
||||||
|
proc dg-test { args } {
|
||||||
|
global errorInfo
|
||||||
|
|
||||||
|
if { [ catch { eval saved-dg-test $args } errmsg ] } {
|
||||||
|
set saved_info $errorInfo
|
||||||
|
unset_timeout_vars
|
||||||
|
error $errmsg $saved_info
|
||||||
|
}
|
||||||
|
unset_timeout_vars
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# True if the library supports wchar_t.
|
# True if the library supports wchar_t.
|
||||||
set v3-wchar_t 0
|
set v3-wchar_t 0
|
||||||
|
|
||||||
|
@ -389,7 +413,7 @@ proc v3_target_compile { source dest type options } {
|
||||||
}
|
}
|
||||||
|
|
||||||
lappend options "compiler=$cxx_final"
|
lappend options "compiler=$cxx_final"
|
||||||
lappend options "timeout=600"
|
lappend options "timeout=[timeout_value]"
|
||||||
|
|
||||||
return [target_compile $source $dest $type $options]
|
return [target_compile $source $dest $type $options]
|
||||||
}
|
}
|
||||||
|
@ -455,7 +479,7 @@ proc v3_target_compile_as_c { source dest type options } {
|
||||||
set cc_final [concat $cc_final "$libdir"]
|
set cc_final [concat $cc_final "$libdir"]
|
||||||
|
|
||||||
lappend options "compiler=$cc_final"
|
lappend options "compiler=$cc_final"
|
||||||
lappend options "timeout=600"
|
lappend options "timeout=[timeout_value]"
|
||||||
|
|
||||||
return [target_compile $source $dest $type $options]
|
return [target_compile $source $dest $type $options]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue