tests: fix checkstyle-python 25/36125/4
authorKlement Sekera <klement.sekera@gmail.com>
Wed, 11 May 2022 14:54:09 +0000 (16:54 +0200)
committerOle Tr�an <otroan@employees.org>
Wed, 11 May 2022 16:25:40 +0000 (16:25 +0000)
Add --check to black to pass back error value and fail checkstyle if
a reformat would occur.

Type: fix
Fixes: d9b0c6fbf7aa5bd9af84264105b39c82028a4a29
Signed-off-by: Klement Sekera <klement.sekera@gmail.com>
Change-Id: I9a1fbe224929fc461ff833a589f73ca06e7cc9d6

test/Makefile

index b416bc3..08c6eab 100644 (file)
@@ -351,7 +351,7 @@ start-gdb: sanity
 .PHONY: checkstyle-python-all
 checkstyle-python-all: $(PIP_INSTALL_DONE)
        @bash -c "source $(VENV_PATH)/bin/activate &&\
-               black -t py39 --diff $(WS_ROOT) ||\
+               black -t py39 --check --diff $(WS_ROOT) ||\
                (echo \"*************************************************************************\" &&\
                echo \"* Test framework PEP8 compliance check FAILED (maybe: make fixstyle-python)\" &&\
                echo \"*************************************************************************\" &&\