Am 2. Mai 2025 04:50:19 MESZ schrieb Simon Glass <[email protected]>: >Now that the hooks are present, make use of them directly rather than >cloning the separate repo. > >Signed-off-by: Simon Glass <[email protected]>
Using the same git repo makes testing changes in the test hooks much easier. Acked-by: Heinrich Schuchardt <[email protected]> >--- > > .azure-pipelines.yml | 15 +++++++-------- > .gitlab-ci.yml | 16 +++++++--------- > 2 files changed, 14 insertions(+), 17 deletions(-) > >diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml >index a00ee67f297..bf50727ea55 100644 >--- a/.azure-pipelines.yml >+++ b/.azure-pipelines.yml >@@ -251,13 +251,12 @@ stages: > # the below corresponds to .gitlab-ci.yml "before_script" > cd \${WORK_DIR} > git config --global --add safe.directory \${WORK_DIR} >- git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks >/tmp/uboot-test-hooks > # qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with > NET_LWIP enabled. > # The test config and the boardenv file from qemu_arm64 can be > re-used so create symlinks >- ln -s conf.qemu_arm64_na >/tmp/uboot-test-hooks/bin/travis-ci/conf.qemu_arm64_lwip_na >- ln -s u_boot_boardenv_qemu_arm64_na.py >/tmp/uboot-test-hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py >- ln -s travis-ci /tmp/uboot-test-hooks/bin/\`hostname\` >- ln -s travis-ci /tmp/uboot-test-hooks/py/\`hostname\` >+ ln -s conf.qemu_arm64_na >test/hooks/bin/travis-ci/conf.qemu_arm64_lwip_na >+ ln -s u_boot_boardenv_qemu_arm64_na.py >test/hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py >+ ln -s travis-ci test/hooks/bin/\`hostname\` >+ ln -s travis-ci test/hooks/py/\`hostname\` > if [[ "\${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then > wget -O - > https://github.com/riscv-software-src/opensbi/releases/download/v1.3.1/opensbi-1.3.1-rv-bin.tar.xz > | tar -C /tmp -xJ; > export > OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin; >@@ -307,12 +306,12 @@ 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 >- export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:\${PATH} >- export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci >+ export PATH=/opt/qemu/bin:test/hooks/bin:\${PATH} >+ export PYTHONPATH=test/hooks/py/travis-ci > # "\${var:+"-k \$var"}" expands to "" if \$var is empty, "-k \$var" > if not > ./test/py/test.py -ra -o > cache_dir="\$UBOOT_TRAVIS_BUILD_DIR"/.pytest_cache --bd \${TEST_PY_BD} > \${TEST_PY_ID} \${TEST_PY_EXTRA} \${TEST_PY_TEST_SPEC:+"-k > \${TEST_PY_TEST_SPEC}"} --build-dir "\$UBOOT_TRAVIS_BUILD_DIR" --report-dir > "\$UBOOT_TRAVIS_BUILD_DIR" > --junitxml=\$(System.DefaultWorkingDirectory)/results.xml > # the below corresponds to .gitlab-ci.yml "after_script" >- rm -rf /tmp/uboot-test-hooks /tmp/venv >+ rm -rf /tmp/venv > EOF > - task: CopyFiles@2 > displayName: 'Copy test.sh for later usage' >diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml >index 9f69895efd8..ba9ca5fb9e0 100644 >--- a/.gitlab-ci.yml >+++ b/.gitlab-ci.yml >@@ -30,15 +30,13 @@ stages: > rules: > - when: always > before_script: >- # Clone uboot-test-hooks > - git config --global --add safe.directory "${CI_PROJECT_DIR}" >- - git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks >/tmp/uboot-test-hooks > # qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP > enabled. > # The test config and the boardenv file from qemu_arm64 can be re-used so > create symlinks >- - ln -s conf.qemu_arm64_na >/tmp/uboot-test-hooks/bin/travis-ci/conf.qemu_arm64_lwip_na >- - ln -s u_boot_boardenv_qemu_arm64_na.py >/tmp/uboot-test-hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py >- - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname` >- - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname` >+ - ln -s conf.qemu_arm64_na >test/hooks/bin/travis-ci/conf.qemu_arm64_lwip_na >+ - ln -s u_boot_boardenv_qemu_arm64_na.py >test/hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py >+ - ln -s travis-ci test/hooks/bin/`hostname` >+ - ln -s travis-ci test/hooks/py/`hostname` > - if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then > wget -O - > https://github.com/riscv-software-src/opensbi/releases/download/v1.3.1/opensbi-1.3.1-rv-bin.tar.xz > | tar -C /tmp -xJ; > export > OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin; >@@ -60,7 +58,7 @@ stages: > > after_script: > - cp -v /tmp/${TEST_PY_BD}/*.{html,css,xml} . >- - rm -rf /tmp/uboot-test-hooks /tmp/venv >+ - rm -rf /tmp/venv > script: > # If we've been asked to use clang only do one configuration. > - export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD} >@@ -93,8 +91,8 @@ stages: > /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 > # "${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; >+ - export PATH=/opt/qemu/bin:test/hooks/bin:${PATH}; >+ export PYTHONPATH=test/hooks/py/travis-ci; > ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_EXTRA} > ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} > --build-dir "$UBOOT_TRAVIS_BUILD_DIR"

