[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.8] Makefile: Provide way to ship livepatch test files



commit fe5bbfda641a5491f29144713a9870bc8a52f52a
Author:     Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
AuthorDate: Wed Jun 7 15:05:44 2017 +0100
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Jun 19 11:36:09 2017 +0100

    Makefile: Provide way to ship livepatch test files
    
    In the toplevel Makefile, provide build-tests and install-tests
    targets which descend into xen/test.  (dist-tests is provided
    automatically by the pattern rule, as is the convention here.)
    
    We have to set BASEDIR ourselves, and use these curious runes, because
    the convention in Makefiles under xen/ is to "make -f Rules.mk" with
    BASEDIR set and to expect Rules.mk to reinvoke the per-directory
    Makefile.  (This is really very strange.)  Normally this invocation
    pattern is organised by the machinery in xen/Makefile (which sets
    BASEDIR) and Rules.mk, but we need to invoke it from outside that
    context.
    
    In theory it would be nice to have a pattern rule %-tests.  But this
    is not the style in the rest of the toplevel Makefile; and doing that
    might interfere with the dist-% pattern rule.
    
    None of this is invoked by default.  If install-tests or dist-tests is
    requested, the livepatches (the only current output from xen/tests)
    are shipped in DESTDIR/usr/lib/debug/xen-livepatch/.
    
    This allows CI systems such as osstest which are trying to consume
    this to arrange for the files to be built, and output, without them
    having to have special knowledge of the details of Xen's build system.
    
    Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Release-acked-by: Julien Grall <julien.grall@xxxxxxx>
    (cherry picked from commit c55667bd0ad8f04688abfd5c6317709dc00f88ab)
    (cherry picked from commit 2fb72b56bf0423e4b625cebc40e2dc7ea7734986)
---
 Makefile | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Makefile b/Makefile
index a8e9523..1ca9c5d 100644
--- a/Makefile
+++ b/Makefile
@@ -119,6 +119,17 @@ tools/firmware/ovmf-dir-force-update:
 install-docs:
        $(MAKE) -C docs install
 
+# We only have build-tests install-tests, not uninstall-tests etc.
+.PHONY: build-tests
+build-tests: build-xen
+       export BASEDIR=$(XEN_ROOT)/xen; \
+       $(MAKE) -f $$BASEDIR/Rules.mk -C xen/test build
+
+.PHONY: install-tests
+install-tests: install-xen
+       export BASEDIR=$(XEN_ROOT)/xen; \
+       $(MAKE) -f $$BASEDIR/Rules.mk -C xen/test install
+
 # build xen and the tools and place them in the install
 # directory. 'make install' should then copy them to the normal system
 # directories
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.8

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.