]> xenbits.xensource.com Git - people/tklengyel/xen.git/commitdiff
automation: allow doing hypervisor only builds
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 3 Mar 2021 14:33:16 +0000 (15:33 +0100)
committerWei Liu <wl@xen.org>
Thu, 11 Mar 2021 15:39:37 +0000 (15:39 +0000)
For things like randconfig there's no need to do a full Xen build, a
hypervisor build only will be much faster and will achieve the same
level of testing, as randconfig only changes the hypervisor build
options.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
Acked-by: Doug Goldstein <cardoe@cardoe.com>
automation/scripts/build

index 87e44bb9408292ff954c25a58107ee487e3daa76..1b752edfe6c0693d69f1f89c3ccfac1f106df43e 100755 (executable)
@@ -11,6 +11,7 @@ cc-ver()
 # random config or default config
 if [[ "${RANDCONFIG}" == "y" ]]; then
     make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
+    hypervisor_only="y"
 else
     make -j$(nproc) -C xen defconfig
 fi
@@ -45,16 +46,27 @@ if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
     cfgargs+=("--with-system-seabios=/bin/false")
 fi
 
-./configure "${cfgargs[@]}"
-
-make -j$(nproc) dist
+if [[ "${hypervisor_only}" == "y" ]]; then
+    make -j$(nproc) xen
+else
+    ./configure "${cfgargs[@]}"
+    make -j$(nproc) dist
+fi
 
 # Extract artifacts to avoid getting rewritten by customised builds
 cp xen/.config xen-config
 mkdir binaries
 if [[ "${XEN_TARGET_ARCH}" != "x86_32" ]]; then
     cp xen/xen binaries/xen
-    cp -r dist binaries/
+    if [[ "${hypervisor_only}" != "y" ]]; then
+        cp -r dist binaries/
+    fi
+fi
+
+if [[ "${hypervisor_only}" == "y" ]]; then
+    # If we are build testing a specific Kconfig exit now, there's no point in
+    # testing all the possible configs.
+    exit 0
 fi
 
 # Build all the configs we care about