1variables: 2 windows_vm: windows-2022 3 ubuntu_vm: ubuntu-24.04 4 macos_vm: macOS-14 5 ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20250404-29Apr2025 6 # Add '-u 0' options for Azure pipelines, otherwise we get "permission 7 # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer", 8 # since our $(ci_runner_image) user is not root. 9 container_option: -u 0 10 work_dir: /u 11 # We define all of these as variables so we can easily reference them twice 12 am33xx_kirkwood_ls1_mvebu_omap: "am33xx kirkwood ls1 mvebu omap -x siemens,freescale" 13 amlogic_bcm_boundary_engicam_siemens_technexion_oradex: "amlogic bcm boundary engicam siemens technexion toradex -x mips" 14 arm_nxp_minus_imx_and_at91: "at91 freescale -x powerpc,m68k,imx,mx" 15 imx: "mx imx -x boundary,engicam,technexion,toradex" 16 rk: "rk" 17 sunxi: "sunxi" 18 powerpc: "powerpc" 19 arm_catch_all: "arm -x aarch64,am33xx,at91,bcm,ls1,kirkwood,mvebu,omap,rk,siemens,mx,sunxi,technexion,toradex" 20 aarch64_catch_all: "aarch64 -x amlogic,bcm,engicam,imx,ls1,ls2,lx216,mvebu,rk,siemens,sunxi,toradex" 21 everything_but_arm_and_powerpc: "arc m68k microblaze mips nios2 riscv sandbox sh x86 xtensa -x arm,powerpc" 22 23stages: 24- stage: testsuites 25 jobs: 26 - job: tools_only_windows 27 displayName: 'Ensure host tools build for Windows' 28 pool: 29 vmImage: $(windows_vm) 30 steps: 31 - powershell: | 32 (New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2021-06-04/msys2-base-x86_64-20210604.sfx.exe", "sfx.exe") 33 displayName: 'Install MSYS2' 34 - script: | 35 sfx.exe -y -o%CD:~0,2%\ 36 %CD:~0,2%\msys64\usr\bin\bash -lc " " 37 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu" 38 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu" 39 displayName: 'Update MSYS2' 40 - script: | 41 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy make gcc bison flex diffutils openssl-devel libgnutls-devel libutil-linux-devel" 42 displayName: 'Install Toolchain' 43 - script: | 44 echo make tools-only_defconfig tools-only > build-tools.sh 45 %CD:~0,2%\msys64\usr\bin\bash -lc "bash build-tools.sh" 46 displayName: 'Build Host Tools' 47 env: 48 # Tell MSYS2 we need a POSIX emulation layer 49 MSYSTEM: MSYS 50 # Tell MSYS2 not to ‘cd’ our startup directory to HOME 51 CHERE_INVOKING: yes 52 53 - job: tools_only_macOS 54 displayName: 'Ensure host tools build for macOS X' 55 pool: 56 vmImage: $(macos_vm) 57 steps: 58 - script: brew install make ossp-uuid 59 displayName: Brew install dependencies 60 - script: | 61 gmake tools-only_config tools-only \ 62 HOSTCFLAGS="-I/usr/local/opt/openssl@1.1/include" \ 63 HOSTLDFLAGS="-L/usr/local/opt/openssl@1.1/lib" \ 64 -j$(sysctl -n hw.logicalcpu) 65 displayName: 'Perform tools-only build' 66 67 - job: check_for_new_CONFIG_symbols_outside_Kconfig 68 displayName: 'Check for new CONFIG symbols outside Kconfig' 69 pool: 70 vmImage: $(ubuntu_vm) 71 container: 72 image: $(ci_runner_image) 73 options: $(container_option) 74 steps: 75 # If grep succeeds and finds a match the test fails as we should 76 # have no matches. 77 - script: git grep -E '^#[[:blank:]]*(define|undef)[[:blank:]]*CONFIG_' 78 :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h 79 :^include/linux/kconfig.h :^tools/ :^dts/upstream/ 80 :^lib/mbedtls/external :^lib/mbedtls/mbedtls_def_config.h && 81 exit 1 || exit 0 82 83 - job: docs 84 displayName: 'Build documentation' 85 pool: 86 vmImage: $(ubuntu_vm) 87 container: 88 image: $(ci_runner_image) 89 options: $(container_option) 90 steps: 91 - script: | 92 set -e 93 python3 -m venv /tmp/venvhtml 94 . /tmp/venvhtml/bin/activate 95 pip install -r doc/sphinx/requirements.txt -r test/py/requirements.txt 96 make htmldocs KDOC_WERROR=1 97 make infodocs 98 99 - job: maintainers 100 displayName: 'Ensure all configs have MAINTAINERS entries' 101 pool: 102 vmImage: $(ubuntu_vm) 103 container: 104 image: $(ci_runner_image) 105 options: $(container_option) 106 steps: 107 - script: | 108 ./tools/buildman/buildman --maintainer-check 109 110 - job: tools_only 111 displayName: 'Ensure host tools and env tools build' 112 pool: 113 vmImage: $(ubuntu_vm) 114 container: 115 image: $(ci_runner_image) 116 options: $(container_option) 117 steps: 118 - script: | 119 make tools-only_config tools-only -j$(nproc) 120 make mrproper 121 make tools-only_config envtools -j$(nproc) 122 123 - job: utils 124 displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites' 125 pool: 126 vmImage: $(ubuntu_vm) 127 steps: 128 - script: | 129 cat << "EOF" > build.sh 130 cd $(work_dir) 131 git config --global user.name "Azure Pipelines" 132 git config --global user.email bmeng.cn@gmail.com 133 git config --global --add safe.directory $(work_dir) 134 export USER=azure 135 python3 -m venv /tmp/venv 136 . /tmp/venv/bin/activate 137 pip install -r test/py/requirements.txt \ 138 -r tools/binman/requirements.txt \ 139 -r tools/buildman/requirements.txt \ 140 -r tools/patman/requirements.txt \ 141 -r tools/u_boot_pylib/requirements.txt 142 export UBOOT_TRAVIS_BUILD_DIR=/tmp/tools-only 143 export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt 144 export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH} 145 ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board tools-only 146 set -ex 147 export TOOLPATH="--toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools --toolpath /opt/coreboot" 148 ./tools/binman/binman ${TOOLPATH} tool -f missing 149 ./tools/binman/binman ${TOOLPATH} test 150 # Avoid "Permission denied: 'cov'" error by using a temporary file 151 COVERAGE_FILE=/tmp/.coverage ./tools/binman/binman ${TOOLPATH} test -T 152 ./tools/buildman/buildman -t 153 ./tools/dtoc/dtoc -t 154 ./tools/patman/patman test 155 make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig 156 EOF 157 cat build.sh 158 # We cannot use "container" like other jobs above, as buildman 159 # seems to hang forever with pre-configured "container" environment 160 docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh 161 162 - job: pylint 163 displayName: Check for any pylint regressions 164 pool: 165 vmImage: $(ubuntu_vm) 166 container: 167 image: $(ci_runner_image) 168 options: $(container_option) 169 steps: 170 - script: | 171 git config --global --add safe.directory $(work_dir) 172 export USER=azure 173 python3 -m venv /tmp/venv 174 . /tmp/venv/bin/activate 175 pip install -r test/py/requirements.txt \ 176 -r tools/binman/requirements.txt \ 177 -r tools/buildman/requirements.txt \ 178 -r tools/patman/requirements.txt \ 179 -r tools/u_boot_pylib/requirements.txt \ 180 asteval pylint==3.3.4 pyopenssl 181 export PATH=${PATH}:~/.local/bin 182 echo "[MASTER]" >> .pylintrc 183 echo "load-plugins=pylint.extensions.docparams" >> .pylintrc 184 export UBOOT_TRAVIS_BUILD_DIR=/tmp/tools-only 185 ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board tools-only 186 set -ex 187 pylint --version 188 export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt 189 make pylint_err 190 191 - job: check_for_pre_schema_tags 192 displayName: 'Check for pre-schema driver model tags' 193 pool: 194 vmImage: $(ubuntu_vm) 195 container: 196 image: $(ci_runner_image) 197 options: $(container_option) 198 steps: 199 # If grep succeeds and finds a match the test fails as we should 200 # have no matches. 201 - script: git grep u-boot,dm- -- '*.dts*' && exit 1 || exit 0 202 203 - job: check_packing_of_python_tools 204 displayName: 'Check we can package the Python tools' 205 pool: 206 vmImage: $(ubuntu_vm) 207 container: 208 image: $(ci_runner_image) 209 options: $(container_option) 210 steps: 211 - script: make pip 212 213 - job: count_built_machines 214 displayName: 'Ensure we build all possible machines' 215 pool: 216 vmImage: $(ubuntu_vm) 217 container: 218 image: $(ci_runner_image) 219 options: $(container_option) 220 steps: 221 - script: | 222 BMANARGS="-o /tmp --dry-run -v" 223 # First get the total number of boards 224 total=$(tools/buildman/buildman ${BMANARGS} | grep "Total boards to build for each commit" | cut -d ' ' -f 8) 225 # Now build up the list of what each job built. 226 built="$(tools/buildman/buildman ${BMANARGS} $(am33xx_kirkwood_ls1_mvebu_omap) | grep '^ ')" 227 built="$built $(tools/buildman/buildman ${BMANARGS} $(amlogic_bcm_boundary_engicam_siemens_technexion_oradex) | grep '^ ')" 228 built="$built $(tools/buildman/buildman ${BMANARGS} $(arm_nxp_minus_imx_and_at91) | grep '^ ')" 229 built="$built $(tools/buildman/buildman ${BMANARGS} $(imx) | grep '^ ')" 230 built="$built $(tools/buildman/buildman ${BMANARGS} $(rk) | grep '^ ')" 231 built="$built $(tools/buildman/buildman ${BMANARGS} $(sunxi) | grep '^ ')" 232 built="$built $(tools/buildman/buildman ${BMANARGS} $(powerpc) | grep '^ ')" 233 built="$built $(tools/buildman/buildman ${BMANARGS} $(arm_catch_all) | grep '^ ')" 234 built="$built $(tools/buildman/buildman ${BMANARGS} $(aarch64_catch_all) | grep '^ ')" 235 built="$built $(tools/buildman/buildman ${BMANARGS} $(everything_but_arm_and_powerpc) | grep '^ ')" 236 # Finally see how many machines that is. 237 actual=$(tools/buildman/buildman ${BMANARGS} $built | grep "Total boards to build for each commit" | cut -d ' ' -f 8) 238 echo We would build a total of $actual out of $total platforms this CI run 239 [ $actual -eq $total ] && exit 0 || exit 1 240 241 - job: create_test_py_wrapper_script 242 displayName: 'Create and stage a wrapper for test.py runs' 243 pool: 244 vmImage: $(ubuntu_vm) 245 steps: 246 - checkout: none 247 - script: | 248 cat << EOF > test.sh 249 #!/bin/bash 250 set -ex 251 # the below corresponds to .gitlab-ci.yml "before_script" 252 cd \${WORK_DIR} 253 git config --global --add safe.directory \${WORK_DIR} 254 git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks 255 # qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled. 256 # The test config and the boardenv file from qemu_arm64 can be re-used so create symlinks 257 ln -s conf.qemu_arm64_na /tmp/uboot-test-hooks/bin/travis-ci/conf.qemu_arm64_lwip_na 258 ln -s u_boot_boardenv_qemu_arm64_na.py /tmp/uboot-test-hooks/py/travis-ci/u_boot_boardenv_qemu_arm64_lwip_na.py 259 ln -s travis-ci /tmp/uboot-test-hooks/bin/\`hostname\` 260 ln -s travis-ci /tmp/uboot-test-hooks/py/\`hostname\` 261 if [[ "\${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then 262 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; 263 export OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin; 264 fi 265 if [[ "\${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "\${TEST_PY_BD}" == "sifive_unleashed" ]]; then 266 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; 267 export OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin; 268 fi 269 if [[ "\${TEST_PY_BD}" == "qemu-arm-sbsa" ]]; then 270 wget -O /tmp/bl1.bin https://artifacts.codelinaro.org/artifactory/linaro-419-sbsa-ref/latest/tf-a/bl1.bin; 271 wget -O /tmp/fip.bin https://artifacts.codelinaro.org/artifactory/linaro-419-sbsa-ref/latest/tf-a/fip.bin; 272 export BINMAN_INDIRS=/tmp 273 fi 274 # the below corresponds to .gitlab-ci.yml "script" 275 cd \${WORK_DIR} 276 export UBOOT_TRAVIS_BUILD_DIR=/tmp/\${TEST_PY_BD} 277 if [ -n "\${BUILD_ENV}" ]; then 278 export \${BUILD_ENV}; 279 fi 280 python3 -m venv /tmp/venv 281 . /tmp/venv/bin/activate 282 pip install -r tools/binman/requirements.txt \ 283 -r tools/buildman/requirements.txt \ 284 -r test/py/requirements.txt \ 285 -r tools/u_boot_pylib/requirements.txt \ 286 pytest-azurepipelines 287 tools/buildman/buildman -o \${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board \${TEST_PY_BD} \${OVERRIDE} 288 cp /opt/grub/grub_x86.efi \${UBOOT_TRAVIS_BUILD_DIR}/ 289 cp /opt/grub/grub_x64.efi \${UBOOT_TRAVIS_BUILD_DIR}/ 290 cp /opt/grub/grubriscv64.efi \${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi 291 cp /opt/grub/grubaa64.efi \${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi 292 cp /opt/grub/grubarm.efi \${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi 293 # create sdcard / spi-nor images for sifive unleashed using genimage 294 if [[ "\${TEST_PY_BD}" == "sifive_unleashed" ]]; then 295 mkdir -p root; 296 cp \${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .; 297 cp \${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .; 298 rm -rf tmp; 299 genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg; 300 cp images/sdcard.img \${UBOOT_TRAVIS_BUILD_DIR}/; 301 rm -rf tmp; 302 genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg; 303 cp images/spi-nor.img \${UBOOT_TRAVIS_BUILD_DIR}/; 304 fi 305 if [[ "\${TEST_PY_BD}" == "coreboot" ]]; then 306 cp /opt/coreboot/coreboot.rom \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom; 307 /opt/coreboot/cbfstool \${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload; 308 /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; 309 fi 310 # If we have TF-A binaries, we need to use them. 311 if [[ -d /opt/tf-a/"\${TEST_PY_BD}" ]]; then 312 cp /opt/tf-a/"\${TEST_PY_BD}"/fip.bin /opt/tf-a/"\${TEST_PY_BD}"/bl1.bin /tmp; 313 export fip=/tmp/fip.bin; 314 export bl1=/tmp/bl1.bin; 315 export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:\${PATH}; 316 fi 317 export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:\${PATH} 318 export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci 319 # "\${var:+"-k \$var"}" expands to "" if \$var is empty, "-k \$var" if not 320 ./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 321 # the below corresponds to .gitlab-ci.yml "after_script" 322 rm -rf /tmp/uboot-test-hooks /tmp/venv 323 EOF 324 - task: CopyFiles@2 325 displayName: 'Copy test.sh for later usage' 326 inputs: 327 contents: 'test.sh' 328 targetFolder: '$(Build.ArtifactStagingDirectory)' 329 - publish: '$(Build.ArtifactStagingDirectory)/test.sh' 330 displayName: 'Publish test.sh' 331 artifact: testsh 332 333- stage: test_py_sandbox 334 jobs: 335 - job: test_py_sandbox 336 displayName: 'test.py for sandbox' 337 pool: 338 vmImage: $(ubuntu_vm) 339 strategy: 340 matrix: 341 sandbox: 342 TEST_PY_BD: "sandbox" 343 TEST_PY_EXTRA: "--timing" 344 sandbox_asan: 345 TEST_PY_BD: "sandbox" 346 OVERRIDE: "-a ASAN" 347 TEST_PY_TEST_SPEC: "version" 348 sandbox_clang: 349 TEST_PY_BD: "sandbox" 350 OVERRIDE: "-O clang-18" 351 sandbox_clang_asan: 352 TEST_PY_BD: "sandbox" 353 OVERRIDE: "-O clang-18 -a ASAN" 354 TEST_PY_TEST_SPEC: "version" 355 sandbox64: 356 TEST_PY_BD: "sandbox64" 357 sandbox64_clang: 358 TEST_PY_BD: "sandbox64" 359 OVERRIDE: "-O clang-18" 360 sandbox64_lwip: 361 TEST_PY_BD: "sandbox64_lwip" 362 sandbox_spl: 363 TEST_PY_BD: "sandbox_spl" 364 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl" 365 sandbox_vpl: 366 TEST_PY_BD: "sandbox_vpl" 367 TEST_PY_TEST_SPEC: "vpl or test_spl" 368 sandbox_noinst: 369 TEST_PY_BD: "sandbox_noinst" 370 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl" 371 sandbox_noinst_load_fit_full: 372 TEST_PY_BD: "sandbox_noinst" 373 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl" 374 OVERRIDE: "-a CONFIG_SPL_LOAD_FIT_FULL=y" 375 sandbox_flattree: 376 TEST_PY_BD: "sandbox_flattree" 377 sandbox_trace: 378 TEST_PY_BD: "sandbox" 379 BUILD_ENV: "FTRACE=1 NO_LTO=1" 380 TEST_PY_TEST_SPEC: "trace" 381 OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000" 382 steps: 383 - download: current 384 artifact: testsh 385 - script: | 386 # make current directory writeable to uboot user inside the container 387 # as sandbox testing need create files like spi flash images, etc. 388 # (TODO: clean up this in the future) 389 chmod 777 . 390 chmod 755 $(Pipeline.Workspace)/testsh/test.sh 391 # Filesystem tests need extra docker args to run 392 set -- 393 # mount -o loop needs the loop devices 394 if modprobe loop; then 395 for d in $(find /dev -maxdepth 1 -name 'loop*'); do 396 set -- "$@" --device $d:$d 397 done 398 fi 399 # Needed for mount syscall (for guestmount as well) 400 set -- "$@" --cap-add SYS_ADMIN 401 # Default apparmor profile denies mounts 402 set -- "$@" --security-opt apparmor=unconfined 403 # Some tests using libguestfs-tools need the fuse device to run 404 docker run "$@" --device /dev/fuse:/dev/fuse \ 405 -v $PWD:$(work_dir) \ 406 -v $(Pipeline.Workspace):$(Pipeline.Workspace) \ 407 -v $(System.DefaultWorkingDirectory):$(System.DefaultWorkingDirectory) \ 408 -e WORK_DIR="${WORK_DIR}" \ 409 -e TEST_PY_BD="${TEST_PY_BD}" \ 410 -e TEST_PY_ID="${TEST_PY_ID}" \ 411 -e TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}" \ 412 -e OVERRIDE="${OVERRIDE}" \ 413 -e BUILD_ENV="${BUILD_ENV}" $(ci_runner_image) \ 414 $(Pipeline.Workspace)/testsh/test.sh 415 - task: PublishTestResults@2 416 inputs: 417 testResultsFormat: 'JUnit' 418 testResultsFiles: 'results.xml' 419 420- stage: test_py_qemu 421 jobs: 422 - job: test_py_qemu 423 displayName: 'test.py for QEMU platforms' 424 pool: 425 vmImage: $(ubuntu_vm) 426 strategy: 427 matrix: 428 coreboot: 429 TEST_PY_BD: "coreboot" 430 TEST_PY_ID: "--id qemu" 431 TEST_PY_TEST_SPEC: "not sleep" 432 evb_ast2500: 433 TEST_PY_BD: "evb-ast2500" 434 TEST_PY_ID: "--id qemu" 435 TEST_PY_TEST_SPEC: "not sleep" 436 vexpress_ca9x4: 437 TEST_PY_BD: "vexpress_ca9x4" 438 TEST_PY_ID: "--id qemu" 439 TEST_PY_TEST_SPEC: "not sleep" 440 vexpress_fvp: 441 TEST_PY_BD: "vexpress_fvp" 442 TEST_PY_TEST_SPEC: "not sleep and not hostfs" 443 vexpress_fvp_bloblist: 444 TEST_PY_BD: "vexpress_fvp_bloblist" 445 TEST_PY_TEST_SPEC: "not sleep and not hostfs" 446 integratorcp_cm926ejs: 447 TEST_PY_BD: "integratorcp_cm926ejs" 448 TEST_PY_ID: "--id qemu" 449 TEST_PY_TEST_SPEC: "not sleep" 450 qemu_arm: 451 TEST_PY_BD: "qemu_arm" 452 TEST_PY_TEST_SPEC: "not sleep" 453 qemu_arm64: 454 TEST_PY_BD: "qemu_arm64" 455 TEST_PY_TEST_SPEC: "not sleep" 456 qemu_arm64_lwip: 457 TEST_PY_BD: "qemu_arm64_lwip" 458 TEST_PY_TEST_SPEC: "test_net_dhcp or test_net_ping or test_net_tftpboot" 459 qemu_arm_sbsa_ref: 460 TEST_PY_BD: "qemu-arm-sbsa" 461 TEST_PY_TEST_SPEC: "not sleep" 462 qemu_m68k: 463 TEST_PY_BD: "M5208EVBE" 464 TEST_PY_ID: "--id qemu" 465 TEST_PY_TEST_SPEC: "not sleep and not efi" 466 OVERRIDE: "-a CONFIG_M68K_QEMU=y -a ~CONFIG_MCFTMR" 467 qemu_malta: 468 TEST_PY_BD: "malta" 469 TEST_PY_ID: "--id qemu" 470 TEST_PY_TEST_SPEC: "not sleep and not efi" 471 qemu_maltael: 472 TEST_PY_BD: "maltael" 473 TEST_PY_ID: "--id qemu" 474 TEST_PY_TEST_SPEC: "not sleep and not efi" 475 qemu_malta64: 476 TEST_PY_BD: "malta64" 477 TEST_PY_ID: "--id qemu" 478 TEST_PY_TEST_SPEC: "not sleep and not efi" 479 qemu_malta64el: 480 TEST_PY_BD: "malta64el" 481 TEST_PY_ID: "--id qemu" 482 TEST_PY_TEST_SPEC: "not sleep and not efi" 483 qemu_ppce500: 484 TEST_PY_BD: "qemu-ppce500" 485 TEST_PY_TEST_SPEC: "not sleep" 486 qemu_riscv32: 487 TEST_PY_BD: "qemu-riscv32" 488 TEST_PY_TEST_SPEC: "not sleep" 489 qemu_riscv64: 490 TEST_PY_BD: "qemu-riscv64" 491 TEST_PY_TEST_SPEC: "not sleep" 492 qemu_riscv32_spl: 493 TEST_PY_BD: "qemu-riscv32_spl" 494 TEST_PY_TEST_SPEC: "not sleep" 495 qemu_riscv64_spl: 496 TEST_PY_BD: "qemu-riscv64_spl" 497 TEST_PY_TEST_SPEC: "not sleep" 498 qemu_x86: 499 TEST_PY_BD: "qemu-x86" 500 TEST_PY_TEST_SPEC: "not sleep" 501 qemu_x86_64: 502 TEST_PY_BD: "qemu-x86_64" 503 TEST_PY_TEST_SPEC: "not sleep" 504 qemu_xtensa_dc233c: 505 TEST_PY_BD: "qemu-xtensa-dc233c" 506 TEST_PY_TEST_SPEC: "not sleep and not efi" 507 r2dplus_i82557c: 508 TEST_PY_BD: "r2dplus" 509 TEST_PY_ID: "--id i82557c_qemu" 510 TEST_PY_TEST_SPEC: "not sleep" 511 r2dplus_pcnet: 512 TEST_PY_BD: "r2dplus" 513 TEST_PY_ID: "--id pcnet_qemu" 514 TEST_PY_TEST_SPEC: "not sleep" 515 r2dplus_rtl8139: 516 TEST_PY_BD: "r2dplus" 517 TEST_PY_ID: "--id rtl8139_qemu" 518 TEST_PY_TEST_SPEC: "not sleep" 519 r2dplus_tulip: 520 TEST_PY_BD: "r2dplus" 521 TEST_PY_ID: "--id tulip_qemu" 522 TEST_PY_TEST_SPEC: "not sleep" 523 sifive_unleashed_sdcard: 524 TEST_PY_BD: "sifive_unleashed" 525 TEST_PY_ID: "--id sdcard_qemu" 526 TEST_PY_TEST_SPEC: "not sleep" 527 sifive_unleashed_spi-nor: 528 TEST_PY_BD: "sifive_unleashed" 529 TEST_PY_ID: "--id spi-nor_qemu" 530 TEST_PY_TEST_SPEC: "not sleep" 531 xilinx_zynq_virt: 532 TEST_PY_BD: "xilinx_zynq_virt" 533 TEST_PY_ID: "--id qemu" 534 TEST_PY_TEST_SPEC: "not sleep" 535 xilinx_versal_virt: 536 TEST_PY_BD: "xilinx_versal_virt" 537 TEST_PY_ID: "--id qemu" 538 TEST_PY_TEST_SPEC: "not sleep" 539 OVERRIDE: "-a ~CONFIG_USB_DWC3" 540 xtfpga: 541 TEST_PY_BD: "xtfpga" 542 TEST_PY_ID: "--id qemu" 543 TEST_PY_TEST_SPEC: "not sleep" 544 steps: 545 - download: current 546 artifact: testsh 547 - script: | 548 # make current directory writeable to uboot user inside the container 549 # as sandbox testing need create files like spi flash images, etc. 550 # (TODO: clean up this in the future) 551 chmod 777 . 552 chmod 755 $(Pipeline.Workspace)/testsh/test.sh 553 # Some tests using libguestfs-tools need the fuse device to run 554 docker run "$@" --device /dev/fuse:/dev/fuse \ 555 -v $PWD:$(work_dir) \ 556 -v $(Pipeline.Workspace):$(Pipeline.Workspace) \ 557 -v $(System.DefaultWorkingDirectory):$(System.DefaultWorkingDirectory) \ 558 -e WORK_DIR="${WORK_DIR}" \ 559 -e TEST_PY_BD="${TEST_PY_BD}" \ 560 -e TEST_PY_ID="${TEST_PY_ID}" \ 561 -e TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}" \ 562 -e OVERRIDE="${OVERRIDE}" \ 563 -e BUILD_ENV="${BUILD_ENV}" $(ci_runner_image) \ 564 $(Pipeline.Workspace)/testsh/test.sh 565 retryCountOnTaskFailure: 2 # QEMU may be too slow, etc. 566 - task: PublishTestResults@2 567 inputs: 568 testResultsFormat: 'JUnit' 569 testResultsFiles: 'results.xml' 570 571- stage: world_build 572 jobs: 573 - job: build_the_world 574 timeoutInMinutes: 0 # Use the maximum allowed 575 displayName: 'Build the World' 576 pool: 577 vmImage: $(ubuntu_vm) 578 strategy: 579 # We split the world up in to 10 jobs as we can have at most 10 580 # parallel jobs going on the free tier of Azure. 581 matrix: 582 am33xx_kirkwood_ls1_mvebu_omap: 583 BUILDMAN: $(am33xx_kirkwood_ls1_mvebu_omap) 584 amlogic_bcm_boundary_engicam_siemens_technexion_oradex: 585 BUILDMAN: $(amlogic_bcm_boundary_engicam_siemens_technexion_oradex) 586 arm_nxp_minus_imx_and_at91: 587 BUILDMAN: $(arm_nxp_minus_imx_and_at91) 588 imx: 589 BUILDMAN: $(imx) 590 rk: 591 BUILDMAN: $(rk) 592 sunxi: 593 BUILDMAN: $(sunxi) 594 powerpc: 595 BUILDMAN: $(powerpc) 596 arm_catch_all: 597 BUILDMAN: $(arm_catch_all) 598 aarch64_catch_all: 599 BUILDMAN: $(aarch64_catch_all) 600 everything_but_arm_and_powerpc: 601 BUILDMAN: $(everything_but_arm_and_powerpc) 602 steps: 603 - script: | 604 cat << EOF > build.sh 605 set -ex 606 cd ${WORK_DIR} 607 # make environment variables available as tests are running inside a container 608 export BUILDMAN="${BUILDMAN}" 609 git config --global --add safe.directory ${WORK_DIR} 610 python3 -m venv /tmp/venv 611 . /tmp/venv/bin/activate 612 pip install -r tools/binman/requirements.txt \ 613 -r tools/buildman/requirements.txt 614 EOF 615 cat << "EOF" >> build.sh 616 if [[ "${BUILDMAN}" != "" ]]; then 617 ret=0; 618 tools/buildman/buildman -o /tmp -PEWM ${BUILDMAN} ${OVERRIDE} || ret=$?; 619 if [[ $ret -ne 0 ]]; then 620 tools/buildman/buildman -o /tmp -seP ${BUILDMAN}; 621 exit $ret; 622 fi; 623 fi 624 EOF 625 cat build.sh 626 docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh 627

