<p>Martin Roth has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/27011">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">util/lint: Run lint-extended-007-final-newlines checks in parallel<br><br>Instead of checking each directory in series, kick off the checks<br>in parallel and then wait for them to finish.  Failures print out with<br>file information, so mixing output isn't a problem.  This reduces<br>the time it takes to run on lumberingbuilder by 60%.<br><br>This could probably be sped up even more by splitting up src/mainboard<br>into smaller sections.<br><br>This method does skip a few control files at the top level - .gitignore,<br>.checkpatch.conf, gnat.adc, etc.  These could be added to the list of<br>files to check, but I didn't think it was needed.<br><br>Change-Id: I171977e713a9956cf4142cfc0a199e10040abb35<br>Signed-off-by: Martin Roth <gaumless@gmail.com><br>---<br>M util/lint/lint-extended-015-final-newlines<br>1 file changed, 15 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/11/27011/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/util/lint/lint-extended-015-final-newlines b/util/lint/lint-extended-015-final-newlines</span><br><span>index 4ddd00b..b5a503f 100755</span><br><span>--- a/util/lint/lint-extended-015-final-newlines</span><br><span>+++ b/util/lint/lint-extended-015-final-newlines</span><br><span>@@ -16,6 +16,8 @@</span><br><span> </span><br><span> LC_ALL=C export LC_ALL</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+PIDS=""</span><br><span style="color: hsl(120, 100%, 40%);">+INCLUDED_DIRS_AND_FILES='util/* src/* payloads/* configs/* Makefile *.inc'</span><br><span> EXCLUDED_DIRS='src/vendorcode/\|util/romcc/\|cbfstool/lzma/\|cbfstool/lz4/\|Documentation/\|build/\|3rdparty/\|\.git/\|coreboot-builds/\|util/nvidia/cbootimage/'</span><br><span> EXCLUDED_FILES='\.jpg$\|\.cksum$\|\.bin$\|\.vbt$\|\.hex$\|\.ico$\|\.o$\|\.bz2$\|\.xz$\|^.tmpconfig\|\.pyc$\|_shipped$\|sha256$\|\.png$\|\.patch$'</span><br><span> </span><br><span>@@ -25,7 +27,7 @@</span><br><span> then</span><br><span>         FIND_FILES="git ls-files"</span><br><span> else</span><br><span style="color: hsl(0, 100%, 40%);">-     FIND_FILES="find . "</span><br><span style="color: hsl(120, 100%, 40%);">+        FIND_FILES="find"</span><br><span> fi</span><br><span> </span><br><span> HAVE_FILE=$(command -v file 1>/dev/null 2>&1; echo $?)</span><br><span>@@ -49,7 +51,6 @@</span><br><span>                if [ -f "$filename" ] && { [ ! -x "$filename" ] || \</span><br><span>                     is_eligible_executable "$filename"; };</span><br><span>             then</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>                         # Verify that there is a newline at the end</span><br><span>                  # $() strips trailing newlines</span><br><span>                       if [ -n "$(tail -c 1 "$filename")" ]; then</span><br><span>@@ -65,7 +66,15 @@</span><br><span>  done</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-${FIND_FILES} | sed 's|^\./||' | sort | \</span><br><span style="color: hsl(0, 100%, 40%);">-  grep -v "$EXCLUDED_DIRS" | \</span><br><span style="color: hsl(0, 100%, 40%);">-  grep -v "$EXCLUDED_FILES" | \</span><br><span style="color: hsl(0, 100%, 40%);">- test_for_final_newline</span><br><span style="color: hsl(120, 100%, 40%);">+for directory in $INCLUDED_DIRS_AND_FILES ; do</span><br><span style="color: hsl(120, 100%, 40%);">+        ${FIND_FILES} ${directory} | sed 's|^\./||' | sort | \</span><br><span style="color: hsl(120, 100%, 40%);">+                grep -v "$EXCLUDED_DIRS" | \</span><br><span style="color: hsl(120, 100%, 40%);">+                grep -v "$EXCLUDED_FILES" | \</span><br><span style="color: hsl(120, 100%, 40%);">+               test_for_final_newline &</span><br><span style="color: hsl(120, 100%, 40%);">+  PIDS="$PIDS $!"</span><br><span style="color: hsl(120, 100%, 40%);">+done</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# wait for tests to finish.</span><br><span style="color: hsl(120, 100%, 40%);">+for pid in $PIDS; do</span><br><span style="color: hsl(120, 100%, 40%);">+  wait "$pid"</span><br><span style="color: hsl(120, 100%, 40%);">+done</span><br><span></span><br></pre><p>To view, visit <a href="https://review.coreboot.org/27011">change 27011</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/27011"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I171977e713a9956cf4142cfc0a199e10040abb35 </div>
<div style="display:none"> Gerrit-Change-Number: 27011 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Martin Roth <martinroth@google.com> </div>