[PATCH 3/6] CI: Consistently install our requirements.txt files
Tom Rini
trini at konsulko.com
Wed Feb 5 00:12:06 CET 2025
We should install all of our requirements.txt files after starting the
virtualenv rather than ad-hoc throughout each test.
Signed-off-by: Tom Rini <trini at konsulko.com>
---
.azure-pipelines.yml | 13 +++++++++++--
.gitlab-ci.yml | 14 ++++++++++++--
2 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 00a78be89441..3e464375b260 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -134,7 +134,10 @@ stages:
virtualenv -p /usr/bin/python3 /tmp/venv
. /tmp/venv/bin/activate
pip install -r test/py/requirements.txt
+ pip install -r tools/binman/requirements.txt
pip install -r tools/buildman/requirements.txt
+ pip install -r tools/patman/requirements.txt
+ pip install -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}
@@ -165,7 +168,10 @@ stages:
virtualenv -p /usr/bin/python3 /tmp/venv
. /tmp/venv/bin/activate
pip install -r test/py/requirements.txt
+ pip install -r tools/binman/requirements.txt
pip install -r tools/buildman/requirements.txt
+ pip install -r tools/patman/requirements.txt
+ pip install -r tools/u_boot_pylib/requirements.txt
pip install asteval pylint==2.12.2 pyopenssl
export PATH=${PATH}:~/.local/bin
echo "[MASTER]" >> .pylintrc
@@ -268,7 +274,11 @@ stages:
fi
virtualenv -p /usr/bin/python3 /tmp/venv
. /tmp/venv/bin/activate
+ pip install -r tools/binman/requirements.txt
pip install -r tools/buildman/requirements.txt
+ pip install -r test/py/requirements.txt
+ pip install -r tools/u_boot_pylib/requirements.txt
+ pip install 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}/
@@ -292,8 +302,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
- 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
@@ -585,6 +593,7 @@ stages:
git config --global --add safe.directory ${WORK_DIR}
virtualenv -p /usr/bin/python3 /tmp/venv
. /tmp/venv/bin/activate
+ pip install -r tools/binman/requirements.txt
pip install -r tools/buildman/requirements.txt
EOF
cat << "EOF" >> build.sh
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9f68c440245d..0308d6d70dfe 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -58,6 +58,10 @@ stages:
# Prepare python environment
- virtualenv -p /usr/bin/python3 /tmp/venv;
. /tmp/venv/bin/activate;
+ pip install -r test/py/requirements.txt;
+ pip install -r tools/binman/requirements.txt;
+ pip install -r tools/buildman/requirements.txt;
+ pip install -r tools/u_boot_pylib/requirements.txt;
after_script:
- cp -v /tmp/${TEST_PY_BD}/*.{html,css,xml} .
@@ -93,7 +97,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
- - pip install -r test/py/requirements.txt
# "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
- export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
@@ -124,9 +127,10 @@ build all platforms in a single job:
# Prepare python environment
- virtualenv -p /usr/bin/python3 /tmp/venv;
. /tmp/venv/bin/activate;
+ pip install -r tools/binman/requirements.txt;
+ pip install -r tools/buildman/requirements.txt
- ret=0;
git config --global --add safe.directory "${CI_PROJECT_DIR}";
- pip install -r tools/buildman/requirements.txt;
./tools/buildman/buildman -o /tmp -PEWM -x xtensa || ret=$?;
if [[ $ret -ne 0 ]]; then
./tools/buildman/buildman -o /tmp -seP;
@@ -184,7 +188,10 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
virtualenv -p /usr/bin/python3 /tmp/venv;
. /tmp/venv/bin/activate;
pip install -r test/py/requirements.txt;
+ pip install -r tools/binman/requirements.txt;
pip install -r tools/buildman/requirements.txt;
+ pip install -r tools/patman/requirements.txt;
+ pip install -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}";
@@ -206,7 +213,10 @@ Run pylint:
- virtualenv -p /usr/bin/python3 /tmp/venv
- . /tmp/venv/bin/activate
- pip install -r test/py/requirements.txt
+ - pip install -r tools/binman/requirements.txt
- pip install -r tools/buildman/requirements.txt
+ - pip install -r tools/patman/requirements.txt
+ - pip install -r tools/u_boot_pylib/requirements.txt
- pip install asteval pylint==2.12.2 pyopenssl
- export PATH=${PATH}:~/.local/bin
- echo "[MASTER]" >> .pylintrc
--
2.43.0
More information about the U-Boot
mailing list