summaryrefslogtreecommitdiff
path: root/tools/patman/test_checkpatch.py
AgeCommit message (Collapse)Author
2020-08-03checkpatch: Don't allow common.h and dm.h in headersSimon Glass
These headers should not be included in other header files. Add a checkpatch rule and test for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-08-03patman: Fix up the test commentsSimon Glass
Many of the tests have the same comment and two have the same name. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-09checkpatch: Don't warn about PREFER_IF in headers/DT filesSimon Glass
This warning should only be displayed for C files. Fix it and update the test. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-09patman: Add tests for the rest of the checkpatch checksSimon Glass
Finish off the tests for our small collection of checkpatch checks. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-09patman: Decode output from the '--show-types' optionSimon Glass
Collect the 'checkpatch type' from each error, warning and check. Provide this to patman and update the uclass test to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-09patman: Add a test for the 'possible new uclass' checkSimon Glass
It is quite likely that the number of U-Boot-specific tests in checkpatch.pl will increase over time. We should have tests for these to avoid undefined behaviour and bugs being introduced, which might cause people to ignore the warnings. Add a simple new class that can generate a patch with a single-line addition in it. Use that to add a test for one of the checkpatch checks. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-07-09patman: Rename test.py to test_checkpatch.pySimon Glass
These tests check checkpatch.pl operation and can server as our tests for the U-Boot-specific updates to that script. Rename the file and update comments to indicate this. Signed-off-by: Simon Glass <sjg@chromium.org>