From eb5cd2171cd377ac86cca1417f716d0ab5a8e414 Mon Sep 17 00:00:00 2001 From: Jack Rosenthal Date: Mon, 28 Sep 2020 15:39:23 -0600 Subject: 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 Change-Id: I57837755e37cc46f80ad5bd7c61082d2c7077aa8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2436379 Reviewed-by: Daisuke Nojiri --- util/presubmit_check.sh | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/util/presubmit_check.sh b/util/presubmit_check.sh index 9429e66a0d..bbf4338fad 100755 --- a/util/presubmit_check.sh +++ b/util/presubmit_check.sh @@ -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 -- cgit v1.2.1