[Ovirt-devel] [PATCH] The autotest timeout is now a command line configurable option.
Darryl L. Pierce
dpierce at redhat.com
Tue Dec 15 14:47:44 UTC 2009
By default it's 120 ms, but can be changed through command line
arguments.
Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
autotest.sh | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/autotest.sh b/autotest.sh
index c67931a..bcd9bd5 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -62,6 +62,7 @@ Usage: $ME [-n test_name] [LOGFILE]
-i: set the ISO filename (defualt: ovirt-node-image.iso)
-n: the name of the specific autotest to run (default: run all autotests)
-d: enable more verbose output (default: disabled)
+ -t: change the timeout between markers (in ms, default: 120)
-v: enable tracing (default: disabled)
-w: launch virt-viewer for each VM (default: no window shown)
-h: display this help and exit
@@ -484,7 +485,7 @@ test_stateless_pxe () {
boot_with_pxe "${nodename}" "standalone firstboot=no" "${workdir}"
expect -c '
-set timeout 120
+set timeout '${timeout_period}'
log_file -noappend stateless-pxe.log
@@ -526,7 +527,7 @@ test_stateless_pxe_with_nohd () {
boot_with_pxe "${nodename}" "firstboot=no" "${workdir}"
expect -c '
-set timeout 120
+set timeout '${timeout_period}'
log_file -noappend stateless-pxe.log
@@ -575,7 +576,7 @@ test_stateful_pxe () {
# verify the booting and installation
expect -c '
-set timeout 120
+set timeout '${timeout_period}'
log_file -noappend stateful-pxe.log
spawn sudo virsh console '"${nodename}"'
@@ -608,7 +609,7 @@ exit 3'
boot_from_hd "${nodename}"
expect -c '
-set timeout 120
+set timeout '${timeout_period}'
log_file stateful-pxe.log
send_log "Restarted node, booting from hard disk.\n"
@@ -704,13 +705,15 @@ isofile="${PWD}/ovirt-node-image.iso"
show_viewer=false
vm_prefix="$$"
preserve_vm=false
+timeout_period="120"
-while getopts di:n:pvwh c; do
+while getopts di:n:pt:vwh c; do
case $c in
d) debugging=true;;
i) isofile=($OPTARG);;
n) tests=($OPTARG);;
- p) preserve_vm=true;;
+ p) preserve_vm=true;;
+ t) timeout_period=($OPTARG);;
v) set -v;;
w) show_viewer=true;;
h) usage; exit 0;;
@@ -738,6 +741,7 @@ log "Logging results to file: ${RESULTS}"
log "Begin Testing: ${isoname}"
log "Tests: ${tests}"
+ log "Timeout: ${timeout_period} ms"
for test in ${tests}; do
execute_test $test
--
1.6.5.2
More information about the ovirt-devel
mailing list