mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
Azure/GitLab CI: Add the pylint checker
Add a check that new Python code does not regress the pylint score for any module. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
fc8af3803f
commit
642e51addf
@ -202,6 +202,28 @@ stages:
|
|||||||
export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH
|
export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH
|
||||||
test/nokia_rx51_test.sh
|
test/nokia_rx51_test.sh
|
||||||
|
|
||||||
|
- job: pylint
|
||||||
|
displayName: Check for any pylint regressions
|
||||||
|
pool:
|
||||||
|
vmImage: $(ubuntu_vm)
|
||||||
|
container:
|
||||||
|
image: $(ci_runner_image)
|
||||||
|
options: $(container_option)
|
||||||
|
steps:
|
||||||
|
- script: |
|
||||||
|
cd ${WORK_DIR}
|
||||||
|
export USER=azure
|
||||||
|
pip install -r test/py/requirements.txt
|
||||||
|
pip install asteval pylint pyopenssl
|
||||||
|
export PATH=${PATH}:~/.local/bin
|
||||||
|
echo "[MASTER]" >> .pylintrc
|
||||||
|
echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
||||||
|
export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
||||||
|
./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
|
||||||
|
pylint --version
|
||||||
|
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
||||||
|
make pylint_err
|
||||||
|
|
||||||
- stage: test_py
|
- stage: test_py
|
||||||
jobs:
|
jobs:
|
||||||
- job: test_py
|
- job: test_py
|
||||||
|
@ -215,6 +215,22 @@ Run tests for Nokia RX-51 (aka N900):
|
|||||||
- export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH;
|
- export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH;
|
||||||
test/nokia_rx51_test.sh
|
test/nokia_rx51_test.sh
|
||||||
|
|
||||||
|
# Check for any pylint regressions
|
||||||
|
Run pylint:
|
||||||
|
stage: testsuites
|
||||||
|
script:
|
||||||
|
- pip install -r test/py/requirements.txt
|
||||||
|
- pip install asteval pylint pyopenssl
|
||||||
|
- export PATH=${PATH}:~/.local/bin
|
||||||
|
- echo "[MASTER]" >> .pylintrc
|
||||||
|
- echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
||||||
|
- export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
|
||||||
|
- ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
|
||||||
|
--board sandbox_spl
|
||||||
|
- pylint --version
|
||||||
|
- export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
|
||||||
|
- make pylint_err
|
||||||
|
|
||||||
# Test sandbox with test.py
|
# Test sandbox with test.py
|
||||||
sandbox test.py:
|
sandbox test.py:
|
||||||
variables:
|
variables:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user