tests: Use pre-commit to run some tests in Jenkins

The pre-commit tool is able to run style tests in a reproducible
manner. Run pre-commit from Jenkins.

Change-Id: Ia142a6f3b610410b5767515483b90bc3a09f2407
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61113
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Andreas Sandberg
2022-07-07 14:57:08 +01:00
parent 787204c92d
commit d49c8f78fe

View File

@@ -37,6 +37,10 @@
set -e
# Run pre-commit style checks
PRE_COMMIT_HOME=/tmp/pre-commit-cache pre-commit run \
--from-ref HEAD~ --to-ref HEAD
# Use ccache with the default directory for caching
#XXX Not available in docker image.
#export PATH="/usr/lib/ccache:$PATH"