xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [OSSTEST PATCH 1/6] Other-revision-jobs: Provide central test
@ 2015-08-28 16:33 Ian Jackson
  2015-08-28 16:33 ` [OSSTEST PATCH 2/6] Other-revision-jobs: Update report__find_test Ian Jackson
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Ian Jackson @ 2015-08-28 16:33 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

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@eu.citrix.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-08-28 16:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [OSSTEST PATCH 5/6] Other-revision-jobs: Provide other_revision_job_suffix Ian Jackson
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

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).