[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 1/6] Other-revision-jobs: Provide central test



Since 75fbbc19 "Arrange to test migration from the previous Xen
version", some flights have contained additional jobs build-*-prev,
which build a different revision of xen.git.

However, this violates an existing assumption in several of the
automatic archaeologists, namely that a flight should contain only
runvars referring to a single revision of a tree.

We will need to adjust all the places where this assumption is baked
in.  The question arises, as to how the code in general is supposed to
know.  There are many possible schemes, but almost all of them would
involve some kind of schema change and/or would be violated by
now-recorded history.

For now we adopt the following rule: the job name tells you.  That is,
revision runvars in jobs with certain job names are disregarded.  We
call non-disregarded jobs `main-revision jobs', since they use the
`main' revisions of everything, and others `other-revision jobs'.

We provide a single function in Osstest.pm which takes as argument a
SQL expression string representing a job name, and returns a SQL
expression string evaluating to a boolean, specifying whether the job
is a main revision job.  This can be used in queries.

In subsequent patches I will go through all plausibly-relevant output
from
  git-grep 'revision_\|revision\\\\_'
and update each piece in turn.

There are obviously-irrelevant hits in TestSupport (build_clone and
store_vcs_revision) and in BuildSupport.

Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 Osstest.pm |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Osstest.pm b/Osstest.pm
index 8f97dd2..55e1aa1 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -35,6 +35,7 @@ BEGIN {
                       getmethod
                       postfork
                       flight_otherjob
+                      main_revision_job_cond
                       $dbh_tests db_retry db_retry_retry db_retry_abort
                       db_begin_work db_prepare
                       ensuredir get_filecontents_core_quiet system_checked
@@ -317,6 +318,11 @@ sub flight_otherjob ($$) {
            die "$otherflightjob ?";
 }
 
+sub main_revision_job_cond ($) {
+    my ($jobfield) = @_;
+    return "(($jobfield) NOT LIKE 'build-%-prev')";
+}
+
 sub get_filecontents_core_quiet ($) { # ENOENT => undef
     my ($path) = @_;
     if (!open GFC, '<', $path) {
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.