diff mbox series

[15/20] gitlab: Use the buildman -W flag

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

Commit Message

Simon Glass March 7, 2020, 3:07 a.m. UTC
It doesn't seem to make sense to tell buildman to report warning as errors
(thus ensuring there are no warnings) and then ignore the warnings.

We can simplify the logic now that we can tell buildman to ignore
warnings.

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

 .gitlab-ci.yml | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

Comments

Tom Rini March 9, 2020, 6:01 p.m. UTC | #1
On Fri, Mar 06, 2020 at 08:07:29PM -0700, Simon Glass wrote:

> It doesn't seem to make sense to tell buildman to report warning as errors
> (thus ensuring there are no warnings) and then ignore the warnings.
> 
> We can simplify the logic now that we can tell buildman to ignore
> warnings.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> 
>  .gitlab-ci.yml | 24 ++++++++++--------------
>  1 file changed, 10 insertions(+), 14 deletions(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 05f56c6d19..9de6592d1a 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -30,12 +30,8 @@ stages:
>      # From buildman, exit code 129 means warnings only.  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
> -        --board ${TEST_PY_BD} ${OVERRIDE} || ret=$?;
> -      if [[ $ret -ne 0 && $ret -ne 129 ]]; then
> -        exit $ret;
> -      fi
> +    - tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -W
> +        --board ${TEST_PY_BD} ${OVERRIDE}
>      - virtualenv -p /usr/bin/python3 /tmp/venv
>      - . /tmp/venv/bin/activate
>      - pip install -r test/py/requirements.txt

Maybe this whole bit of logic needs some re-thinking.  We pass -E to get
warnings-as-errors so I think it's better to drop this new flag, fix the
test to just check for non-zero and a Fixes tag for
329f5ef51d2e8de79fe2e846f2c2905da9530a71 as that should have done this
in the first place I think.  Thanks!
diff mbox series

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 05f56c6d19..9de6592d1a 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,12 +30,8 @@  stages:
     # From buildman, exit code 129 means warnings only.  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
-        --board ${TEST_PY_BD} ${OVERRIDE} || ret=$?;
-      if [[ $ret -ne 0 && $ret -ne 129 ]]; then
-        exit $ret;
-      fi
+    - tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -W
+        --board ${TEST_PY_BD} ${OVERRIDE}
     - virtualenv -p /usr/bin/python3 /tmp/venv
     - . /tmp/venv/bin/activate
     - pip install -r test/py/requirements.txt
@@ -54,8 +50,8 @@  build all 32bit ARM platforms:
   stage: world build
   script:
     - ret=0;
-      ./tools/buildman/buildman -o /tmp -P -E arm -x aarch64 || ret=$?;
-      if [[ $ret -ne 0 && $ret -ne 129 ]]; then
+      ./tools/buildman/buildman -o /tmp -PW arm -x aarch64 || ret=$?;
+      if [[ $ret -ne 0 ]]; then
         ./tools/buildman/buildman -o /tmp -seP;
         exit $ret;
       fi;
@@ -68,8 +64,8 @@  build all 64bit ARM platforms:
     - . /tmp/venv/bin/activate
     - pip install pyelftools
     - ret=0;
-      ./tools/buildman/buildman -o /tmp -P -E aarch64 || ret=$?;
-      if [[ $ret -ne 0 && $ret -ne 129 ]]; then
+      ./tools/buildman/buildman -o /tmp -PW aarch64 || ret=$?;
+      if [[ $ret -ne 0 ]]; then
         ./tools/buildman/buildman -o /tmp -seP;
         exit $ret;
       fi;
@@ -79,8 +75,8 @@  build all PowerPC platforms:
   stage: world build
   script:
     - ret=0;
-      ./tools/buildman/buildman -o /tmp -P -E powerpc || ret=$?;
-      if [[ $ret -ne 0 && $ret -ne 129 ]]; then
+      ./tools/buildman/buildman -o /tmp -PW powerpc || ret=$?;
+      if [[ $ret -ne 0 ]]; then
         ./tools/buildman/buildman -o /tmp -seP;
         exit $ret;
       fi;
@@ -90,8 +86,8 @@  build all other platforms:
   stage: world build
   script:
     - ret=0;
-      ./tools/buildman/buildman -o /tmp -P -E -x arm,powerpc || ret=$?;
-      if [[ $ret -ne 0 && $ret -ne 129 ]]; then
+      ./tools/buildman/buildman -o /tmp -PW -x arm,powerpc || ret=$?;
+      if [[ $ret -ne 0 ]]; then
         ./tools/buildman/buildman -o /tmp -seP;
         exit $ret;
       fi;