From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH OSSTEST v3 06/11] ts-xen-build: build with XSM support if requested Date: Wed, 10 Dec 2014 13:47:40 +0000 Message-ID: <20141210134740.GD19059@zion.uk.xensource.com> References: <1413323416-21778-1-git-send-email-wei.liu2@citrix.com> <1413323416-21778-7-git-send-email-wei.liu2@citrix.com> <1418216722.3505.35.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1418216722.3505.35.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: ian.jackson@eu.citrix.com, Wei Liu , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Dec 10, 2014 at 01:05:22PM +0000, Ian Campbell wrote: > On Tue, 2014-10-14 at 22:50 +0100, Wei Liu wrote: > > Signed-off-by: Wei Liu > > Looks like Ian J acked v2 in > <21559.64364.468553.506173@mariner.uk.xensource.com>. > > > > --- > > ts-xen-build | 12 ++++++++++++ > > 1 file changed, 12 insertions(+) > > > > diff --git a/ts-xen-build b/ts-xen-build > > index 661f186..390c114 100755 > > --- a/ts-xen-build > > +++ b/ts-xen-build > > @@ -27,6 +27,8 @@ tsreadconfig(); > > selectbuildhost(\@ARGV); > > # remaining arguments are passed as targets to "make" > > builddirsprops(); > > + > > +my $enable_xsm = $r{enable_xsm} =~ m/y/ ? 1 : 0; > > Existing boolean runvars (enable_ovmf, enable_xend) appear to use > true/false (which still need laundering into Perl booleans). Using y/n > made sense when you were poking it straight into XSM_ENABLE, but if you > are going to have to translate it there anyway (into $build_xsm) you may > as well go for consistency. > I tried to be consistent with next path (the "n y" one, eh). I'm OK with changing them to true, false though. > > > > 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 > > @@ -47,6 +50,7 @@ sub checkout () { > > cd $builddir/xen > > >.config > > echo >>.config debug=$debug_build > > + echo >>.config XSM_ENABLE=$build_xsm > > echo >>.config GIT_HTTP=y > > echo >>.config LIBLEAFDIR_x86_64=lib > > echo >>.config QEMU_REMOTE='$r{tree_qemu}' > > @@ -114,6 +118,14 @@ END > > buildcmd_stamped_logged(9000, 'build', '',< > $make_prefix make $makeflags @ARGV > > END > > + > > + if ($enable_xsm) { > > + my $xen_version = target_cmd_output_root($ho, < > + cd $builddir/xen > > + $make_prefix make xenversion > > +END > > + store_runvar("flaskpolicy", "xenpolicy-" . $xen_version); > > + } > > } > > > > sub collectversions () { >