mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
Merge patch series "Rework requirements.txt files"
Tom Rini <trini@konsulko.com> says: A challenge we've run in to is making it easier for more people to use various python tools that we include in the tree. Part of the problem is that when we have a requirements.txt file, aside from the doc one we share with the kernel, I created it using "pip freeze". And while this might have been a best (or at least OK) practice at the time, that's no longer the case and is why our files have so many things in them. What this series does is create multiple files, one per project/tool and then has CI install them as needed. There's a few places here where this means that we update the requirements as well, but we keep a few big things where they are currently. This is because updating them introduces problems of their own and delaing with that would best be a follow up series. I've put this through GitLab and Azure to make sure everything is still going fine on both platforms. Link: https://lore.kernel.org/r/20250205000743.949790-1-trini@konsulko.com
This commit is contained in:
@@ -134,8 +134,11 @@ stages:
|
||||
export USER=azure
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
pip install -r test/py/requirements.txt
|
||||
pip install -r tools/buildman/requirements.txt
|
||||
pip install -r test/py/requirements.txt \
|
||||
-r tools/binman/requirements.txt \
|
||||
-r tools/buildman/requirements.txt \
|
||||
-r tools/patman/requirements.txt \
|
||||
-r tools/u_boot_pylib/requirements.txt
|
||||
export UBOOT_TRAVIS_BUILD_DIR=/tmp/tools-only
|
||||
export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
|
||||
export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
|
||||
@@ -163,9 +166,14 @@ stages:
|
||||
- script: |
|
||||
git config --global --add safe.directory $(work_dir)
|
||||
export USER=azure
|
||||
pip install -r test/py/requirements.txt
|
||||
pip install -r tools/buildman/requirements.txt
|
||||
pip install asteval pylint==2.12.2 pyopenssl
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
pip install -r test/py/requirements.txt \
|
||||
-r tools/binman/requirements.txt \
|
||||
-r tools/buildman/requirements.txt \
|
||||
-r tools/patman/requirements.txt \
|
||||
-r tools/u_boot_pylib/requirements.txt \
|
||||
asteval pylint==2.12.2 pyopenssl
|
||||
export PATH=${PATH}:~/.local/bin
|
||||
echo "[MASTER]" >> .pylintrc
|
||||
echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
|
||||
@@ -265,7 +273,13 @@ stages:
|
||||
if [ -n "\${BUILD_ENV}" ]; then
|
||||
export \${BUILD_ENV};
|
||||
fi
|
||||
pip install -r tools/buildman/requirements.txt
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
pip install -r tools/binman/requirements.txt \
|
||||
-r tools/buildman/requirements.txt \
|
||||
-r test/py/requirements.txt \
|
||||
-r tools/u_boot_pylib/requirements.txt \
|
||||
pytest-azurepipelines
|
||||
tools/buildman/buildman -o \${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board \${TEST_PY_BD} \${OVERRIDE}
|
||||
cp /opt/grub/grub_x86.efi \${UBOOT_TRAVIS_BUILD_DIR}/
|
||||
cp /opt/grub/grub_x64.efi \${UBOOT_TRAVIS_BUILD_DIR}/
|
||||
@@ -289,10 +303,6 @@ stages:
|
||||
/opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload;
|
||||
/opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom add-flat-binary -f \${UBOOT_TRAVIS_BUILD_DIR}/u-boot.bin -n fallback/payload -c LZMA -l 0x1110000 -e 0x1110000;
|
||||
fi
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
pip install -r test/py/requirements.txt
|
||||
pip install pytest-azurepipelines
|
||||
export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:\${PATH}
|
||||
export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci
|
||||
# "\${var:+"-k \$var"}" expands to "" if \$var is empty, "-k \$var" if not
|
||||
@@ -582,7 +592,10 @@ stages:
|
||||
# make environment variables available as tests are running inside a container
|
||||
export BUILDMAN="${BUILDMAN}"
|
||||
git config --global --add safe.directory ${WORK_DIR}
|
||||
pip install -r tools/buildman/requirements.txt
|
||||
virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
. /tmp/venv/bin/activate
|
||||
pip install -r tools/binman/requirements.txt \
|
||||
-r tools/buildman/requirements.txt
|
||||
EOF
|
||||
cat << "EOF" >> build.sh
|
||||
if [[ "${BUILDMAN}" != "" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user