Makefile.inc: lint: Update to run lint-extended scripts
- Add lint-extended as a valid option - Call lint-extend from what-jenkins-does and test-lint - When logging to a junit.xml file, name the file extended-junit.xml so it doesn't conflict with the stable junit.xml file. Change-Id: I7e4156844b8c60790e03a0e43564610bb0c8f386 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/16362 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Chris Ching <chingcodes@chromium.org>
This commit is contained in:
parent
35bfb9d9be
commit
ea383676cf
|
@ -14,7 +14,7 @@
|
||||||
#set -x # uncomment for debug
|
#set -x # uncomment for debug
|
||||||
|
|
||||||
usage () {
|
usage () {
|
||||||
printf "Usage: %s <lint|lint-stable> [--junit]\n" "$0"
|
printf "Usage: %s <lint|lint-stable|lint-extended> [--junit]\n" "$0"
|
||||||
}
|
}
|
||||||
|
|
||||||
#write to the junit xml file if --junit was specified
|
#write to the junit xml file if --junit was specified
|
||||||
|
@ -25,17 +25,20 @@ junit_write () {
|
||||||
}
|
}
|
||||||
|
|
||||||
#verify the first command line parameter
|
#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-extended" ]; then
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LINTLOG=$(mktemp .tmpconfig.lintXXXXX);
|
LINTLOG=$(mktemp .tmpconfig.lintXXXXX);
|
||||||
XMLFILE="$(dirname "$0")/junit.xml"
|
XMLFILE="$(dirname "$0")/junit.xml"
|
||||||
|
if [ "$1" = "lint-extended" ]; then
|
||||||
|
XMLFILE="$(dirname "$0")/extended-junit.xml"
|
||||||
|
fi
|
||||||
FAILED=0;
|
FAILED=0;
|
||||||
|
|
||||||
#check optional second command line parameter.
|
#check optional second command line parameter.
|
||||||
#TODO: Add real command line handling if anything more is added
|
|
||||||
if [ "$2" = "--junit" ]; then
|
if [ "$2" = "--junit" ]; then
|
||||||
JUNIT=1
|
JUNIT=1
|
||||||
echo '<?xml version="1.0" encoding="utf-8"?>' > "$XMLFILE"
|
echo '<?xml version="1.0" encoding="utf-8"?>' > "$XMLFILE"
|
||||||
|
|
|
@ -67,11 +67,12 @@ JENKINS_PAYLOAD?=none
|
||||||
TEST_PAYLOAD?=$(JENKINS_PAYLOAD)
|
TEST_PAYLOAD?=$(JENKINS_PAYLOAD)
|
||||||
CPUS?=4
|
CPUS?=4
|
||||||
|
|
||||||
lint lint-stable:
|
lint lint-stable lint-extended:
|
||||||
util/lint/lint $@
|
util/lint/lint $@
|
||||||
|
|
||||||
what-jenkins-does:
|
what-jenkins-does:
|
||||||
util/lint/lint lint-stable --junit
|
util/lint/lint lint-stable --junit
|
||||||
|
util/lint/lint lint-extended --junit
|
||||||
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) -x -X $(top)/abuild-chromeos.xml
|
||||||
util/abuild/abuild -B -J $(if $(JENKINS_NOCCACHE),,-y) -c $(CPUS) -z -p $(JENKINS_PAYLOAD)
|
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)
|
(cd payloads/libpayload; unset COREBOOT_BUILD_DIR; $(MAKE) $(if $(JENKINS_NOCCACHE),,CONFIG_LP_CCACHE=y) V=$(V) Q=$(Q) junit.xml)
|
||||||
|
@ -84,7 +85,7 @@ test-basic: test-lint test-tools test-abuild test-payloads test-cleanup
|
||||||
|
|
||||||
test-lint:
|
test-lint:
|
||||||
util/lint/lint lint-stable
|
util/lint/lint lint-stable
|
||||||
util/lint/lint-015-final-newlines
|
util/lint/lint lint-extended
|
||||||
|
|
||||||
test-abuild:
|
test-abuild:
|
||||||
rm -rf coreboot-builds-chromeos coreboot-builds
|
rm -rf coreboot-builds-chromeos coreboot-builds
|
||||||
|
|
Loading…
Reference in New Issue