diff mbox series

[v3,13/23] travis/gitlab/azure: Use --board buildman flag with test.py

Message ID 20200318154302.16389-10-sjg@chromium.org
State New
Headers show
Series gitlab: Simplify the test script | expand

Commit Message

Simon Glass March 18, 2020, 3:42 p.m. UTC
The current method of selecting the board to build with test.py is a bit
error-prone, e.g. with "^sandbox$" it actually builds 5 boards (all of
those in the sandbox architecture).

Use the (newish) --board flag instead, to get the same result.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v3: None
Changes in v2:
- Update travis, azure also

 .azure-pipelines.yml | 46 ++++++++++++++++++++---------------------
 .gitlab-ci.yml       | 47 +++++++++++++++++++++---------------------
 .travis.yml          | 49 ++++++++++++++++++++++----------------------
 3 files changed, 72 insertions(+), 70 deletions(-)

Comments

Tom Rini March 23, 2020, 1:13 p.m. UTC | #1
On Wed, Mar 18, 2020 at 09:42:51AM -0600, Simon Glass wrote:

> The current method of selecting the board to build with test.py is a bit
> error-prone, e.g. with "^sandbox$" it actually builds 5 boards (all of
> those in the sandbox architecture).
> 
> Use the (newish) --board flag instead, to get the same result.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Tom Rini <trini at konsulko.com>
diff mbox series

Patch

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 182482a93a..8092545642 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -158,90 +158,90 @@  jobs:
       matrix:
         sandbox:
           TEST_PY_BD: "sandbox"
-          BUILDMAN: "^sandbox$"
+          BUILDMAN: "sandbox"
         sandbox_clang:
           TEST_PY_BD: "sandbox"
-          BUILDMAN: "^sandbox$"
+          BUILDMAN: "sandbox"
           OVERRIDE: "-O clang-7"
         sandbox_spl:
           TEST_PY_BD: "sandbox_spl"
           TEST_PY_TEST_SPEC: "test_ofplatdata"
-          BUILDMAN: "^sandbox_spl$"
+          BUILDMAN: "sandbox_spl"
         sandbox_flattree:
           TEST_PY_BD: "sandbox_flattree"
-          BUILDMAN: "^sandbox_flattree$"
+          BUILDMAN: "sandbox_flattree"
         evb_ast2500:
           TEST_PY_BD: "evb-ast2500"
           TEST_PY_ID: "--id qemu"
-          BUILDMAN: "^evb-ast2500$"
+          BUILDMAN: "evb-ast2500"
         vexpress_ca15_tc2:
           TEST_PY_BD: "vexpress_ca15_tc2"
           TEST_PY_ID: "--id qemu"
-          BUILDMAN: "^vexpress_ca15_tc2$"
+          BUILDMAN: "vexpress_ca15_tc2"
         vexpress_ca9x4:
           TEST_PY_BD: "vexpress_ca9x4"
           TEST_PY_ID: "--id qemu"
-          BUILDMAN: "^vexpress_ca9x4$"
+          BUILDMAN: "vexpress_ca9x4"
         integratorcp_cm926ejs:
           TEST_PY_BD: "integratorcp_cm926ejs"
           TEST_PY_ID: "--id qemu"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^integratorcp_cm926ejs$"
+          BUILDMAN: "integratorcp_cm926ejs"
         qemu_arm:
           TEST_PY_BD: "qemu_arm"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu_arm$"
+          BUILDMAN: "qemu_arm"
         qemu_arm64:
           TEST_PY_BD: "qemu_arm64"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu_arm64$"
+          BUILDMAN: "qemu_arm64"
         qemu_mips:
           TEST_PY_BD: "qemu_mips"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu_mips$"
+          BUILDMAN: "qemu_mips"
         qemu_mipsel:
           TEST_PY_BD: "qemu_mipsel"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu_mipsel$"
+          BUILDMAN: "qemu_mipsel"
         qemu_mips64:
           TEST_PY_BD: "qemu_mips64"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu_mips64$"
+          BUILDMAN: "qemu_mips64"
         qemu_mips64el:
           TEST_PY_BD: "qemu_mips64el"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu_mips64el$"
+          BUILDMAN: "qemu_mips64el"
         qemu_ppce500:
           TEST_PY_BD: "qemu-ppce500"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu-ppce500$"
+          BUILDMAN: "qemu-ppce500"
         qemu_riscv64:
           TEST_PY_BD: "qemu-riscv64"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu-riscv64$"
+          BUILDMAN: "qemu-riscv64"
         qemu_x86:
           TEST_PY_BD: "qemu-x86"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu-x86$"
+          BUILDMAN: "qemu-x86"
         qemu_x86_64:
           TEST_PY_BD: "qemu-x86_64"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^qemu-x86_64$"
+          BUILDMAN: "qemu-x86_64"
         zynq_zc702:
           TEST_PY_BD: "zynq_zc702"
           TEST_PY_ID: "--id qemu"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^zynq_zc702$"
+          BUILDMAN: "zynq_zc702"
         xilinx_versal_virt:
           TEST_PY_BD: "xilinx_versal_virt"
           TEST_PY_ID: "--id qemu"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^xilinx_versal_virt$"
+          BUILDMAN: "xilinx_versal_virt"
         xtfpga:
           TEST_PY_BD: "xtfpga"
           TEST_PY_ID: "--id qemu"
           TEST_PY_TEST_SPEC: "not sleep"
-          BUILDMAN: "^xtfpga$"
+          BUILDMAN: "xtfpga"
     steps:
       - script: |
           cat << EOF > test.sh
@@ -269,9 +269,9 @@  jobs:
           cd ${WORK_DIR}
           if [[ "${BUILDMAN}" != "" ]]; then
               ret=0;
-              tools/buildman/buildman -o /tmp -P -E ${BUILDMAN} ${OVERRIDE} || ret=$?;
+              tools/buildman/buildman -o /tmp -P -E --board ${BUILDMAN} ${OVERRIDE} || ret=$?;
               if [[ $ret -ne 0 && $ret -ne 129 ]]; then
-                  tools/buildman/buildman -o /tmp -sdeP ${BUILDMAN};
+                  tools/buildman/buildman -o /tmp -sdeP --board ${BUILDMAN};
                   exit $ret;
               fi;
           fi
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 248e0530d2..3f48cad752 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -31,9 +31,10 @@  stages:
     # use clang only do one configuration.
     - if [[ "${BUILDMAN}" != "" ]]; then
         ret=0;
-        tools/buildman/buildman -o /tmp -P -E ${BUILDMAN} ${OVERRIDE}|| ret=$?;
+        tools/buildman/buildman -o /tmp -P -E --board ${BUILDMAN} ${OVERRIDE}
+          || ret=$?;
         if [[ $ret -ne 0 && $ret -ne 129 ]]; then
-          tools/buildman/buildman -o /tmp -sdeP ${BUILDMAN};
+          tools/buildman/buildman -o /tmp -sdeP --board ${BUILDMAN};
           exit $ret;
         fi;
       fi
@@ -181,14 +182,14 @@  sandbox test.py:
   tags: [ 'all' ]
   variables:
     TEST_PY_BD: "sandbox"
-    BUILDMAN: "^sandbox$"
+    BUILDMAN: "sandbox"
   <<: *buildman_and_testpy_dfn
 
 sandbox with clang test.py:
   tags: [ 'all' ]
   variables:
     TEST_PY_BD: "sandbox"
-    BUILDMAN: "^sandbox$"
+    BUILDMAN: "sandbox"
     OVERRIDE: "-O clang-7"
   <<: *buildman_and_testpy_dfn
 
@@ -196,7 +197,7 @@  sandbox_spl test.py:
   tags: [ 'all' ]
   variables:
     TEST_PY_BD: "sandbox_spl"
-    BUILDMAN: "^sandbox_spl$"
+    BUILDMAN: "sandbox_spl"
     TEST_PY_TEST_SPEC: "test_ofplatdata"
   <<: *buildman_and_testpy_dfn
 
@@ -205,14 +206,14 @@  evb-ast2500 test.py:
   variables:
     TEST_PY_BD: "evb-ast2500"
     TEST_PY_ID: "--id qemu"
-    BUILDMAN: "^evb-ast2500$"
+    BUILDMAN: "evb-ast2500"
   <<: *buildman_and_testpy_dfn
 
 sandbox_flattree test.py:
   tags: [ 'all' ]
   variables:
     TEST_PY_BD: "sandbox_flattree"
-    BUILDMAN: "^sandbox_flattree$"
+    BUILDMAN: "sandbox_flattree"
   <<: *buildman_and_testpy_dfn
 
 vexpress_ca15_tc2 test.py:
@@ -220,7 +221,7 @@  vexpress_ca15_tc2 test.py:
   variables:
     TEST_PY_BD: "vexpress_ca15_tc2"
     TEST_PY_ID: "--id qemu"
-    BUILDMAN: "^vexpress_ca15_tc2$"
+    BUILDMAN: "vexpress_ca15_tc2"
   <<: *buildman_and_testpy_dfn
 
 vexpress_ca9x4 test.py:
@@ -228,7 +229,7 @@  vexpress_ca9x4 test.py:
   variables:
     TEST_PY_BD: "vexpress_ca9x4"
     TEST_PY_ID: "--id qemu"
-    BUILDMAN: "^vexpress_ca9x4$"
+    BUILDMAN: "vexpress_ca9x4"
   <<: *buildman_and_testpy_dfn
 
 integratorcp_cm926ejs test.py:
@@ -237,7 +238,7 @@  integratorcp_cm926ejs test.py:
     TEST_PY_BD: "integratorcp_cm926ejs"
     TEST_PY_TEST_SPEC: "not sleep"
     TEST_PY_ID: "--id qemu"
-    BUILDMAN: "^integratorcp_cm926ejs$"
+    BUILDMAN: "integratorcp_cm926ejs"
   <<: *buildman_and_testpy_dfn
 
 qemu_arm test.py:
@@ -245,7 +246,7 @@  qemu_arm test.py:
   variables:
     TEST_PY_BD: "qemu_arm"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu_arm$"
+    BUILDMAN: "qemu_arm"
   <<: *buildman_and_testpy_dfn
 
 qemu_arm64 test.py:
@@ -253,7 +254,7 @@  qemu_arm64 test.py:
   variables:
     TEST_PY_BD: "qemu_arm64"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu_arm64$"
+    BUILDMAN: "qemu_arm64"
   <<: *buildman_and_testpy_dfn
 
 qemu_mips test.py:
@@ -261,7 +262,7 @@  qemu_mips test.py:
   variables:
     TEST_PY_BD: "qemu_mips"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu_mips$"
+    BUILDMAN: "qemu_mips"
   <<: *buildman_and_testpy_dfn
 
 qemu_mipsel test.py:
@@ -269,7 +270,7 @@  qemu_mipsel test.py:
   variables:
     TEST_PY_BD: "qemu_mipsel"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu_mipsel$"
+    BUILDMAN: "qemu_mipsel"
   <<: *buildman_and_testpy_dfn
 
 qemu_mips64 test.py:
@@ -277,7 +278,7 @@  qemu_mips64 test.py:
   variables:
     TEST_PY_BD: "qemu_mips64"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu_mips64$"
+    BUILDMAN: "qemu_mips64"
   <<: *buildman_and_testpy_dfn
 
 qemu_mips64el test.py:
@@ -285,7 +286,7 @@  qemu_mips64el test.py:
   variables:
     TEST_PY_BD: "qemu_mips64el"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu_mips64el$"
+    BUILDMAN: "qemu_mips64el"
   <<: *buildman_and_testpy_dfn
 
 qemu-ppce500 test.py:
@@ -293,7 +294,7 @@  qemu-ppce500 test.py:
   variables:
     TEST_PY_BD: "qemu-ppce500"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu-ppce500$"
+    BUILDMAN: "qemu-ppce500"
   <<: *buildman_and_testpy_dfn
 
 qemu-riscv64 test.py:
@@ -301,7 +302,7 @@  qemu-riscv64 test.py:
   variables:
     TEST_PY_BD: "qemu-riscv64"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu-riscv64$"
+    BUILDMAN: "qemu-riscv64"
   <<: *buildman_and_testpy_dfn
 
 qemu-x86 test.py:
@@ -309,7 +310,7 @@  qemu-x86 test.py:
   variables:
     TEST_PY_BD: "qemu-x86"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu-x86$"
+    BUILDMAN: "qemu-x86"
   <<: *buildman_and_testpy_dfn
 
 qemu-x86_64 test.py:
@@ -317,7 +318,7 @@  qemu-x86_64 test.py:
   variables:
     TEST_PY_BD: "qemu-x86_64"
     TEST_PY_TEST_SPEC: "not sleep"
-    BUILDMAN: "^qemu-x86_64$"
+    BUILDMAN: "qemu-x86_64"
   <<: *buildman_and_testpy_dfn
 
 zynq_zc702 test.py:
@@ -326,7 +327,7 @@  zynq_zc702 test.py:
     TEST_PY_BD: "zynq_zc702"
     TEST_PY_TEST_SPEC: "not sleep"
     TEST_PY_ID: "--id qemu"
-    BUILDMAN: "^zynq_zc702$"
+    BUILDMAN: "zynq_zc702"
   <<: *buildman_and_testpy_dfn
 
 xilinx_versal_virt test.py:
@@ -335,7 +336,7 @@  xilinx_versal_virt test.py:
     TEST_PY_BD: "xilinx_versal_virt"
     TEST_PY_TEST_SPEC: "not sleep"
     TEST_PY_ID: "--id qemu"
-    BUILDMAN: "^xilinx_versal_virt$"
+    BUILDMAN: "xilinx_versal_virt"
   <<: *buildman_and_testpy_dfn
 
 xtfpga test.py:
@@ -344,5 +345,5 @@  xtfpga test.py:
     TEST_PY_BD: "xtfpga"
     TEST_PY_TEST_SPEC: "not sleep"
     TEST_PY_ID: "--id qemu"
-    BUILDMAN: "^xtfpga$"
+    BUILDMAN: "xtfpga"
   <<: *buildman_and_testpy_dfn
diff --git a/.travis.yml b/.travis.yml
index f3703085ba..3149ed6a15 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -139,10 +139,11 @@  script:
      cp ~/grub2-arm/usr/lib/grub2/arm-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi;
      cp ~/grub2-arm64/usr/lib/grub2/arm64-efi/grub.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi;
      ret=0;
-     tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E ${BUILDMAN}
-       ${OVERRIDE}|| ret=$?;
+     tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E
+       --board ${BUILDMAN} ${OVERRIDE}|| ret=$?;
      if [[ $ret -ne 0 && $ret -ne 129 ]]; then
-       tools/buildman/buildman -sde -o ${UBOOT_TRAVIS_BUILD_DIR} -w ${BUILDMAN};
+       tools/buildman/buildman -sde -o ${UBOOT_TRAVIS_BUILD_DIR} -w
+         --board ${BUILDMAN};
        exit $ret;
      fi;
      virtualenv -p /usr/bin/python3 /tmp/venv;
@@ -399,110 +400,110 @@  matrix:
     - name: "test/py sandbox"
       env:
         - TEST_PY_BD="sandbox"
-          BUILDMAN="^sandbox$"
+          BUILDMAN="sandbox"
           TOOLCHAIN="i386"
     - name: "test/py sandbox with clang"
       env:
         - TEST_PY_BD="sandbox"
-          BUILDMAN="^sandbox$"
+          BUILDMAN="sandbox"
           OVERRIDE="-O clang-7"
     - name: "test/py sandbox_spl"
       env:
         - TEST_PY_BD="sandbox_spl"
           TEST_PY_TEST_SPEC="test_ofplatdata"
-          BUILDMAN="^sandbox$"
+          BUILDMAN="sandbox"
           TOOLCHAIN="i386"
           TEST_PY_TOOLS="yes"
     - name: "test/py sandbox_flattree"
       env:
         - TEST_PY_BD="sandbox_flattree"
-          BUILDMAN="^sandbox_flattree$"
+          BUILDMAN="sandbox_flattree"
           TOOLCHAIN="i386"
     - name: "test/py evb-ast2500"
       env:
         - TEST_PY_BD="evb-ast2500"
           TEST_PY_ID="--id qemu"
           QEMU_TARGET="arm-softmmu"
-          BUILDMAN="^evb-ast2500$"
+          BUILDMAN="evb-ast2500"
     - name: "test/py vexpress_ca15_tc2"
       env:
         - TEST_PY_BD="vexpress_ca15_tc2"
           TEST_PY_ID="--id qemu"
           QEMU_TARGET="arm-softmmu"
-          BUILDMAN="^vexpress_ca15_tc2$"
+          BUILDMAN="vexpress_ca15_tc2"
     - name: "test/py vexpress_ca9x4"
       env:
         - TEST_PY_BD="vexpress_ca9x4"
           TEST_PY_ID="--id qemu"
           QEMU_TARGET="arm-softmmu"
-          BUILDMAN="^vexpress_ca9x4$"
+          BUILDMAN="vexpress_ca9x4"
     - name: "test/py integratorcp_cm926ejs"
       env:
         - TEST_PY_BD="integratorcp_cm926ejs"
           TEST_PY_TEST_SPEC="not sleep"
           TEST_PY_ID="--id qemu"
           QEMU_TARGET="arm-softmmu"
-          BUILDMAN="^integratorcp_cm926ejs$"
+          BUILDMAN="integratorcp_cm926ejs"
     - name: "test/py qemu_arm"
       env:
         - TEST_PY_BD="qemu_arm"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="arm-softmmu"
-          BUILDMAN="^qemu_arm$"
+          BUILDMAN="qemu_arm"
     - name: "test/py qemu_arm64"
       env:
         - TEST_PY_BD="qemu_arm64"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="aarch64-softmmu"
-          BUILDMAN="^qemu_arm64$"
+          BUILDMAN="qemu_arm64"
     - name: "test/py qemu_mips"
       env:
         - TEST_PY_BD="qemu_mips"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="mips-softmmu"
-          BUILDMAN="^qemu_mips$"
+          BUILDMAN="qemu_mips"
           TOOLCHAIN="mips"
     - name: "test/py qemu_mipsel"
       env:
         - TEST_PY_BD="qemu_mipsel"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="mipsel-softmmu"
-          BUILDMAN="^qemu_mipsel$"
+          BUILDMAN="qemu_mipsel"
           TOOLCHAIN="mips"
     - name: "test/py qemu_mips64"
       env:
         - TEST_PY_BD="qemu_mips64"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="mips64-softmmu"
-          BUILDMAN="^qemu_mips64$"
+          BUILDMAN="qemu_mips64"
           TOOLCHAIN="mips"
     - name: "test/py qemu_mips64el"
       env:
         - TEST_PY_BD="qemu_mips64el"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="mips64el-softmmu"
-          BUILDMAN="^qemu_mips64el$"
+          BUILDMAN="qemu_mips64el"
           TOOLCHAIN="mips"
     - name: "test/py qemu-ppce500"
       env:
         - TEST_PY_BD="qemu-ppce500"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="ppc-softmmu"
-          BUILDMAN="^qemu-ppce500$"
+          BUILDMAN="qemu-ppce500"
           TOOLCHAIN="powerpc"
     - name: "test/py qemu-riscv64"
       env:
         - TEST_PY_BD="qemu-riscv64"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="riscv64-softmmu"
-          BUILDMAN="^qemu-riscv64$"
+          BUILDMAN="qemu-riscv64"
           TOOLCHAIN="riscv"
     - name: "test/py qemu-x86"
       env:
         - TEST_PY_BD="qemu-x86"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="i386-softmmu"
-          BUILDMAN="^qemu-x86$"
+          BUILDMAN="qemu-x86"
           TOOLCHAIN="i386"
           BUILD_ROM="yes"
     - name: "test/py qemu-x86_64"
@@ -510,7 +511,7 @@  matrix:
         - TEST_PY_BD="qemu-x86_64"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="x86_64-softmmu"
-          BUILDMAN="^qemu-x86_64$"
+          BUILDMAN="qemu-x86_64"
           TOOLCHAIN="i386"
           BUILD_ROM="yes"
     - name: "test/py zynq_zc702"
@@ -519,21 +520,21 @@  matrix:
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="arm-softmmu"
           TEST_PY_ID="--id qemu"
-          BUILDMAN="^zynq_zc702$"
+          BUILDMAN="zynq_zc702"
     - name: "test/py xilinx_versal_virt"
       env:
         - TEST_PY_BD="xilinx_versal_virt"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="aarch64-softmmu"
           TEST_PY_ID="--id qemu"
-          BUILDMAN="^xilinx_versal_virt$"
+          BUILDMAN="xilinx_versal_virt"
     - name: "test/py xtfpga"
       env:
         - TEST_PY_BD="xtfpga"
           TEST_PY_TEST_SPEC="not sleep"
           QEMU_TARGET="xtensa-softmmu"
           TEST_PY_ID="--id qemu"
-          BUILDMAN="^xtfpga$"
+          BUILDMAN="xtfpga"
           TOOLCHAIN="xtensa-dc233c-elf"
 
 # TODO make it perfect ;-r