From: Ian Campbell Subject: [PATCH OSSTEST] sg-run-job: Only consider $OSSTEST_SIMULATE > 0 Date: Wed, 25 Mar 2015 09:45:01 +0000 Message-ID: <1427276701-7274-1-git-send-email-ian.campbell@citrix.com> References: <1427201828-22462-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427201828-22462-1-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 --- "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