diff options
author | Aseda Aboagye <aaboagye@google.com> | 2016-01-07 10:02:47 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-07 14:29:41 -0800 |
commit | c7c04e673efe535e00003fa66c83f7b19a5a0786 (patch) | |
tree | 701a7082baa5ad2ffc27bf937f12648c84ac72db | |
parent | a48945568e22c28e67b64453252ad4e9387d0e06 (diff) | |
download | chrome-ec-c7c04e673efe535e00003fa66c83f7b19a5a0786.tar.gz |
util: presubmit_check.sh: Fix check for ec3po.
The presubmit check would nag at the user to run the EC-3PO unit
tests, even if they hadn't modified any EC-3PO files. This was not my
intention. This commit fixes the presubmit check to only check for
unit test success if a EC-3PO file is modified.
BUG=chromium:575032
BRANCH=None
TEST=Remove util/ec3po/.tests-passed; Modify a non-ec3po file, commit,
and try to upload. Verify that no nag message is presented.
TEST=Remove util/ec3po/.tests-passed; Modify a ec3po file, commit, and
try to upload. Verify that a nag message to run unit tests is
presented.
Change-Id: I86e9f325329b7ad1a4c7c5971b7851e9024e7750
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/320831
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
-rwxr-xr-x | util/presubmit_check.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/presubmit_check.sh b/util/presubmit_check.sh index 41045042f1..a0b1488ccd 100755 --- a/util/presubmit_check.sh +++ b/util/presubmit_check.sh @@ -20,7 +20,7 @@ if [[ -n "${changed}" ]]; then exit 1 fi -if [[ ! -e util/ec3po/.tests-passed ]]; then +if [[ ! -e util/ec3po/.tests-passed ]] && [[ -n "${ec3po_files}" ]]; then echo 'Unit tests have not passed. Please run "util/ec3po/run_tests.sh".' exit 1 fi |