diff mbox series

[v8,1/7] automation: ensure values in EXTRA_FIXED_RANDCONFIG are separated by new line

Message ID 8b6f208f0b4327392cfddbfa6809117cc7686750.1707499278.git.oleksii.kurochko@gmail.com (mailing list archive)
State Superseded
Headers show
Series Introduce generic headers | expand

Commit Message

Oleksii Feb. 9, 2024, 6 p.m. UTC
Kconfig tool expects each configuration to be on a new line.

The current version of the build script puts all of ${EXTRA_FIXED_RANDCONFIG}
in a single line and configs are seperated by spaces.

As a result, only the first configuration in ${EXTRA_FIXED_RANDCONFIG} will
be used.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
Changes in V8:
 - Nothing changed. Only rebase
---
Changes in V7:
 - Nothing changed. Only rebase
---
Changes in V6:
 - The patch was introduced in this version of patch series.
---
 automation/scripts/build | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Michal Orzel Feb. 12, 2024, 8:12 a.m. UTC | #1
Hi Oleksii,

On 09/02/2024 19:00, Oleksii Kurochko wrote:
> 
> 
> Kconfig tool expects each configuration to be on a new line.
> 
> The current version of the build script puts all of ${EXTRA_FIXED_RANDCONFIG}
> in a single line and configs are seperated by spaces.
> 
> As a result, only the first configuration in ${EXTRA_FIXED_RANDCONFIG} will
> be used.
There is no need for this patch. If you want the variables to be separated by new lines,
just use a '|' symbol after EXTRA_FIXED_RANDCONFIG (see all definitions of EXTRA_XEN_CONFIG).

~Michal
Oleksii Feb. 12, 2024, 9:41 a.m. UTC | #2
On Mon, 2024-02-12 at 09:12 +0100, Michal Orzel wrote:
> Hi Oleksii,
Hi Michal,

> 
> On 09/02/2024 19:00, Oleksii Kurochko wrote:
> > 
> > 
> > Kconfig tool expects each configuration to be on a new line.
> > 
> > The current version of the build script puts all of
> > ${EXTRA_FIXED_RANDCONFIG}
> > in a single line and configs are seperated by spaces.
> > 
> > As a result, only the first configuration in
> > ${EXTRA_FIXED_RANDCONFIG} will
> > be used.
> There is no need for this patch. If you want the variables to be
> separated by new lines,
> just use a '|' symbol after EXTRA_FIXED_RANDCONFIG (see all
> definitions of EXTRA_XEN_CONFIG).

Thanks a lot. I'll drop this path then.

~ Oleksii
diff mbox series

Patch

diff --git a/automation/scripts/build b/automation/scripts/build
index b3c71fb6fb..13b043923d 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -14,7 +14,7 @@  if [[ "${RANDCONFIG}" == "y" ]]; then
 
     # Append job-specific fixed configuration
     if [[ -n "${EXTRA_FIXED_RANDCONFIG}" ]]; then
-        echo "${EXTRA_FIXED_RANDCONFIG}" >> xen/tools/kconfig/allrandom.config
+        sed "s/ /\n/g" <<< "${EXTRA_FIXED_RANDCONFIG}" > xen/tools/kconfig/allrandom.config
     fi
 
     make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
@@ -28,9 +28,11 @@  else
     echo "CONFIG_DEBUG=${debug}" >> xen/.config
 
     if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then
-        echo "${EXTRA_XEN_CONFIG}" >> xen/.config
+        sed "s/ /\n/g" <<< "${EXTRA_XEN_CONFIG}" >> xen/.config
     fi
 
+    cat xen/.config
+
     make -j$(nproc) -C xen olddefconfig
 fi