From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH 5/6] Other-revision-jobs: Provide other_revision_job_suffix
Date: Fri, 28 Aug 2015 17:34:00 +0100 [thread overview]
Message-ID: <1440779641-22477-5-git-send-email-ian.jackson@eu.citrix.com> (raw)
In-Reply-To: <1440779641-22477-1-git-send-email-ian.jackson@eu.citrix.com>
This is a string, a function of the job name, that identifies the
class of `other revisions'. It is empty for main-revision jobs
and currently there is only `<delimiter>prev' for build-*-prev.
We are going to use this in the bisector.
Reimplement main_revision_job_cond in terms of this. No functional
change, except that the SQL optimiser may have more work to do.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest.pm | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/Osstest.pm b/Osstest.pm
index 55e1aa1..1fe16fc 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -35,7 +35,7 @@ BEGIN {
getmethod
postfork
flight_otherjob
- main_revision_job_cond
+ main_revision_job_cond other_revision_job_suffix
$dbh_tests db_retry db_retry_retry db_retry_abort
db_begin_work db_prepare
ensuredir get_filecontents_core_quiet system_checked
@@ -318,9 +318,19 @@ sub flight_otherjob ($$) {
die "$otherflightjob ?";
}
+sub other_revision_job_suffix ($$) {
+ my ($jobfield, $separator) = @_;
+ return <<END
+ (CASE
+ WHEN ($jobfield) LIKE 'build-%-prev' THEN '${separator}prev'
+ ELSE ''
+ END)
+END
+}
+
sub main_revision_job_cond ($) {
my ($jobfield) = @_;
- return "(($jobfield) NOT LIKE 'build-%-prev')";
+ return "(${\ other_revision_job_suffix($jobfield,'x') } = '')";
}
sub get_filecontents_core_quiet ($) { # ENOENT => undef
--
1.7.10.4
next prev parent reply other threads:[~2015-08-28 16:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-28 16:33 [OSSTEST PATCH 1/6] Other-revision-jobs: Provide central test Ian Jackson
2015-08-28 16:33 ` [OSSTEST PATCH 2/6] Other-revision-jobs: Update report__find_test Ian Jackson
2015-08-28 16:33 ` [OSSTEST PATCH 3/6] Other-revision-jobs: Update sg-check-tested Ian Jackson
2015-08-28 16:33 ` [OSSTEST PATCH 4/6] Other-revision-jobs: Update sg-report-flight and -job-history Ian Jackson
2015-08-28 16:34 ` Ian Jackson [this message]
2015-08-28 16:34 ` [OSSTEST PATCH 6/6] Other-revision-jobs: Update cs-bisection-step Ian Jackson
2015-08-28 16:36 ` [OSSTEST PATCH 1/6] Other-revision-jobs: Provide central test 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=1440779641-22477-5-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@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).