aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Moses <bmoses@google.com>2015-11-20 09:21:04 +1100
committerRob Savoye <rob@welcomehome.org>2016-03-01 11:24:54 +0700
commita5ccc19f2191636af3dd2b1a9e8e572ba88a4971 (patch)
treed7700eea1ec1959a72f1ec0b365a48c0f728b9c8
parente8e0d8675903e71c7c7993e57cc9c5afdfab06d7 (diff)
* config/unix.exp: Add ability to set test timeout from site.exp.
* doc/user.xml: Document new test_timeout variable in site.exp. * doc/dejagnu.texi: Regenerate. Signed-off-by: Ben Elliston <bje@gnu.org> (cherry picked from commit 73db65f5379532d038cb65b45c56f8d8f765286a)
-rw-r--r--ChangeLog6
-rw-r--r--config/unix.exp8
-rw-r--r--doc/dejagnu.texi6
-rw-r--r--doc/user.xml6
4 files changed, 25 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ec640a..8f1ef6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,12 @@
Since we (Linaro TCWG) use ssh, this patch just removes "ssh rm
-f", since scp will overwrite the file, if one is present.
+2015-11-16 Brooks Moses <bmoses@google.com>
+
+ * config/unix.exp: Add ability to set test timeout from site.exp.
+ * doc/user.xml: Document new test_timeout variable in site.exp.
+ * doc/dejagnu.texi: Regenerate.
+
2015-11-16 Ben Elliston <bje@gnu.org>
* testsuite/runtest.all/options.exp: Re-enable --strace 1 test.
diff --git a/config/unix.exp b/config/unix.exp
index 5320ab7..0bb4d83 100644
--- a/config/unix.exp
+++ b/config/unix.exp
@@ -38,9 +38,14 @@ proc make_absolute {pathname} {
proc unix_load { dest prog args } {
global ld_library_path
+ global test_timeout
set output ""
set orig_ld_library_path ""
+ if {![info exists test_timeout]} {
+ set test_timeout 300
+ }
+
if { [llength $args] > 0 } {
set parg [lindex $args 0]
} else {
@@ -75,13 +80,14 @@ proc unix_load { dest prog args } {
setenv LD_LIBRARY_PATH "$ld_library_path:$orig_ld_library_path"
setenv SHLIB_PATH "$ld_library_path:$orig_ld_library_path"
verbose -log "Setting LD_LIBRARY_PATH to $ld_library_path:$orig_ld_library_path" 2
+ verbose -log "Execution timeout is: $test_timeout" 2
set id [remote_spawn $dest "$command" "readonly"]
if { $id < 0 } {
set output "remote_spawn failed"
set status -1
} else {
- set status [remote_wait $dest 300]
+ set status [remote_wait $dest $test_timeout]
set output [lindex $status 1]
set status [lindex $status 0]
}
diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi
index b2c6e5a..c679b6c 100644
--- a/doc/dejagnu.texi
+++ b/doc/dejagnu.texi
@@ -2100,6 +2100,12 @@ the GCC testsuite. For most test cases, the CXXFLAGS and LDFLAGS
are supplied by DejaGnu itself for cross testing, but to test a
compiler, GCC needs to manipulate these itself.
+The local @file{site.exp} may also set Tcl
+variables such as @code{test_timeout} which can control
+the amount of time (in seconds) to wait for a remote test to
+complete. If not specified, @code{test_timeout} defaults
+to 300 seconds.
+
@node Global Config File, Board Config File, Local Config File, Customizing DejaGnu
@section Global Config File
diff --git a/doc/user.xml b/doc/user.xml
index 07bb7a3..5edfaab 100644
--- a/doc/user.xml
+++ b/doc/user.xml
@@ -1673,6 +1673,12 @@ powerpc-linux-gcc -g -O2 -o calc calc.o
are supplied by &dj; itself for cross testing, but to test a
compiler, GCC needs to manipulate these itself.</para>
+ <para>The local <filename>site.exp</filename> may also set Tcl
+ variables such as <symbol>test_timeout</symbol> which can control
+ the amount of time (in seconds) to wait for a remote test to
+ complete. If not specified, <symbol>test_timeout</symbol> defaults
+ to 300 seconds.</para>
+
</sect2>
<sect2 id="global" xreflabel="Global Config File">
<title>Global Config File</title>