]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
ts-xen-build: build with XSM support if requested
authorWei Liu <wei.liu2@citrix.com>
Mon, 8 Sep 2014 15:06:52 +0000 (16:06 +0100)
committerWei Liu <wei.liu2@citrix.com>
Fri, 27 Feb 2015 11:58:26 +0000 (11:58 +0000)
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes in v14:
1. Use target_cmd_output instead of target_cmd_output_root.

Changes in v5:
1. Only set XSM_ENABLE when runvar is defined.
2. Fix inconsistent whitespace.

Changes in v4:
1. Use "true" instead of "y"

ts-xen-build

index 370bfbc27ae610acff1a3cdf64ab9cbd1d3be0dc..b61b4cacc19ce5d6d97206e9a472c534b6564861 100755 (executable)
@@ -27,6 +27,8 @@ tsreadconfig();
 selectbuildhost(\@ARGV);
 # remaining arguments are passed as targets to "make"
 builddirsprops();
+
+my $enable_xsm = $r{enable_xsm} =~ m/true/ ? 1 : 0;
     
 sub checkout () {
     prepbuilddirs();
@@ -34,6 +36,7 @@ sub checkout () {
     build_clone($ho, 'xen', $builddir, 'xen');
 
     my $debug_build = $r{xen_build_debug} || 'y';
+    my $build_xsm = $enable_xsm ? 'y' : 'n';
 
     # Do not set this unless you know what you are doing. This arm
     # option makes the build specific to a particular type of
@@ -51,6 +54,9 @@ sub checkout () {
        echo >>.config LIBLEAFDIR_x86_64=lib
        echo >>.config QEMU_REMOTE='$r{tree_qemu}'
        echo >>.config KERNELS=''
+END
+               (nonempty($r{enable_xsm}) ? <<END : '').
+       echo >>.config XSM_ENABLE='${build_xsm}'
 END
                (nonempty($r{revision_qemu}) ? <<END : '').
        echo >>.config QEMU_TAG='$r{revision_qemu}'
@@ -120,6 +126,14 @@ END
     buildcmd_stamped_logged(9000, 'build', '',<<END,'');
             $make_prefix make $makeflags @ARGV
 END
+
+    if ($enable_xsm) {
+       my $xen_version = target_cmd_output($ho, <<END, 30);
+           cd $builddir/xen
+           $make_prefix make xenversion
+END
+       store_runvar("flaskpolicy", "xenpolicy-" . $xen_version);
+    }
 }
 
 sub collectversions () {