Commit Graph

6 Commits

Author SHA1 Message Date
Sam Hurst
fc75244eb9 ec:Add presubmit hook to enforce host command definitions
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>
2017-02-25 02:08:37 -08:00
Bill Richardson
1e930f49c8 Put a newline at the end of PRESUBMIT.cfg
Every time I run "cat PRESUBMIT.cfg" to see what's in here, it
annoys me that there's no newline at the end. This adds one.

BUG=none
BRANCH=none
TEST=make buildall

Just adding whitespace; no functional change.

Change-Id: I7629312c987696fd6c7bbc986ad63222186729c0
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/395347
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2016-10-07 16:47:02 -07:00
Aseda Aboagye
9e73f3e031 presubmit: Add hook to check for config options.
This enables a presubmit hook to check for missing configuration
options. All CONFIG_* options should be defined in include/config.h
along with a brief description of what the config option does.

BUG=chrome-os-partner:26304
BRANCH=none
CQ-DEPEND=CL:281626
TEST=Create a commit modifying a source file with a new CONFIG_* option
and watched the preupload process fail illustrating the error with the
CONFIG_* option.
TEST=make -j buildall tests

Change-Id: I7240b386b4981dcab66811a4829d7d6ebfbf7cb1
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/281826
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Trybot-Ready: Aseda Aboagye <aaboagye@chromium.org>
2015-06-30 17:18:45 +00:00
Mike Frysinger
7e1eafc167 presubmit: enable branch/checkpatch checks
We're moving the hardcoded check lists out of the pre-upload script.

BUG=chromium:466264
TEST=uploading a CL w/out a branch line is rejected
BRANCH=None

Change-Id: Ifa0f8c3b4be6a20355babb6f9d8896ac8d1fb2be
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/262490
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2015-03-26 21:26:09 +00:00
Vic (Chun-Ju) Yang
798df2a6d0 Add presubmit check for unit test
This enforces that "make buildall" runs at least once after the last
file change.

TEST=Try to upload without running "make buildall"
TEST=Change a file without re-running "make buildall", and try to
upload.
BUG=None
BRANCH=None

Change-Id: Ia4abb3c0e17cf4d559975574f398d74c7986c89f
Signed-off-by: Vic (Chun-Ju) Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/185116
Reviewed-by: Dave Parker <dparker@chromium.org>
2014-02-06 19:27:18 +00:00
Vincent Palatin
9a545441d7 fix pre-submit hook
we are using linux style indentation,
so we should not check for the presence of tabs in the common python
script, checkpatch will ensure that the indentation is correct.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BUG=None.
TEST="repo upload" a CL with a new line containing tab indentation.

Change-Id: Ida3ef3d8274edd3e8e701e2ede43836c944cd263
2011-12-08 19:18:06 +00:00