util/presubmit_check.sh: disable buildall requirement

This was added to the presubmit back in the days of the legacy commit
queue, to avoid blowing up the CQ when unit tests had not been run.

This is unnecessary now with Parallel CQ, these tests are run as a
part of CL-specific commit queues.

BUG=none
BRANCH=none
TEST=presubmit

Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I57837755e37cc46f80ad5bd7c61082d2c7077aa8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2436379
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
Jack Rosenthal 2020-09-28 15:39:23 -06:00 committed by Commit Bot
parent cef6df6360
commit eb5cd2171c
1 changed files with 0 additions and 36 deletions

View File

@ -19,45 +19,9 @@ if git diff "${upstream_branch}" HEAD | grep -e '^+\(.*CPRINTS(.*\\n"\|++\)' |
exit 1
fi
# Retrieve the number of CPUs for a sensible estimate for make -j.
ncpu=$(getconf _NPROCESSORS_ONLN || echo 2)
# Verify that all targets were built and all tests passed after the latest
# source code modification.
if [[ ! -e .tests-passed ]]; then
echo "Unit tests have not passed. Please run \"make buildall -j ${ncpu}\"."
exit 1
fi
# Directories that need to be tested by separate unit tests.
unittest_dirs="util/ec3po/ extra/stack_analyzer/"
changed=$(find ${PRESUBMIT_FILES} -newer .tests-passed)
# Filter out unittest_dirs files from changed files. They're handled separately.
for dir in $unittest_dirs; do
changed=$(echo "${changed}" | grep -v "${dir}")
done
# Filter out flash_ec since it's not part of any unit tests.
changed=$(echo "${changed}" | grep -v util/flash_ec)
# Filter out uart_stress_tester
changed=$(echo "${changed}" | grep -v util/uart_stress_tester.py)
# Filter out this file itself.
changed=$(echo "${changed}" | grep -v util/presubmit_check.sh)
# Filter out the OWNERS file.
changed=$(echo "${changed}" | grep -v OWNERS)
# Filter out the README.md file.
changed=$(echo "${changed}" | grep -v README.md)
# Filter out the navbar.md file.
changed=$(echo "${changed}" | grep -v navbar.md)
# Filter out markdown docs/ directory
changed=$(echo "${changed}" | grep -v docs/)
if [[ -n "${changed}" ]]; then
echo "Files have changed since last time unit tests passed:"
echo "${changed}" | sed -e 's/^/ /'
echo "Please run \"make buildall -j ${ncpu}\"."
exit 1
fi
for dir in $unittest_dirs; do
dir_files=$(echo "${PRESUBMIT_FILES}" | grep "${dir}")
if [[ -z "${dir_files}" ]]; then