Darryl L. Pierce
2009-Dec-15 14:47 UTC
[Ovirt-devel] [PATCH] The autotest timeout is now a command line configurable option.
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
Joey Boggs
2009-Dec-21 16:13 UTC
[Ovirt-devel] [PATCH] The autotest timeout is now a command line configurable option.
On 12/15/2009 09:47 AM, Darryl L. Pierce wrote:> 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 >ACK
Possibly Parallel Threads
- [PATCH node] Update autobuild and autotest scripts for new build structure
- [PATCH node-image] Adds a preserve option for autotest VMs.
- [PATCH node-image] Fixing the autotest script.
- [PATCH] run: Actually use timeout --foreground option (RHBZ#1025269).
- [PATCH node-image] Removes the explicit setting of the emulator for testing.