[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 12/16] osstest: allow catching-otherwise to pass arguments to the called script



Allow catching-otherwise to take a variable number of tail arguments,
that will be propagated to the called proc.

Signed-off-by: Roger Pau Monné <roger.pua@xxxxxxxxxx>
---
Changes since v3:
 - New in this version.
---
 sg-run-job | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sg-run-job b/sg-run-job
index b1f94f4d..87d81085 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -123,8 +123,8 @@ proc run-job {job} {
     }
 }
 
-proc catching-otherwise {failst script} {
-    # Executes $script.
+proc catching-otherwise {failst script args} {
+    # Executes $script $args.
     # If job is already a failure (ie not $ok), skips it (ie does nothing).
     # If any Tcl exception is thrown, declares the job a failure.
     # (ie sets job status to $failst, and sets ok to 0)
@@ -134,9 +134,9 @@ proc catching-otherwise {failst script} {
     if {!$ok} return
 
     if {[catch {
-        uplevel 1 $script
+        uplevel 1 $script $args
     } emsg]} {
-        jobdb::logputs stderr "$flight.$jobinfo(job) $script failed: $emsg"
+        jobdb::logputs stderr "$flight.$jobinfo(job) $script $args failed: 
$emsg"
         set ok 0
        setstatus $failst
     }
-- 
2.11.0 (Apple Git-81)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.