From c7c04e673efe535e00003fa66c83f7b19a5a0786 Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Thu, 7 Jan 2016 10:02:47 -0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/320831 Commit-Ready: Aseda Aboagye Tested-by: Aseda Aboagye Reviewed-by: Shawn N --- util/presubmit_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1