Skip to contentSkip to conversation

.gitlab-ci.d/check-patch: tweak output for CI logs

RFC PATCH In review Alex Bennée 2 participants 2 messages Nov 13, 2020

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 .gitlab-ci.d/check-patch: tweak output for CI logs

We don't need running commentary for the CI logs and by keeping it short we might just see the problem on the first page. While we are at it flush the previous line so order is maintained between script and sub process.

---
 .gitlab-ci.d/check-patch.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
.gitlab-ci.d/check-patch.py +2 -2
index 0ff30ee077..39e2b403c9 100755
@@ -45,9 +45,9 @@ if log == "":
 
 errors = False
 
-print("\nChecking all commits since %s...\n" % ancestor)
+print("\nChecking all commits since %s...\n" % ancestor, flush=True)
 
-ret = subprocess.run(["scripts/checkpatch.pl", ancestor + "..."])
+ret = subprocess.run(["scripts/checkpatch.pl", "--terse", ancestor + "..."])
 
 if ret.returncode != 0:
     print("    ❌ FAIL one or more commits failed scripts/checkpatch.pl")
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Alex Bennée

We don't need running commentary for the CI logs and by keeping it short we might just see the problem on the first page. While we are at it flush the previous line so order is maintained between script and sub process.

---
 .gitlab-ci.d/check-patch.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
.gitlab-ci.d/check-patch.py +0 -0
index 0ff30ee077..39e2b403c9 100755

.gitlab-ci.d/check-patch.py if log == "": · line 50

Quoted 8 lines
.gitlab-ci.d/check-patch.py +2 -2
@@ -45,9 +45,9 @@ if log == "":
 
 errors = False
 
-print("\nChecking all commits since %s...\n" % ancestor)
+print("\nChecking all commits since %s...\n" % ancestor, flush=True)
 
-ret = subprocess.run(["scripts/checkpatch.pl", ancestor + "..."])
+ret = subprocess.run(["scripts/checkpatch.pl", "--terse", ancestor + "..."])

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|