diff mbox series

[v3,22/23] travis/gitlab/azure: Drop repeated buildman call with test.py

Message ID 20200318154302.16389-19-sjg@chromium.org
State Accepted
Commit 7ec1255ceacea72e813d5ea9a6a8c940716b147b
Headers show
Series gitlab: Simplify the test script | expand

Commit Message

Simon Glass March 18, 2020, 3:43 p.m. UTC
It does not seem to be necessary to run buildman again to show errors,
since any errors can be shown by the first invocation and there is only
a single board being built. Update this to simplify the code, using the
-e flag to make sure errors are shown.

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

Changes in v3: None
Changes in v2:
- Add new patch to drop the repeated buildman call

 .azure-pipelines.yml | 10 +++-------
 .gitlab-ci.yml       | 10 ++--------
 .travis.yml          | 10 ++--------
 3 files changed, 7 insertions(+), 23 deletions(-)

Comments

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

> It does not seem to be necessary to run buildman again to show errors,
> since any errors can be shown by the first invocation and there is only
> a single board being built. Update this to simplify the code, using the
> -e flag to make sure errors are shown.
> 
> 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 28a6583319..27bc249629 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -246,13 +246,9 @@  jobs:
           # the below corresponds to .gitlab-ci.yml "script"
           cd ${WORK_DIR}
           export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD};
-          ret=0;
-          tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W --board ${TEST_PY_BD} ${OVERRIDE} || ret=$?;
-          if [[ $ret -ne 0 ]]; then
-              tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -se --board ${TEST_PY_BD};
-              exit $ret;
-          fi
-          virtualenv -p /usr/bin/python3 /tmp/venv
+          tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE}
+
+                    virtualenv -p /usr/bin/python3 /tmp/venv
           . /tmp/venv/bin/activate
           pip install -r test/py/requirements.txt
           export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 64d8b1bdfc..d171641576 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -29,14 +29,8 @@  stages:
   script:
     # If we've been asked to use clang only do one configuration.
     - export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD}
-    - ret=0;
-      tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W
-        --board ${TEST_PY_BD} ${OVERRIDE} || ret=$?;
-      if [[ $ret -ne 0 ]]; then
-        tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -se
-           --board ${TEST_PY_BD};
-        exit $ret;
-      fi
+    - tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e
+        --board ${TEST_PY_BD} ${OVERRIDE}
     - virtualenv -p /usr/bin/python3 /tmp/venv
     - . /tmp/venv/bin/activate
     - pip install -r test/py/requirements.txt
diff --git a/.travis.yml b/.travis.yml
index 757e425467..37fd8e483a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -134,14 +134,8 @@  script:
      cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/;
      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 -W
-       --board ${TEST_PY_BD} ${OVERRIDE}|| ret=$?;
-     if [[ $ret -ne 0 ]]; then
-       tools/buildman/buildman -se -o ${UBOOT_TRAVIS_BUILD_DIR} -w
-         --board ${TEST_PY_BD};
-       exit $ret;
-     fi;
+     tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e
+       --board ${TEST_PY_BD} ${OVERRIDE} || exit;
      virtualenv -p /usr/bin/python3 /tmp/venv;
      . /tmp/venv/bin/activate;
      pip install -r test/py/requirements.txt;