automation: Build Xen according to the type of the job
authorMichal Orzel <michal.orzel@amd.com>
Fri, 21 Oct 2022 13:22:38 +0000 (15:22 +0200)
committerStefano Stabellini <stefano.stabellini@amd.com>
Tue, 25 Oct 2022 22:41:30 +0000 (15:41 -0700)
All the build jobs exist in two flavors: debug and non-debug, where the
former sets 'debug' variable to 'y' and the latter to 'n'. This variable
is only being recognized by the toolstack, because Xen requires
enabling/disabling debug build via e.g. menuconfig/config file.
As a corollary, we end up building/testing Xen with CONFIG_DEBUG always
set to a default value ('y' for unstable and 'n' for stable branches),
regardless of the type of the build job.

Fix this behavior by setting CONFIG_DEBUG according to the 'debug' value.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
automation/scripts/build

index 8c0882f3aa3397afbc93b2e0cb5b2435cbb8ce63..a5934190634ba3de5aba1a6fc6c678a1dac745a0 100755 (executable)
@@ -21,12 +21,13 @@ if [[ "${RANDCONFIG}" == "y" ]]; then
     make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
     hypervisor_only="y"
 else
+    echo "CONFIG_DEBUG=${debug}" > xen/.config
+
     if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then
-        echo "${EXTRA_XEN_CONFIG}" > xen/.config
-        make -j$(nproc) -C xen olddefconfig
-    else
-        make -j$(nproc) -C xen defconfig
+        echo "${EXTRA_XEN_CONFIG}" >> xen/.config
     fi
+
+    make -j$(nproc) -C xen olddefconfig
 fi
 
 # Save the config file before building because build failure causes the script