summaryrefslogtreecommitdiff
path: root/util/presubmit_check.sh
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2020-09-28 15:39:23 -0600
committerCommit Bot <commit-bot@chromium.org>2020-09-29 02:41:52 +0000
commiteb5cd2171cd377ac86cca1417f716d0ab5a8e414 (patch)
treecc3ec84d208a743b7da42a6ed54cb50c23bb1808 /util/presubmit_check.sh
parentcef6df6360b61b5dabdd6fb9add0ac1c211369da (diff)
downloadchrome-ec-eb5cd2171cd377ac86cca1417f716d0ab5a8e414.tar.gz
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>
Diffstat (limited to 'util/presubmit_check.sh')
-rwxr-xr-xutil/presubmit_check.sh36
1 files changed, 0 insertions, 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