]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
automation: allow doing hypervisor only builds randconfig.1 gitlab/randconfig.1
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 3 Mar 2021 12:09:48 +0000 (13:09 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Wed, 3 Mar 2021 12:21:48 +0000 (13:21 +0100)
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>
---
I think it might be good to get this in ASAP in order to reduce the
load of the gitlab CI loop.

Release wise the worse that could happen is that gitlab testing is
broken by this, but I've already done a run myself:

automation/scripts/build

index 87e44bb9408292ff954c25a58107ee487e3daa76..9b79a0ef7ba8b6301f3ca8c9938536cbfeb249e4 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
@@ -47,7 +48,11 @@ fi
 
 ./configure "${cfgargs[@]}"
 
-make -j$(nproc) dist
+if [[ "${hypervisor_only}" == "y" ]]; then
+    make -j$(nproc) xen
+else
+    make -j$(nproc) dist
+fi
 
 # Extract artifacts to avoid getting rewritten by customised builds
 cp xen/.config xen-config
@@ -57,6 +62,12 @@ if [[ "${XEN_TARGET_ARCH}" != "x86_32" ]]; then
     cp -r dist binaries/
 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
 case ${XEN_TARGET_ARCH} in
     x86_64) arch=x86 ;;