# load support procs
load_lib gm2-torture.exp
+load_lib timeout-dg.exp
set gm2src ${srcdir}/../gm2
gm2_init_cor
+# We should be able to compile, link or run in 15 seconds.
+gm2_push_timeout 15
+
+
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $testcase] then {
gm2-torture-execute $testcase "" "pass"
}
+
+gm2_pop_timeout
# load support procs
load_lib gm2-torture.exp
-gm2_init_min "${srcdir}/gm2/min/pass"
+gm2_init_min ""
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
# If we're only testing specific files and this isn't one of them, skip it.
load_lib gm2-torture.exp
gm2_init_pim "${srcdir}/gm2/switches/whole-program/run/pass" -fm2-whole-program
+gm2_push_timeout 60
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
# If we're only testing specific files and this isn't one of them, skip it.
gm2_target_compile $srcdir/$subdir/mystrlib.mod mystrlib.o object "-g -O3 -I$srcdir/$subdir/"
gm2-torture $testcase
}
+
+gm2_pop_timeout
load_lib file-format.exp
load_lib target-libpath.exp
+load_lib timeout.exp
+load_lib timeout-dg.exp
+
+
+if {[info exists individual_timeout]} {
+ set gm2_previous_timeout $individual_timeout
+} else {
+ set gm2_previous_timeout 10
+}
+
+
+# We should be able to complete any test in 10 seconds.
+dg-timeout S 10
+
+
+# only push one level.
+
+proc gm2_push_timeout { secs } {
+ global individual_timeout
+ set individual_timeout $secs
+}
+
+
+proc gm2_pop_timeout { } {
+ global individual_timeout
+ global gm2_previous_timeout
+ set individual_timeout $gm2_previous_timeout
+}
+
# The default option list can be overridden by
# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
set options ""
lappend options "additional_flags=$option"
+ lappend options "timeout=[timeout_value]"
if { $additional_flags != "" } {
lappend options "additional_flags=$additional_flags"
}
# now link the test
set options ${option};
+ lappend options "timeout=[timeout_value]"
if { [llength ${args}] > 0 } {
lappend options "additional_flags=[lindex ${args} 0]"
}
load_lib gcc-defs.exp
load_lib target-libpath.exp
load_lib timeout.exp
+load_lib timeout-dg.exp
+
+
+if {[info exists individual_timeout]} {
+ set gm2_previous_timeout $individual_timeout
+} else {
+ set gm2_previous_timeout 10
+}
+
+
+# set gm2_previous_timeout $individual_timeout
+
+# We should be able to complete any test in 10 seconds.
+dg-timeout S 10
+
+
+# only push one level.
+
+proc gm2_push_timeout { secs } {
+ global individual_timeout
+ set individual_timeout $secs
+}
+
+
+proc gm2_pop_timeout { } {
+ global individual_timeout
+ global gm2_previous_timeout
+ set individual_timeout $gm2_previous_timeout
+}
+
#
# GCC_UNDER_TEST is the compiler under test.
set gm2_link_path "[gm2_link_flags [get_multilibs]]";
verbose $gm2_link_path 1
+
+ # Set the default timeout value, larger tests can override
+ # this if necessary.
+ dg-timeout S 10
}
+
#
# gm2_target_compile_default -- compile a source file
#