]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
automation: add a build job with NR_CPUS == 1
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 2 Mar 2021 08:41:00 +0000 (09:41 +0100)
committerRoger Pau Monne <roger.pau@citrix.com>
Tue, 2 Mar 2021 09:26:11 +0000 (10:26 +0100)
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
automation/gitlab-ci/build.yaml
automation/scripts/build

index d00b8a512311ace43ba9ea5bc79a8a728f152d94..06d943de83f403cff70df7ed9fde9f4ef550c858 100644 (file)
@@ -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:
index 87e44bb9408292ff954c25a58107ee487e3daa76..4c331b6b579c76d98e49ea6856a5b8457c3f019a 100755 (executable)
@@ -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