[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] * config/unix.exp: add ability to set test timeout from site.exp
From: |
Filipe Brandenburger |
Subject: |
[PATCH] * config/unix.exp: add ability to set test timeout from site.exp. |
Date: |
Thu, 19 Nov 2015 07:13:40 -0800 |
From: Brooks Moses <address@hidden>
Hi Ben,
Here is the squashed commit, the change to respect a test_timeout
setting and the docs for it.
If you prefer to keep the two patches separate, then you can find the
first one (with just the test_timeout change, without the docs) here:
http://lists.gnu.org/archive/html/dejagnu/2015-11/msg00002.html
Cheers!
Filipe
Here's a ChangeLog snippet for the squashed commit:
* config/unix.exp: add ability to set test timeout from site.exp.
* doc/user.xml: document new test_timeout variable of site.exp.
* doc/dejagnu.texi: Regenerate.
Signed-off-by: Brooks Moses <address@hidden>
Signed-off-by: Filipe Brandenburger <address@hidden>
---
config/unix.exp | 8 +++++++-
doc/dejagnu.texi | 6 ++++++
doc/user.xml | 6 ++++++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/config/unix.exp b/config/unix.exp
index 4b244cab5b4e..c9d80dcddb02 100644
--- a/config/unix.exp
+++ b/config/unix.exp
@@ -35,9 +35,14 @@ load_lib remote.exp
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 {
@@ -72,13 +77,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 b2c6e5a55f6a..c679b6c22171 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 07bb7a3b34ac..5edfaabec4c5 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>
--
2.6.0.rc2.230.g3dd15c0
[PATCH 2/2] * lib/target.exp: honor LDFLAGS_FOR_TARGET in a target compile., Filipe Brandenburger, 2015/11/10
Re: [PATCH 0/2] Test timeout and honoring LDFLAGS, Ben Elliston, 2015/11/10