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

[Xen-devel] [PATCH OSSTEST] sg-run-job: Only consider $OSSTEST_SIMULATE > 0



This matches the semantics implemented in cri-args-hostlists and is
compatible with the recent change to the standalone wrapper
("standalone: Add --dry-run option for run-job.") which sets it to 0
or 1.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
"standalone: Add --dry-run option for run-job." is in pretest right
now, if that run were to fail I'd suggest folding this in, otherwise I
think we can just pile this fix on top.
---
 sg-run-job | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sg-run-job b/sg-run-job
index f2c70cf..1e28481 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -157,7 +157,10 @@ proc spawn-ts {iffail testid args} {
     jobdb::spawn-step-commit $flight $jobinfo(job) $stepno $testid
 
     set xprefix {}
-    if {[info exists env(OSSTEST_SIMULATE)]} { set xprefix echo }
+    if {[info exists env(OSSTEST_SIMULATE)] &&
+       [expr $env(OSSTEST_SIMULATE) > 0]} {
+       set xprefix echo
+    }
 
     set log [jobdb::step-log-filename $flight $jobinfo(job) $stepno $ts]
     set redirects {< /dev/null}
-- 
2.1.4


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


 


Rackspace

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