From: Ian Jackson Subject: [OSSTEST PATCH 06/10] sg-run-job: testid generation: Introduce $testid_args Date: Fri, 6 Feb 2015 19:17:51 +0000 Message-ID: <1423250275-20872-7-git-send-email-ian.jackson@eu.citrix.com> References: <1423250275-20872-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YJoPm-0000XK-84 for xen-devel@lists.xenproject.org; Fri, 06 Feb 2015 19:18:06 +0000 In-Reply-To: <1423250275-20872-1-git-send-email-ian.jackson@eu.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: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Rather than accumulating into host_testid_suffix directly, accumulate into a list testid_args first. No functional change: all we do is defer the construction of host_testid_suffix, which is not used until later in this function. Signed-off-by: Ian Jackson --- sg-run-job | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sg-run-job b/sg-run-job index 68d6c65..5c192ab 100755 --- a/sg-run-job +++ b/sg-run-job @@ -117,19 +117,22 @@ proc spawn-ts {iffail testid ts args} { set real_args {} set adding 1 - set host_testid_suffix {} + set testid_args {} foreach arg $args { if {![string compare + $arg]} { set adding [expr {!$adding}] continue } lappend real_args $arg - if {$adding} { append host_testid_suffix "/$arg" } + if {$adding} { lappend testid_args $arg } } regsub {^ts-} $ts {} deftestid append deftestid /@ + set host_testid_suffix {} + foreach arg $testid_args { append host_testid_suffix "/$arg" } + jobdb::spawn-step-begin $flight $jobinfo(job) $ts stepno if {[string match =* $testid]} { -- 1.7.10.4