summaryrefslogtreecommitdiff
path: root/util/host_command_check.sh
Commit message (Collapse)AuthorAgeFilesLines
* util: Exclude obvious paths from host_command_checkCaveh Jalali2021-03-181-2/+4
| | | | | | | | | | | | | | | | | This excludes some obviously uninteresting paths from the host_command_check.sh scan. The potentially huge build directory should not scanned. The TAGS file is another source of false positives to be excluded. BRANCH=none BUG=none TEST=ran "PRESUBMIT_COMMIT=<sha> util/host_command_check.sh" on problematic patch to verify exclusion. Change-Id: Icd91028518a5d2ce7aa2371b3499f88abdace38b Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2771743 Reviewed-by: Simon Glass <sjg@chromium.org>
* util: Make sure hooks do not show external diff toolSimon Glass2021-02-011-1/+2
| | | | | | | | | | | | | | | | | At present when I 'repo upload' it opens meld and shows me all the changes I have made, sometimes many times. Add the --no-ext-diff flag to two up the pre-submit scripts to fix this. BUG=none BRANCH=none TEST=repo upload... see that meld does not run Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Id48cc1654f681e19052298c1ab98911883c19318 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2665297 Reviewed-by: Mike Frysinger <vapier@chromium.org>
* util: do not run host command check unless neededVadim Bendebury2017-12-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | With the recent addition of the presubmit check progress display it became obvious that hook2 from ./PRESUBMIT.cfg takes quite a bit of time on each check. A closer examination has shown that this script scans the entire codebase on each patch to see if there have been some inconsistencies wrt EC host command definitions. Let's limit running this check only to patches which actually touch EC host commands in any way. BRANCH=none BUG=none TEST=verified that the check runs only when the 'EC_.*CMD' string is present in the diffs output of the patch Change-Id: I128dba48332142b8835cf36747ab290190e6bcef Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/815951 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Sam Hurst <shurst@google.com>
* ec:Add presubmit hook to enforce host command definitionsSam Hurst2017-02-251-0/+128
Make sure all public and private host commands starting with EC_CMD_ and EC_PRV_CMD_ are properly formed BUG=chromium:681240 TEST=manual. Added following host commands and verified that they were flagged #define EC_CMD_TESTA 1234 #define EC_CMD_TESTB 0xabcd #define EC_CMD_TESTC 0x1ABCD #define EC_CMD_TESTD 0xXEF01 #define EC_PRV_CMD_TESTA 1234 #define EC_PRV_CMD_TESTB 0xabcd #define EC_PRV_CMD_TESTC 0x1ABCD #define EC_PRV_CMD_TESTD 0XEF01 These were also flagged by the script include/ec_commands.h:#define EC_CMD_ACPI_READ 0x80 include/ec_commands.h:#define EC_CMD_ACPI_WRITE 0x81 include/ec_commands.h:#define EC_CMD_ACPI_BURST_ENABLE 0x82 include/ec_commands.h:#define EC_CMD_ACPI_BURST_DISABLE 0x83 include/ec_commands.h:#define EC_CMD_ACPI_QUERY_EVENT 0x84 CQ-DEPEND=CL:445809 BRANCH=none Change-Id: I4630d6a887ed289a68178e8f1a8f07f5141c80bc Reviewed-on: https://chromium-review.googlesource.com/445811 Commit-Ready: Sam Hurst <shurst@google.com> Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>