[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] automation: add a build job with NR_CPUS == 1


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 3 Mar 2021 09:33:18 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DA0FWokpjYq037HIImyhagSWwTj4PIDror+eKAb0YL4=; b=O+jDyfSt7lznZ7BjcbzGduKojIaw76RdQnNLLprmTTDoVmIYmSgZUu5f6ERvfPZipDLaPtWPgZ6sy6/yEjeVA/Tgq9kqaxlFnIdaMfisIsa0ELCmfkPggpwLjwFkitKQ/ma27wycismhnjYOoV70JcZ2gWIoN4fX1CNDawiCdIqFHDYTeFUiW+gqTgwOhK7uSPS8hqTpIliKEgzNeKqzjspbs//tywm6x+11hZSEAUpjaWcCyqgyEgDLVzC1RN1Yd4FFhQely6NWWQB0QdX8yfa3rrHpVnMc7fsSF/dKC6FsDLI2dFjH3VhSRBEOfEUR2XuLkRwKbdLT9eREZRdI2Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lQa6jiXsm9pRE9JVyqfRHn8h/Gzlr7svu1ugWSfGmYO9Yq7uF2QNzd+g4Ye0miNSzo/mfcXjaDkoaEvYYjbHzGbN80mZba5Qsn8N0MIwgg5Cq8TRHpXopa/w+LGQjiMSfpq5mgQvsHwCi/fSiF1LdQZT7wrLSPnZi6ZBLcKrYzrJG8PXdumda1kTZr0Koa+/nr6RuOjg5VDUiJPuavSyg0xrsFXowexb4acAXGqazW1ntrZOmvGYNz2gf+Q3h1kzyIkcuAAAd/V52eZYdPqSllj8Z6DR2gt2RtfCsi51NPlVVYUD8hqXmRx+rQA8Ep0DPKGsQZYzPtOn+0QKaKmwnw==
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Wed, 03 Mar 2021 08:33:47 +0000
  • Ironport-sdr: UIghFGS46+V3BwI8nW8Sa5f3Rj8ORxCzRTSJsa2MsSVWw76JopwI+VWy/BZZNXuVEIVTjsCkqJ vV5BRI+7btqWQvfbnJH0igtKLtPNRp68frkDXYWypUmx0Ubq2hIIwbj7NMcoVZipPvE9/mrcnG e4tUsFpg8pITLwOepvyxkWl7gMzvYzM/rAgifylxz5zLi7TUZoxZPjXgIYTDmafn8BCVqk3OLQ A9y3/AXQxW598JwWhJAQJUUJdP07N1eCLMv74YzcHcpbIYQxNNgY1bVljwsSlFxHfi7f6WXCNA ky4=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---
Cc: Jan Beulich <jbeulich@xxxxxxxx>
---
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




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.