Skip to contentSkip to conversation

OSSTEST: introduce a raisin build test

PATCH Superseded Stefano Stabellini 1 participant 1 message Jun 18, 2015

v6 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 OSSTEST: introduce a raisin build test

---

Changes in v6:
- move divide to Osstest/BuildSupport.pm and rename it to divide_xen_build; use divide_xen_build in ts-raisin-build and ts-xen-build.

Changes in v5:
- remove setting DEFAULT_REVISION_RAISIN to master
- disable raisin when branch is not xen*
- do not overwrite raisin default variables unless both revision_* and tree_* are set of a given component

Changes in v4:
- introduce enable_raisin in mfi-common: only build raisin when building xen-unstable
- start off from the default raisin config, then append osstest config options to it
- do not write variable to the raisin config if the conrresponding runvar is not set
- remove TREE_OVMF and TREE_SEABIOS

Changes in v3:
- use $raisindir throughout ts-raisin-build
- do not specify ENABLED_COMPONENTS so that empty REVISION variables can be used to disable building a raisin component

Changes in v2:
- set revision_* variables in mfi-common;
- in ts-raisin-build set the *_REVISION config options based on the revision_* variables;
- in ts-raisin-build, call store_revision appropriately;
- divide the output in an hypervisor and a tools tarball.

---
 Osstest/BuildSupport.pm |   48 +++++++++++++++++
 ap-common               |    2 +
 mfi-common              |   41 +++++++++++++++
 sg-run-job              |    5 ++
 ts-raisin-build         |  133 +++++++++++++++++++++++++++++++++++++++++++++++
 ts-xen-build            |   44 +---------------
 6 files changed, 231 insertions(+), 42 deletions(-)
 create mode 100755 ts-raisin-build
Osstest/BuildSupport.pm +48 -0
index 933f6e1..76a3feb 100644
@@ -43,6 +43,10 @@ BEGIN {
                       xendist
                       $xendist
 
+                      divide_xen_build
+                      trapping
+                      die_if_fail
+
                       submodulefixup submodule_have submodule_find
 
                       );
@@ -84,6 +88,50 @@ sub xendist () {
 	($ho, 'xendist', '', $r{"buildjob"});
 }
 
+sub divide_xen_build ($$) {
+    my ($subdir, $postfix) = @_;
+    # Only move hv to xeninstall, so that we can have
+    # xenpolicy in tools tarball.
+    #
+    # The files inside boot/ after `make dist' are
+    # xen-$XEN_VERSION: Xen binary
+    # xen.gz/xen: symlink to xen-$XEN_VERSION
+    # xen-$MAJOR: symlink to xen-$XEN_VERSION
+    # xen-$MAJOR.$MINOR: symlink to xen-$XEN_VERSION
+    # xen-sym-$XEN_VERSION: Xen symbol
+    # xenpolicy-$XEN_VERSION: flask policy binary if xsm is enabled
+    #
+    # So the following snippet will leave xenpolicy* in
+    # install/boot and get packaged to tools tarball.
+    target_cmd_build($ho, 100, $builddir, <<END);
+        cd $subdir
+        mkdir xen$postfix
+        for f in *$postfix; do
+            mkdir -p \$f/lib
+        done
+        if test -d $postfix/boot; then
+            if test -f $postfix/boot/xen.gz || test -f $postfix/boot/xen; then
+                mkdir xen$postfix/boot
+                mvfiles=`find $postfix/boot -name 'xen[a-z]*' -prune -o -name 'xen*' -print`
+                mv \$mvfiles xen$postfix/boot/.
+            fi
+        fi
+END
+}
+
+our @probs;
+
+sub trapping ($) {
+    my ($sub) = @_;
+    my $tok= eval { $sub->(); 1; };
+    if (!$tok) { push @probs, $@; print STDERR "failure (trapped): $@\n"; }
+}
+
+sub die_if_fail () {
+    die "*** something failed:\n\n".(join "\n\n",@probs)."\n** something failed"
+        if @probs;
+}
+
 #----- submodules -----
 
 sub submodulefixup ($$$$) {
ap-common +2 -0
index 64749e3..60eaf66 100644
@@ -47,6 +47,8 @@
 # rumpsrc-related runvars needed only for old rumpuser-xen
 # (ie ones which need $bodges=1 in ts-rumpuserxen-build)
 
+: ${TREE_RAISIN:=git://xenbits.xen.org/people/sstabellini/raisin.git}
+
 : ${TREE_SEABIOS_UPSTREAM:=git://git.seabios.org/seabios.git}
 : ${PUSH_TREE_SEABIOS:=$XENBITS:/home/xen/git/osstest/seabios.git}
 : ${BASE_TREE_SEABIOS:=git://xenbits.xen.org/osstest/seabios.git}
mfi-common +41 -0

53 lines not on this page · raw message

sg-run-job +5 -0
index eae159d..449118d 100755
@@ -346,6 +346,7 @@ proc need-hosts/build {} { return BUILD }
 proc need-hosts/build-kern {} { return BUILD }
 proc need-hosts/build-libvirt {} { return BUILD }
 proc need-hosts/build-rumpuserxen {} { return BUILD }
+proc need-hosts/build-raisin {} { return BUILD }
 
 proc run-job/build {} {
     run-ts . = ts-xen-build
@@ -364,6 +365,10 @@ proc run-job/build-rumpuserxen {} {
     run-ts . = ts-xen-build + host tools
 }
 
+proc run-job/build-raisin {} {
+    run-ts . = ts-raisin-build
+}
+
 proc prepare-build-host {} {
     global jobinfo
     run-ts broken = ts-hosts-allocate + host
ts-raisin-build new file +133 -0

133 lines not on this page · raw message

ts-xen-build +2 -42

60 lines not on this page · raw message

Signature · 1 line
1.7.10.4