diff mbox

.gitlab-ci.yml: add check-DEVELOPERS test

Message ID 20170630164253.19859-1-arnout@mind.be
State Accepted
Headers show

Commit Message

Arnout Vandecappelle June 30, 2017, 4:42 p.m. UTC
This verifies that the DEVELOPERS file doesn't contain errors. It
just runs parse_developers from getdeveloperlib and errors out if
that produces any output.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 .gitlab-ci.yml    | 6 ++++++
 .gitlab-ci.yml.in | 6 ++++++
 2 files changed, 12 insertions(+)

Comments

Thomas Petazzoni June 30, 2017, 6:02 p.m. UTC | #1
Hello,

On Fri, 30 Jun 2017 18:42:53 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:

> +check-DEVELOPERS:
> +    script:
> +        - PYTHONPATH=$PWD/support/scripts
> +                python -c 'from getdeveloperlib import parse_developers; parse_developers()' |
> +                grep . && exit 1

Isn't "./support/scripts/get-developer -c" doing the right thing?

Thomas
Arnout Vandecappelle July 1, 2017, 7:36 a.m. UTC | #2
On 30-06-17 20:02, Thomas Petazzoni wrote:
> Hello,
> 
> On Fri, 30 Jun 2017 18:42:53 +0200, Arnout Vandecappelle
> (Essensium/Mind) wrote:
> 
>> +check-DEVELOPERS:
>> +    script:
>> +        - PYTHONPATH=$PWD/support/scripts
>> +                python -c 'from getdeveloperlib import parse_developers; parse_developers()' |
>> +                grep . && exit 1
> 
> Isn't "./support/scripts/get-developer -c" doing the right thing?

 The problem with that is that it produces a lot of output, and the warnings are
at the top. So I would have to grep for WARNING. But some of the possible errors
don't have a WARNING in front of them. So I started out changing the script to
add WARNING for those as well. But then I thought: keep things simple, just call
parse_developers directly.

 Perhaps it would be a little more transparent to add a __main__ to
getdeveloperlib and then call it with "python support/scripts/getdeveloperlib.py".

 Regards,
 Arnout
Thomas Petazzoni July 1, 2017, 7:39 a.m. UTC | #3
Hello,

On Sat, 1 Jul 2017 09:36:02 +0200, Arnout Vandecappelle wrote:

> >> +check-DEVELOPERS:
> >> +    script:
> >> +        - PYTHONPATH=$PWD/support/scripts
> >> +                python -c 'from getdeveloperlib import parse_developers; parse_developers()' |
> >> +                grep . && exit 1  
> > 
> > Isn't "./support/scripts/get-developer -c" doing the right thing?  
> 
>  The problem with that is that it produces a lot of output, and the warnings are
> at the top. So I would have to grep for WARNING. But some of the possible errors
> don't have a WARNING in front of them. So I started out changing the script to
> add WARNING for those as well. But then I thought: keep things simple, just call
> parse_developers directly.
> 
>  Perhaps it would be a little more transparent to add a __main__ to
> getdeveloperlib and then call it with "python support/scripts/getdeveloperlib.py".

Or a proper option to get-developers that does whatever check you want?

Thomas
Thomas Petazzoni July 1, 2017, 1:22 p.m. UTC | #4
Hello,

On Fri, 30 Jun 2017 18:42:53 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> This verifies that the DEVELOPERS file doesn't contain errors. It
> just runs parse_developers from getdeveloperlib and errors out if
> that produces any output.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  .gitlab-ci.yml    | 6 ++++++
>  .gitlab-ci.yml.in | 6 ++++++
>  2 files changed, 12 insertions(+)

Applied to master, thanks.

Thomas
diff mbox

Patch

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1f2410e862..43e963c51d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,6 +34,12 @@  check-gitlab-ci.yml:
         - make .gitlab-ci.yml
         - diff -u .gitlab-ci.yml.orig .gitlab-ci.yml
 
+check-DEVELOPERS:
+    script:
+        - PYTHONPATH=$PWD/support/scripts
+                python -c 'from getdeveloperlib import parse_developers; parse_developers()' |
+                grep . && exit 1
+
 .defconfig: &defconfig
     # Running the defconfigs for every push is too much, so limit to
     # explicit triggers through the API.
diff --git a/.gitlab-ci.yml.in b/.gitlab-ci.yml.in
index 0f9cbcba33..0b6e634a4b 100644
--- a/.gitlab-ci.yml.in
+++ b/.gitlab-ci.yml.in
@@ -34,6 +34,12 @@  check-gitlab-ci.yml:
         - make .gitlab-ci.yml
         - diff -u .gitlab-ci.yml.orig .gitlab-ci.yml
 
+check-DEVELOPERS:
+    script:
+        - PYTHONPATH=$PWD/support/scripts
+                python -c 'from getdeveloperlib import parse_developers; parse_developers()' |
+                grep . && exit 1
+
 .defconfig: &defconfig
     # Running the defconfigs for every push is too much, so limit to
     # explicit triggers through the API.