|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 5/6] Other-revision-jobs: Provide other_revision_job_suffix
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@xxxxxxxxxxxxx>
---
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |