All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] CI: Print out unmigrated symbols when failing
@ 2022-04-11 17:20 Tom Rini
  2022-04-15 15:46 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Tom Rini @ 2022-04-11 17:20 UTC (permalink / raw)
  To: u-boot

To make addressing the problem of migrated symbols being present in
board config header files, update the CI test to them print what symbols
are causing it to fail.  Also report all failures in the tree, rather
than stopping at the first failing file.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 .azure-pipelines.yml | 7 +++++--
 .gitlab-ci.yml       | 9 ++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 314d27718926..ec77c7ab5fcf 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -63,6 +63,7 @@ stages:
       - script: |
           KSYMLST=`mktemp`
           KUSEDLST=`mktemp`
+          RET=0
           cat `find . -name "Kconfig*"` | \
              sed -n -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
              -e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
@@ -76,10 +77,12 @@ stages:
              NUM=`comm -123 --total --output-delimiter=, ${KSYMLST} ${KUSEDLST} | \
                 cut -d , -f 3`
              if [[ $NUM -ne 0 ]]; then
-                echo "Unmigrated symbols found in $CFG"
-                exit 1
+                echo "Unmigrated symbols found in $CFG:"
+                comm -12 ${KSYMLST} ${KUSEDLST}
+                RET=1
              fi
           done
+          exit $RET
 
   - job: cppcheck
     displayName: 'Static code analysis with cppcheck'
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 43fe8c64991c..f193ffd3cbc4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -124,6 +124,7 @@ check for migrated symbols in board header:
   script:
     - KSYMLST=`mktemp`;
       KUSEDLST=`mktemp`;
+      RET=0;
       cat `find . -name "Kconfig*"` |
          sed -n -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p'
          -e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p'
@@ -137,10 +138,12 @@ check for migrated symbols in board header:
          NUM=`comm -123 --total --output-delimiter=, ${KSYMLST} ${KUSEDLST} |
             cut -d , -f 3`;
          if [[ $NUM -ne 0 ]]; then
-            echo "Unmigrated symbols found in $CFG";
-            exit 1;
+            echo "Unmigrated symbols found in $CFG:";
+            comm -12 ${KSYMLST} ${KUSEDLST};
+            RET=1;
          fi;
-      done
+      done;
+      exit $RET
 
 # QA jobs for code analytics
 # static code analysis with cppcheck (we can add --enable=all later)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] CI: Print out unmigrated symbols when failing
  2022-04-11 17:20 [PATCH] CI: Print out unmigrated symbols when failing Tom Rini
@ 2022-04-15 15:46 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2022-04-15 15:46 UTC (permalink / raw)
  To: u-boot

[-- Attachment #1: Type: text/plain, Size: 426 bytes --]

On Mon, Apr 11, 2022 at 01:20:00PM -0400, Tom Rini wrote:

> To make addressing the problem of migrated symbols being present in
> board config header files, update the CI test to them print what symbols
> are causing it to fail.  Also report all failures in the tree, rather
> than stopping at the first failing file.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-15 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 17:20 [PATCH] CI: Print out unmigrated symbols when failing Tom Rini
2022-04-15 15:46 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.