From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [OSSTEST PATCH 06/11] sg-run-job: Honour skip_testids runvar
Date: Tue, 18 Apr 2017 16:56:47 +0100 [thread overview]
Message-ID: <1492531012-14315-7-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1492531012-14315-1-git-send-email-ian.jackson@eu.citrix.com>
This works like truncate_testids, except that the steps which match
are never run (truncate_testids skips steps *after* matching steps,
and also doesn't skip some things like log capture).
If the programmed testid for a step ends in `(*)' to request
substitutions of the stepno, the skip matching takes place against the
unsubstituted value (since it happens before a stepno is allocated).
There is no way to skip only some of a set of steps whose testids are
distinguished only by stepno.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
sg-run-job | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/sg-run-job b/sg-run-job
index 8cf3b94..8e625d9 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -41,14 +41,16 @@ proc per-host-finish {} {
proc run-job {job} {
global jobinfo builds flight ok truncate need_xen_hosts anyfailed
- global nested_layers_hosts truncate_globs
+ global nested_layers_hosts truncate_globs skip_globs anyskipped
set ok 1
set truncate 0
+ set anyskipped 0
set anyfailed 0
jobdb::prepare $job
set truncate_globs [jobdb::read-runvar $flight $job truncate_testids]
+ set skip_globs [jobdb::read-runvar $flight $job skip_testids]
set nh [need-hosts/$jobinfo(recipe)]
if {![string compare $nh BUILD]} {
@@ -97,7 +99,7 @@ proc run-job {job} {
}
}
- if {$truncate} {
+ if {$truncate || $anyskipped} {
if {$ok} { setstatus truncated }
set ok 0
}
@@ -174,7 +176,7 @@ proc iffail-check {iffail okexpr iffail_status_var} {
}
proc spawn-ts {iffail testid args} {
- global flight c jobinfo env truncate
+ global flight c jobinfo env truncate skip_globs anyskipped
if {[file exists abort]} {
jobdb::logputs stdout \
@@ -217,6 +219,13 @@ proc spawn-ts {iffail testid args} {
}
regsub {/\@} $testid $host_testid_suffix testid
+ if {[testid_matches_globs $testid $skip_globs]} {
+ set anyskipped 1
+ jobdb::logputs stdout \
+ "skipping - not executing $flight.$jobinfo(job) $args"
+ return {imm 1} ;# reap-ts will report success
+ }
+
jobdb::spawn-step-begin $flight $jobinfo(job) $ts stepno
regsub {\(\*\)$} $testid ($stepno) testid
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-04-18 15:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 15:56 [OSSTEST PATCH 00/11] Coverity fix and mg-repro-setup improvements Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 01/11] TestSupport: Provide stashfilecontents Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 02/11] ts-coverity-upload: Pass HttpsProxyMITMCert to curl Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 03/11] truncation: Support globs, and multiple patterns Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 04/11] sg-run-job: Break out testid_matches_globs Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 05/11] sg-run-job: Start step a bit later Ian Jackson
2017-04-18 15:56 ` Ian Jackson [this message]
2017-04-18 15:56 ` [OSSTEST PATCH 07/11] mg-repro-setup: skip log capture (by default) Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 08/11] mg-allocate: Document --info-base in head comment Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 09/11] mg-allocate: Support --progress-fd Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 10/11] mg-execute-flight: " Ian Jackson
2017-04-18 15:56 ` [OSSTEST PATCH 11/11] mg-repro-setup: Use --progress-fd Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1492531012-14315-7-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).