xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org
Cc: Ian Campbell <ian.campbell@citrix.com>
Subject: [PATCH OSSTEST v3 6/6] sg-run-job: check for prerequisite builds when running build jobs
Date: Thu, 15 May 2014 11:30:39 +0100	[thread overview]
Message-ID: <1400149839-8489-6-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1400149787.4386.29.camel@kazak.uk.xensource.com>

For example build-$ARCH-libvirt depends on build-$ARCH for the Xen bits.
Performing this check early saves allocating, installing, preparating etc a
host just to find the prerequisite is missing.

Rename ts-xen-build-check to ts-build-check while we are there. The script
checks all prerequisite builds, not just Xen.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 sg-run-job         |  6 ++++--
 ts-build-check     | 37 +++++++++++++++++++++++++++++++++++++
 ts-xen-build-check | 37 -------------------------------------
 3 files changed, 41 insertions(+), 39 deletions(-)
 create mode 100755 ts-build-check
 delete mode 100755 ts-xen-build-check

diff --git a/sg-run-job b/sg-run-job
index 560fead..13f2c70 100755
--- a/sg-run-job
+++ b/sg-run-job
@@ -87,7 +87,7 @@ proc catching-otherwise {failst script} {
 }
 
 proc check-not-blocked {} {
-    run-ts blocked * ts-xen-build-check
+    run-ts blocked * ts-build-check
 }
 
 proc setstatus {st} {
@@ -327,7 +327,9 @@ proc run-job/build-libvirt {} {
 }
 
 proc prepare-build-host {} {
-    global jobinfo
+    global jobinfo ok
+    catching-otherwise blocked check-not-blocked
+    if {!$ok} return
     run-ts broken = ts-hosts-allocate + host
     run-ts broken host-install(*) ts-host-install-twice
     run-ts . host-build-prep ts-xen-build-prep
diff --git a/ts-build-check b/ts-build-check
new file mode 100755
index 0000000..0ae3be8
--- /dev/null
+++ b/ts-build-check
@@ -0,0 +1,37 @@
+#!/usr/bin/perl -w
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2009-2013 Citrix Inc.
+# 
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+# 
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use Osstest;
+use Osstest::TestSupport;
+
+tsreadconfig();
+
+die if @ARGV && $ARGV[0] =~ m/^-/;
+
+logm("checking builds ...");
+
+foreach my $k (sort keys %r) {
+    next unless $k =~ m/^(?:.*_)?([^_]*)buildjob$/;
+    my $part= $1;
+    my $path= "path_${part}dist";
+    logm("checking $k $path");
+    get_stashed($path, $r{$k});
+}
+
+logm("all ok.");
+
+exit 0;
diff --git a/ts-xen-build-check b/ts-xen-build-check
deleted file mode 100755
index 0ae3be8..0000000
--- a/ts-xen-build-check
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/perl -w
-# This is part of "osstest", an automated testing framework for Xen.
-# Copyright (C) 2009-2013 Citrix Inc.
-# 
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU Affero General Public License for more details.
-# 
-# You should have received a copy of the GNU Affero General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-use Osstest;
-use Osstest::TestSupport;
-
-tsreadconfig();
-
-die if @ARGV && $ARGV[0] =~ m/^-/;
-
-logm("checking builds ...");
-
-foreach my $k (sort keys %r) {
-    next unless $k =~ m/^(?:.*_)?([^_]*)buildjob$/;
-    my $part= $1;
-    my $path= "path_${part}dist";
-    logm("checking $k $path");
-    get_stashed($path, $r{$k});
-}
-
-logm("all ok.");
-
-exit 0;
-- 
1.9.0

  parent reply	other threads:[~2014-05-15 10:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-15 10:29 [PATCH OSSTEST v3 0/6] test mainline qemu and seabios branches Ian Campbell
2014-05-15 10:30 ` [PATCH OSSTEST v3 1/6] Add a flight to test qemu.org's ("mainline") master branch Ian Campbell
2014-05-16 17:16   ` Ian Jackson
2014-05-15 10:30 ` [PATCH OSSTEST v3 2/6] Add a flight to test seabios.org's " Ian Campbell
2014-05-16 17:17   ` Ian Jackson
2014-05-15 10:30 ` [PATCH OSSTEST v3 3/6] ts-xen-build: stash the Xen and SeaBIOS .config's Ian Campbell
2014-05-16 17:17   ` Ian Jackson
2014-05-15 10:30 ` [PATCH OSSTEST v3 4/6] ts-xen-build: Move Xen build tree from xen-unstable to just xen Ian Campbell
2014-05-16 17:17   ` Ian Jackson
2014-05-15 10:30 ` [PATCH OSSTEST v3 5/6] standalone: allow making a baseline flight Ian Campbell
2014-05-16 17:18   ` Ian Jackson
2014-05-15 10:30 ` Ian Campbell [this message]
2014-05-16 17:19   ` [PATCH OSSTEST v3 6/6] sg-run-job: check for prerequisite builds when running build jobs 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=1400149839-8489-6-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.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).