From: Roger Pau Monne <roger.pau@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Roger Pau Monne <roger.pau@citrix.com>,
Doug Goldstein <cardoe@cardoe.com>,
Jan Beulich <jbeulich@suse.com>
Subject: [PATCH] automation: add a build job with NR_CPUS == 1
Date: Wed, 3 Mar 2021 09:33:18 +0100 [thread overview]
Message-ID: <20210303083318.9363-1-roger.pau@citrix.com> (raw)
This requires adding some logic in the build script in order to be
able to pass specific Xen Kconfig options.
Setting any CONFIG_* environment variable when executing the build
script will set such variable in the empty .config file before
running the olddefconfig target. The .config file is also checked
afterwards to assert the option has not been lost as part of the
configuration process.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
---
Not sure whether there's some easiest way to force a config option to
a set value from the command line.
---
automation/gitlab-ci/build.yaml | 12 ++++++++++++
automation/scripts/build | 16 ++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index d00b8a5123..06d943de83 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -308,6 +308,18 @@ debian-unstable-gcc-debug-randconfig:
CONTAINER: debian:unstable
RANDCONFIG: y
+debian-unstable-gcc-nrcpus1:
+ extends: .gcc-x86-64-build
+ variables:
+ CONTAINER: debian:unstable
+ CONFIG_NR_CPUS: 1
+
+debian-unstable-gcc-debug-nrcpus1:
+ extends: .gcc-x86-64-build-debug
+ variables:
+ CONTAINER: debian:unstable
+ CONFIG_NR_CPUS: 1
+
debian-unstable-32-clang:
extends: .clang-x86-32-build
variables:
diff --git a/automation/scripts/build b/automation/scripts/build
index 87e44bb940..4c331b6b57 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -11,6 +11,22 @@ cc-ver()
# random config or default config
if [[ "${RANDCONFIG}" == "y" ]]; then
make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
+elif [[ "${!CONFIG_@}" != "" ]]; then
+ for config in "${!CONFIG_@}"; do
+ printf '%s=%s\n' "$config" "${!config}" >> xen/.config
+ done
+ make -j$(nproc) -C xen olddefconfig
+ for config in "${!CONFIG_@}"; do
+ if [[ "${!config}" != "n" ]]; then
+ option=$(printf '%s=%s' "$config" "${!config}")
+ else
+ option=$(printf '# %s is not set' "$config")
+ fi
+ if ! grep -q "^${option}$" xen/.config; then
+ echo "Failed to set ${config} in Kconfig"
+ exit 1;
+ fi
+ done
else
make -j$(nproc) -C xen defconfig
fi
--
2.30.1
next reply other threads:[~2021-03-03 8:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 8:33 Roger Pau Monne [this message]
2021-03-03 11:46 ` [PATCH] automation: add a build job with NR_CPUS == 1 Andrew Cooper
2021-03-03 11:57 ` Roger Pau Monné
2021-03-03 12:00 ` Andrew Cooper
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=20210303083318.9363-1-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=cardoe@cardoe.com \
--cc=jbeulich@suse.com \
--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.