Martin Roth (martinroth@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16362
-gerrit
commit b4b642558dc24fa3a0ae57db9091f691ef21d445 Author: Martin Roth martinroth@google.com Date: Tue Aug 30 09:39:48 2016 -0600
Makefile.inc: lint: Update to run lint-server scripts
- Add junit-amend command so that junit.xml doesn't get overwritten - Add lint-server as a valid option - Call lint with lint-server --junit-amend from what-jenkins-does - Add final newlines check as lint-server script
Change-Id: I7e4156844b8c60790e03a0e43564610bb0c8f386 Signed-off-by: Martin Roth martinroth@google.com --- Makefile.inc | 1 + util/lint/lint | 8 ++++++-- util/lint/lint-server-015-final-newlines | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/Makefile.inc b/Makefile.inc index 6225152..084ba56 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -997,6 +997,7 @@ JENKINS_PAYLOAD?=none CPUS?=4 what-jenkins-does: util/lint/lint lint-stable --junit + util/lint/lint lint-server --junit-amend util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD) -x -X $(top)/abuild-chromeos.xml util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD) (cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) $(if $(JENKINS_NOCCACHE),,CONFIG_LP_CCACHE=y) V=$(V) Q=$(Q) junit.xml) diff --git a/util/lint/lint b/util/lint/lint index 826685d..db24c7d 100755 --- a/util/lint/lint +++ b/util/lint/lint @@ -14,7 +14,7 @@ #set -x # uncomment for debug
usage () { - printf "Usage: %s <lint|lint-stable> [--junit]\n" "$0" + printf "Usage: %s <lint|lint-stable|lint-server> [--junit]\n" "$0" }
#write to the junit xml file if --junit was specified @@ -25,7 +25,8 @@ junit_write () { }
#verify the first command line parameter -if [ -z "$1" ] || [ "$1" != "lint" ] && [ "$1" != "lint-stable" ]; then +if [ -z "$1" ] || [ "$1" != "lint" ] && [ "$1" != "lint-stable" ] && \ + [ "$1" != "lint-server" ]; then usage exit 1 fi @@ -40,6 +41,9 @@ if [ "$2" = "--junit" ]; then JUNIT=1 echo '<?xml version="1.0" encoding="utf-8"?>' > "$XMLFILE" junit_write '<testsuite>' +elif [ "$2" = "--junit-amend" ]; then + JUNIT=1 + junit_write '<testsuite>' else JUNIT=0 fi diff --git a/util/lint/lint-server-015-final-newlines b/util/lint/lint-server-015-final-newlines new file mode 100755 index 0000000..c3f66c0 --- /dev/null +++ b/util/lint/lint-server-015-final-newlines @@ -0,0 +1,17 @@ +#!/bin/sh +# This file is part of the coreboot project. +# +# Copyright (C) 2016 Google Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# DESCR: Check that files end with a single newline + +lint-015-final-newlines