Skip to content

Commit

Permalink
automation: allow doing hypervisor only builds
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
royger authored and liuw committed Mar 11, 2021
1 parent 935e083 commit 893103e
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions automation/scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 893103e

Please sign in to comment.