util/lint/lint: Show lint script output as it's running
The checkpatch script takes a really long time to run, and when the output is buffered to wait until it's finished, it's hard to tell if the script is actually doing anything. Instead, use tee to log the output and display it at the same time. Change-Id: I3cf36e5e6ca28584103888ee1c6f125320ac068a Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/17125 Reviewed-by: Patrick Georgi <pgeorgi@google.com> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
46dd467648
commit
78f73353a3
|
@ -50,15 +50,14 @@ for script in "$(dirname "$0")/${1}-"*; do
|
||||||
grep "^# DESCR:" "$script" | sed "s,.*DESCR: *,,"
|
grep "^# DESCR:" "$script" | sed "s,.*DESCR: *,,"
|
||||||
echo "========"
|
echo "========"
|
||||||
junit_write " <testcase classname='lint' name='$(basename "$script")'>"
|
junit_write " <testcase classname='lint' name='$(basename "$script")'>"
|
||||||
$script > "$LINTLOG"
|
$script | tee "$LINTLOG"
|
||||||
|
|
||||||
#if the lint script gives any output, that's a failure
|
#if the lint script gives any output, that's a failure
|
||||||
if [ "$(wc -l < "$LINTLOG")" -eq 0 ]; then
|
if [ "$(wc -l < "$LINTLOG")" -eq 0 ]; then
|
||||||
echo "success"
|
echo "success"
|
||||||
junit_write " <system-out><![CDATA[success]]></system-out>"
|
junit_write " <system-out><![CDATA[success]]></system-out>"
|
||||||
else
|
else
|
||||||
echo "test failed:"
|
echo "test failed"
|
||||||
cat "$LINTLOG"
|
|
||||||
junit_write " <failure type='testFailed'><![CDATA["
|
junit_write " <failure type='testFailed'><![CDATA["
|
||||||
junit_write "$(cat "$LINTLOG")"
|
junit_write "$(cat "$LINTLOG")"
|
||||||
junit_write "]]></failure>"
|
junit_write "]]></failure>"
|
||||||
|
|
Loading…
Reference in New Issue