mirror of
https://xff.cz/git/u-boot/
synced 2025-08-31 16:22:36 +02:00
Azure / GitLab / Travis: Add Kconfig unit tests to a job
The Kconfig language provides a unit test that can be run. As these require pytest to be installed and run very quickly, bundle them in to an existing CI job. Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
@@ -120,7 +120,7 @@ jobs:
|
|||||||
make tools-only_config envtools -j$(nproc)
|
make tools-only_config envtools -j$(nproc)
|
||||||
|
|
||||||
- job: utils
|
- job: utils
|
||||||
displayName: 'Run binman, buildman, dtoc and patman testsuites'
|
displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites'
|
||||||
pool:
|
pool:
|
||||||
vmImage: $(ubuntu_vm)
|
vmImage: $(ubuntu_vm)
|
||||||
steps:
|
steps:
|
||||||
@@ -135,7 +135,7 @@ jobs:
|
|||||||
export USER=azure
|
export USER=azure
|
||||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||||
. /tmp/venv/bin/activate
|
. /tmp/venv/bin/activate
|
||||||
pip install pyelftools
|
pip install pyelftools pytest
|
||||||
export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl
|
export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl
|
||||||
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
||||||
export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
|
export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
|
||||||
@@ -144,6 +144,7 @@ jobs:
|
|||||||
./tools/buildman/buildman -t
|
./tools/buildman/buildman -t
|
||||||
./tools/dtoc/dtoc -t
|
./tools/dtoc/dtoc -t
|
||||||
./tools/patman/patman --test
|
./tools/patman/patman --test
|
||||||
|
make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig
|
||||||
EOF
|
EOF
|
||||||
cat build.sh
|
cat build.sh
|
||||||
# We cannot use "container" like other jobs above, as buildman
|
# We cannot use "container" like other jobs above, as buildman
|
||||||
|
@@ -157,7 +157,7 @@ Build envtools:
|
|||||||
script:
|
script:
|
||||||
- make tools-only_config envtools -j$(nproc)
|
- make tools-only_config envtools -j$(nproc)
|
||||||
|
|
||||||
Run binman, buildman, dtoc and patman testsuites:
|
Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||||
tags: [ 'all' ]
|
tags: [ 'all' ]
|
||||||
stage: testsuites
|
stage: testsuites
|
||||||
script:
|
script:
|
||||||
@@ -166,7 +166,7 @@ Run binman, buildman, dtoc and patman testsuites:
|
|||||||
export USER=gitlab;
|
export USER=gitlab;
|
||||||
virtualenv -p /usr/bin/python3 /tmp/venv;
|
virtualenv -p /usr/bin/python3 /tmp/venv;
|
||||||
. /tmp/venv/bin/activate;
|
. /tmp/venv/bin/activate;
|
||||||
pip install pyelftools;
|
pip install pyelftools pytest;
|
||||||
export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl;
|
export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl;
|
||||||
export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
|
export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
|
||||||
export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
|
export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
|
||||||
@@ -174,7 +174,8 @@ Run binman, buildman, dtoc and patman testsuites:
|
|||||||
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
|
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
|
||||||
./tools/buildman/buildman -t;
|
./tools/buildman/buildman -t;
|
||||||
./tools/dtoc/dtoc -t;
|
./tools/dtoc/dtoc -t;
|
||||||
./tools/patman/patman --test
|
./tools/patman/patman --test;
|
||||||
|
make testconfig
|
||||||
|
|
||||||
# Test sandbox with test.py
|
# Test sandbox with test.py
|
||||||
sandbox test.py:
|
sandbox test.py:
|
||||||
|
@@ -152,7 +152,8 @@ script:
|
|||||||
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test &&
|
./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test &&
|
||||||
./tools/patman/patman --test &&
|
./tools/patman/patman --test &&
|
||||||
./tools/buildman/buildman -t &&
|
./tools/buildman/buildman -t &&
|
||||||
./tools/dtoc/dtoc -t;
|
./tools/dtoc/dtoc -t &&
|
||||||
|
make testconfig;
|
||||||
fi;
|
fi;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user