All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Orzel <michal.orzel@amd.com>
To: <xen-devel@lists.xenproject.org>
Cc: Michal Orzel <michal.orzel@amd.com>,
	Doug Goldstein <cardoe@cardoe.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Henry Wang <Henry.Wang@arm.com>
Subject: [for-4.17] automation: Build Xen according to the type of the job
Date: Fri, 21 Oct 2022 15:22:38 +0200	[thread overview]
Message-ID: <20221021132238.16056-1-michal.orzel@amd.com> (raw)

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>
---
Xen used debug variable to control the build type before switching to Kconfig.
Support for GitLab CI was added later, which means that this issue was always
present. This is a low risk for 4.17 with a benefit of being able to test Xen
in both debug and non-debug versions.
---
 automation/scripts/build | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index 8c0882f3aa33..a5934190634b 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -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
-- 
2.25.1



             reply	other threads:[~2022-10-21 13:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 13:22 Michal Orzel [this message]
2022-10-21 13:31 ` [for-4.17] automation: Build Xen according to the type of the job Andrew Cooper
2022-10-21 14:32   ` Michal Orzel
2022-10-21 16:20     ` Michal Orzel
2022-10-21 13:46 ` Henry Wang
2022-10-21 19:08 ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221021132238.16056-1-michal.orzel@amd.com \
    --to=michal.orzel@amd.com \
    --cc=Henry.Wang@arm.com \
    --cc=cardoe@cardoe.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.