blob: ae9120655b0c76da17bbe8124f5b829287c783cf [file] [log] [blame]
Tom Rinid2244b92019-06-19 09:25:17 -04001# SPDX-License-Identifier: GPL-2.0+
2
Peter Hoyesb0722af2023-03-10 09:53:02 +00003variables:
Tom Rinif9d00182024-12-08 11:07:26 -06004 DEFAULT_ALL_TAG: "all"
5 DEFAULT_ARM64_TAG: "arm64"
6 DEFAULT_AMD64_TAG: "amd64"
7 DEFAULT_FAST_AMD64_TAG: "fast amd64"
Peter Hoyes08ed84e2023-03-10 09:53:03 +00008 MIRROR_DOCKER: docker.io
Simon Glass42f0dd02024-11-12 07:13:26 -07009 SJG_LAB: ""
Simon Glass7c24c042024-11-27 11:17:30 -060010 PLATFORM: linux/amd64,linux/arm64
Peter Hoyesb0722af2023-03-10 09:53:02 +000011
12default:
13 tags:
Tom Rinif9d00182024-12-08 11:07:26 -060014 - ${DEFAULT_ALL_TAG}
Peter Hoyesb0722af2023-03-10 09:53:02 +000015
Tom Rini91aafa22024-12-08 11:07:27 -060016workflow:
17 rules:
18 - when: always
19
Joel Stanleyb97c1d42022-08-23 16:18:26 +100020# Grab our configured image. The source for this is found
21# in the u-boot tree at tools/docker/Dockerfile
Tom Rini5d9d14d2024-12-02 16:36:06 -060022image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20240808-03Dec2024
Tom Rinid2244b92019-06-19 09:25:17 -040023
24# We run some tests in different order, to catch some failures quicker.
25stages:
Tom Rinid2244b92019-06-19 09:25:17 -040026 - testsuites
Tom Rini1cdb1822019-07-24 13:09:31 -040027 - test.py
Simon Glass42f0dd02024-11-12 07:13:26 -070028 - sjg-lab
Tom Rinid2244b92019-06-19 09:25:17 -040029 - world build
30
31.buildman_and_testpy_template: &buildman_and_testpy_dfn
Tom Rinid2244b92019-06-19 09:25:17 -040032 stage: test.py
Tom Rini6acc0192023-07-11 22:33:03 -040033 retry: 2 # QEMU may be too slow, etc.
Andrejs Cainikovsb4453552023-09-13 16:15:36 +020034 rules:
35 - when: always
Tom Rinid2244b92019-06-19 09:25:17 -040036 before_script:
37 # Clone uboot-test-hooks
Tom Rinie0f979b2022-11-21 12:52:40 -050038 - git config --global --add safe.directory "${CI_PROJECT_DIR}"
Tom Rini2a1df582021-02-24 17:05:04 -050039 - git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
Jerome Forissierde134d92024-10-16 12:04:14 +020040 # qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled.
41 # The test config and the boardenv file from qemu_arm64 can be re-used so create symlinks
42 - ln -s conf.qemu_arm64_na /tmp/uboot-test-hooks/bin/travis-ci/conf.qemu_arm64_lwip_na
Tom Rinid2244b92019-06-19 09:25:17 -040043 - ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
44 - ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
Bin Mengb68d9d62020-03-28 07:25:29 -070045 - if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then
Heinrich Schuchardt29999e42023-10-25 00:15:43 +020046 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;
47 export OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
Bin Mengb68d9d62020-03-28 07:25:29 -070048 fi
Bin Meng0ae41062021-08-26 23:33:35 +080049 - if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
Heinrich Schuchardt29999e42023-10-25 00:15:43 +020050 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;
51 export OPENSBI=/tmp/opensbi-1.3.1-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
Bin Mengb68d9d62020-03-28 07:25:29 -070052 fi
Patrick Rudolphd67a7422024-10-23 15:20:20 +020053 - if [[ "${TEST_PY_BD}" == "qemu-arm-sbsa" ]]; then
54 wget -O /tmp/bl1.bin https://artifacts.codelinaro.org/artifactory/linaro-419-sbsa-ref/latest/tf-a/bl1.bin;
55 wget -O /tmp/fip.bin https://artifacts.codelinaro.org/artifactory/linaro-419-sbsa-ref/latest/tf-a/fip.bin;
Tom Rini8fa34f02024-10-27 17:14:22 -060056 export BINMAN_INDIRS=/tmp;
Patrick Rudolphd67a7422024-10-23 15:20:20 +020057 fi
Tom Rini1cdb1822019-07-24 13:09:31 -040058
Tom Rinid2244b92019-06-19 09:25:17 -040059 after_script:
Tom Rini792dbc32024-06-27 07:43:20 -060060 - cp -v /tmp/${TEST_PY_BD}/*.{html,css,xml} .
Heinrich Schuchardt159b0ab2019-12-19 13:30:32 +010061 - rm -rf /tmp/uboot-test-hooks /tmp/venv
Tom Rinid2244b92019-06-19 09:25:17 -040062 script:
Simon Glassda499352020-03-18 09:42:57 -060063 # If we've been asked to use clang only do one configuration.
Simon Glass28d83e72020-03-18 09:42:55 -060064 - export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD}
Simon Glass2e32f5d2022-08-03 12:13:09 -060065 - echo BUILD_ENV ${BUILD_ENV}
Simon Glassc2f01902023-01-15 14:16:00 -070066 - if [ -n "${BUILD_ENV}" ]; then
67 export ${BUILD_ENV};
68 fi
Simon Glass87c80462020-03-18 09:43:00 -060069 - tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e
70 --board ${TEST_PY_BD} ${OVERRIDE}
Tom Rinie8403a92024-11-27 11:17:24 -060071 - cp /opt/grub/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/
72 - cp /opt/grub/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/
Heinrich Schuchardtba0ae212020-07-14 00:23:58 +020073 - cp /opt/grub/grubriscv64.efi $UBOOT_TRAVIS_BUILD_DIR/grub_riscv64.efi
Heinrich Schuchardtba0ae212020-07-14 00:23:58 +020074 - cp /opt/grub/grubaa64.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi
75 - cp /opt/grub/grubarm.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi
Bin Meng0ae41062021-08-26 23:33:35 +080076 # create sdcard / spi-nor images for sifive unleashed using genimage
77 - if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
78 mkdir -p root;
79 cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .;
80 cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .;
81 rm -rf tmp;
82 genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg;
83 cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/;
84 rm -rf tmp;
85 genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
86 cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
87 fi
Simon Glass13e1fa02022-01-21 10:23:01 -070088 - if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
Tom Rinid0296f62024-02-13 09:39:27 -050089 cp /opt/coreboot/coreboot.rom ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
90 /opt/coreboot/cbfstool ${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom remove -n fallback/payload;
91 /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;
Simon Glass13e1fa02022-01-21 10:23:01 -070092 fi
Tom Riniebcd2142019-10-24 11:59:27 -040093 - virtualenv -p /usr/bin/python3 /tmp/venv
94 - . /tmp/venv/bin/activate
95 - pip install -r test/py/requirements.txt
Simon Glass2600f7e2020-03-18 09:42:56 -060096 # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
Simon Glass28d83e72020-03-18 09:42:55 -060097 - export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
Tom Rinid2244b92019-06-19 09:25:17 -040098 export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
Heinrich Schuchardt2a3ec0a2020-07-10 22:04:40 +020099 ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID}
Simon Glass2600f7e2020-03-18 09:42:56 -0600100 ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
Simon Glassfd0c59b2020-03-18 09:42:59 -0600101 --build-dir "$UBOOT_TRAVIS_BUILD_DIR"
Tom Rini792dbc32024-06-27 07:43:20 -0600102 --junitxml=/tmp/${TEST_PY_BD}/results.xml
Marek Vasutc1a44de2023-03-03 02:22:25 +0100103 artifacts:
104 when: always
105 paths:
106 - "*.html"
107 - "*.css"
Tom Rini792dbc32024-06-27 07:43:20 -0600108 reports:
109 junit: results.xml
Marek Vasutc1a44de2023-03-03 02:22:25 +0100110 expire_in: 1 week
Tom Rinid2244b92019-06-19 09:25:17 -0400111
Tom Rinif9d00182024-12-08 11:07:26 -0600112build all platforms in a single job:
Tom Rinid2244b92019-06-19 09:25:17 -0400113 stage: world build
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200114 rules:
115 - when: always
Tom Rinif9d00182024-12-08 11:07:26 -0600116 parallel:
117 matrix:
118 - HOST: "arm64"
119 - HOST: "fast amd64"
120 tags:
121 - ${HOST}
Tom Rini372c6972019-07-17 17:51:28 -0400122 script:
123 - ret=0;
Tom Rinie0f979b2022-11-21 12:52:40 -0500124 git config --global --add safe.directory "${CI_PROJECT_DIR}";
Tom Rini95f1c6cb2023-07-22 00:14:46 +0530125 pip install -r tools/buildman/requirements.txt;
Tom Rinif9d00182024-12-08 11:07:26 -0600126 ./tools/buildman/buildman -o /tmp -PEWM -x xtensa || ret=$?;
Simon Glassda499352020-03-18 09:42:57 -0600127 if [[ $ret -ne 0 ]]; then
Simon Glassad8eaed2020-03-18 09:42:53 -0600128 ./tools/buildman/buildman -o /tmp -seP;
Tom Rini70c63a52019-10-24 11:59:16 -0400129 exit $ret;
130 fi;
Tom Rini372c6972019-07-17 17:51:28 -0400131
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200132.testsuites:
Tom Rinibdfa3762021-12-14 13:36:41 -0500133 stage: testsuites
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200134 rules:
135 - when: always
136
137check for new CONFIG symbols outside Kconfig:
138 extends: .testsuites
Tom Rinibdfa3762021-12-14 13:36:41 -0500139 script:
Tom Rini1cc7e4c2022-12-04 10:14:15 -0500140 - git config --global --add safe.directory "${CI_PROJECT_DIR}"
141 # If grep succeeds and finds a match the test fails as we should
142 # have no matches.
143 - git grep -E '^#[[:blank:]]*(define|undef)[[:blank:]]*CONFIG_'
Tom Rini8f7345c2023-01-10 11:19:46 -0500144 :^doc/ :^arch/arm/dts/ :^scripts/kconfig/lkc.h
Raymond Maodc520542024-10-03 14:50:14 -0700145 :^include/linux/kconfig.h :^tools/ :^dts/upstream/
146 :^lib/mbedtls/external :^lib/mbedtls/mbedtls_def_config.h &&
Sumit Garg8d814682024-02-22 15:05:57 +0530147 exit 1 || exit 0
Tom Rinibdfa3762021-12-14 13:36:41 -0500148
Heinrich Schuchardt54de2412023-01-12 20:30:58 +0100149# build documentation
150docs:
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200151 extends: .testsuites
Heinrich Schuchardtbccdb652020-02-21 18:24:01 +0100152 script:
Heinrich Schuchardt846abe42021-01-25 22:06:25 +0100153 - virtualenv -p /usr/bin/python3 /tmp/venvhtml
154 - . /tmp/venvhtml/bin/activate
155 - pip install -r doc/sphinx/requirements.txt
Heinrich Schuchardt2e0c8e62023-05-02 05:04:11 +0200156 - make htmldocs KDOC_WERROR=1
Heinrich Schuchardt54de2412023-01-12 20:30:58 +0100157 - make infodocs
Heinrich Schuchardtbccdb652020-02-21 18:24:01 +0100158
Tom Rinid2244b92019-06-19 09:25:17 -0400159# ensure all configs have MAINTAINERS entries
160Check for configs without MAINTAINERS entry:
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200161 extends: .testsuites
Tom Rinid2244b92019-06-19 09:25:17 -0400162 script:
Tom Rinica00ac62023-10-23 11:37:47 -0400163 - ./tools/buildman/buildman --maintainer-check
Tom Rinid2244b92019-06-19 09:25:17 -0400164
165# Ensure host tools build
Tom Rini8244f002023-08-20 13:31:28 -0400166Build tools-only and envtools:
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200167 extends: .testsuites
Tom Rinid2244b92019-06-19 09:25:17 -0400168 script:
Tom Rini8244f002023-08-20 13:31:28 -0400169 - make tools-only_config tools-only -j$(nproc);
170 make mrproper;
171 make tools-only_config envtools -j$(nproc)
Pierre-Jean Texier6812f5e2019-08-26 13:06:18 +0200172
Tom Rini0b3e0c42020-03-11 18:11:15 -0400173Run binman, buildman, dtoc, Kconfig and patman testsuites:
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200174 extends: .testsuites
Tom Rinif9d00182024-12-08 11:07:26 -0600175 tags:
176 - ${DEFAULT_AMD64_TAG}
Tom Rinid2244b92019-06-19 09:25:17 -0400177 script:
Tom Rini0b6e1032019-08-12 10:09:08 -0400178 - git config --global user.name "GitLab CI Runner";
179 git config --global user.email trini@konsulko.com;
Tom Rinid1ed4462022-08-09 21:08:54 -0400180 git config --global --add safe.directory "${CI_PROJECT_DIR}";
Tom Rini0b6e1032019-08-12 10:09:08 -0400181 export USER=gitlab;
Tom Rini6c883102020-02-11 12:41:14 -0500182 virtualenv -p /usr/bin/python3 /tmp/venv;
Tom Rini0b6e1032019-08-12 10:09:08 -0400183 . /tmp/venv/bin/activate;
Tom Rini70c66dd2021-02-26 07:52:29 -0500184 pip install -r test/py/requirements.txt;
Tom Rini95f1c6cb2023-07-22 00:14:46 +0530185 pip install -r tools/buildman/requirements.txt;
Tom Rini08086922023-08-10 12:52:24 -0400186 export UBOOT_TRAVIS_BUILD_DIR=/tmp/tools-only;
Tom Rini0b6e1032019-08-12 10:09:08 -0400187 export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
188 export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
Tom Rinid1ed4462022-08-09 21:08:54 -0400189 set +e;
Simon Glass492f0b02021-03-15 17:25:34 +1300190 ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
Tom Rini08086922023-08-10 12:52:24 -0400191 --board tools-only;
Tom Rinid1ed4462022-08-09 21:08:54 -0400192 set -e;
Tom Rini0b6e1032019-08-12 10:09:08 -0400193 ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
194 ./tools/buildman/buildman -t;
195 ./tools/dtoc/dtoc -t;
Simon Glass109e84e2020-07-05 21:41:55 -0600196 ./tools/patman/patman test;
Tom Rini0b3e0c42020-03-11 18:11:15 -0400197 make testconfig
Tom Rinid2244b92019-06-19 09:25:17 -0400198
Simon Glassf6903262022-02-11 13:23:26 -0700199# Check for any pylint regressions
200Run pylint:
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200201 extends: .testsuites
Simon Glassf6903262022-02-11 13:23:26 -0700202 script:
Tom Rinid1ed4462022-08-09 21:08:54 -0400203 - git config --global --add safe.directory "${CI_PROJECT_DIR}"
Simon Glassf6903262022-02-11 13:23:26 -0700204 - pip install -r test/py/requirements.txt
Tom Rini95f1c6cb2023-07-22 00:14:46 +0530205 - pip install -r tools/buildman/requirements.txt
Tom Rini090ff812022-03-25 08:19:09 -0400206 - pip install asteval pylint==2.12.2 pyopenssl
Simon Glassf6903262022-02-11 13:23:26 -0700207 - export PATH=${PATH}:~/.local/bin
208 - echo "[MASTER]" >> .pylintrc
209 - echo "load-plugins=pylint.extensions.docparams" >> .pylintrc
Tom Rini08086922023-08-10 12:52:24 -0400210 - export UBOOT_TRAVIS_BUILD_DIR=/tmp/tools-only
Tom Rinid1ed4462022-08-09 21:08:54 -0400211 - set +e
Simon Glassf6903262022-02-11 13:23:26 -0700212 - ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w
Tom Rini08086922023-08-10 12:52:24 -0400213 --board tools-only
Tom Rinid1ed4462022-08-09 21:08:54 -0400214 - set -e
Simon Glassf6903262022-02-11 13:23:26 -0700215 - pylint --version
216 - export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt"
217 - make pylint_err
218
Simon Glassf96763a2023-02-13 08:56:39 -0700219# Check for pre-schema driver model tags
220Check for pre-schema tags:
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200221 extends: .testsuites
Simon Glassf96763a2023-02-13 08:56:39 -0700222 script:
223 - git config --global --add safe.directory "${CI_PROJECT_DIR}";
224 # If grep succeeds and finds a match the test fails as we should
225 # have no matches.
226 - git grep u-boot,dm- -- '*.dts*' && exit 1 || exit 0
227
Simon Glass5dd13b92023-02-23 18:18:24 -0700228# Check we can package the Python tools
229Check packing of Python tools:
Andrejs Cainikovsb4453552023-09-13 16:15:36 +0200230 extends: .testsuites
Simon Glass5dd13b92023-02-23 18:18:24 -0700231 script:
232 - make pip
233
Tom Rinid2244b92019-06-19 09:25:17 -0400234# Test sandbox with test.py
235sandbox test.py:
Tom Rinif9d00182024-12-08 11:07:26 -0600236 tags:
237 - ${DEFAULT_AMD64_TAG}
Tom Rinid2244b92019-06-19 09:25:17 -0400238 variables:
239 TEST_PY_BD: "sandbox"
Tom Rinid2244b92019-06-19 09:25:17 -0400240 <<: *buildman_and_testpy_dfn
241
Tom Rini99a1bb32019-11-06 19:30:47 -0500242sandbox with clang test.py:
Tom Rinif9d00182024-12-08 11:07:26 -0600243 tags:
244 - ${DEFAULT_AMD64_TAG}
Tom Rini99a1bb32019-11-06 19:30:47 -0500245 variables:
246 TEST_PY_BD: "sandbox"
Tom Rinie752a3a2024-03-10 15:59:28 -0400247 OVERRIDE: "-O clang-17"
Tom Rini99a1bb32019-11-06 19:30:47 -0500248 <<: *buildman_and_testpy_dfn
249
Marek Vasut36bdb592023-09-01 10:48:10 +0200250sandbox64 test.py:
Tom Rinif9d00182024-12-08 11:07:26 -0600251 tags:
252 - ${DEFAULT_AMD64_TAG}
Marek Vasut36bdb592023-09-01 10:48:10 +0200253 variables:
254 TEST_PY_BD: "sandbox64"
255 <<: *buildman_and_testpy_dfn
256
257sandbox64 with clang test.py:
Tom Rinif9d00182024-12-08 11:07:26 -0600258 tags:
259 - ${DEFAULT_AMD64_TAG}
Marek Vasut36bdb592023-09-01 10:48:10 +0200260 variables:
261 TEST_PY_BD: "sandbox64"
Tom Rinie752a3a2024-03-10 15:59:28 -0400262 OVERRIDE: "-O clang-17"
Marek Vasut36bdb592023-09-01 10:48:10 +0200263 <<: *buildman_and_testpy_dfn
264
Tom Rinid2244b92019-06-19 09:25:17 -0400265sandbox_spl test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400266 variables:
267 TEST_PY_BD: "sandbox_spl"
Simon Glass36a69e12020-10-25 20:38:36 -0600268 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
Tom Rinid2244b92019-06-19 09:25:17 -0400269 <<: *buildman_and_testpy_dfn
270
Simon Glass492f0b02021-03-15 17:25:34 +1300271sandbox_noinst_test.py:
Simon Glass492f0b02021-03-15 17:25:34 +1300272 variables:
273 TEST_PY_BD: "sandbox_noinst"
274 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
275 <<: *buildman_and_testpy_dfn
276
Sean Andersonf65dcc02023-10-14 16:47:59 -0400277sandbox_noinst with LOAD_FIT_FULL test.py:
278 variables:
279 TEST_PY_BD: "sandbox_noinst"
280 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
281 OVERRIDE: "-a CONFIG_SPL_LOAD_FIT_FULL=y"
282 <<: *buildman_and_testpy_dfn
283
Simon Glassa2a4eea2022-04-30 00:56:57 -0600284sandbox_vpl test.py:
285 variables:
286 TEST_PY_BD: "sandbox_vpl"
Simon Glass4e5e7f42023-04-02 14:01:26 +1200287 TEST_PY_TEST_SPEC: "vpl or test_spl"
Simon Glassa2a4eea2022-04-30 00:56:57 -0600288 <<: *buildman_and_testpy_dfn
289
Simon Glassc2f01902023-01-15 14:16:00 -0700290# Enable tracing and disable LTO, to ensure functions are not elided
291sandbox trace_test.py:
292 variables:
293 TEST_PY_BD: "sandbox"
294 BUILD_ENV: "FTRACE=1 NO_LTO=1"
295 TEST_PY_TEST_SPEC: "trace"
Sughosh Ganu0c3783e2023-08-22 23:10:02 +0530296 OVERRIDE: "-a CONFIG_TRACE=y -a CONFIG_TRACE_EARLY=y -a CONFIG_TRACE_EARLY_SIZE=0x01000000 -a CONFIG_TRACE_BUFFER_SIZE=0x02000000"
Simon Glassc2f01902023-01-15 14:16:00 -0700297 <<: *buildman_and_testpy_dfn
298
Tom Rini0008b882019-07-17 16:06:57 -0400299evb-ast2500 test.py:
Tom Rini0008b882019-07-17 16:06:57 -0400300 variables:
301 TEST_PY_BD: "evb-ast2500"
Tom Rini5692b9c2024-10-15 12:28:26 -0600302 TEST_PY_TEST_SPEC: "not sleep"
Tom Rini0008b882019-07-17 16:06:57 -0400303 TEST_PY_ID: "--id qemu"
Tom Rini0008b882019-07-17 16:06:57 -0400304 <<: *buildman_and_testpy_dfn
305
Joel Stanley3f21e1b2022-06-29 16:35:25 +0930306evb-ast2600 test.py:
307 variables:
308 TEST_PY_BD: "evb-ast2600"
Tom Rini5692b9c2024-10-15 12:28:26 -0600309 TEST_PY_TEST_SPEC: "not sleep"
Joel Stanley3f21e1b2022-06-29 16:35:25 +0930310 TEST_PY_ID: "--id qemu"
311 <<: *buildman_and_testpy_dfn
312
Tom Rinid2244b92019-06-19 09:25:17 -0400313sandbox_flattree test.py:
Tom Rinif9d00182024-12-08 11:07:26 -0600314 tags:
315 - ${DEFAULT_AMD64_TAG}
Tom Rinid2244b92019-06-19 09:25:17 -0400316 variables:
317 TEST_PY_BD: "sandbox_flattree"
Tom Rinid2244b92019-06-19 09:25:17 -0400318 <<: *buildman_and_testpy_dfn
319
Kristian Amlie8f8a2992021-09-07 08:37:51 +0200320vexpress_ca9x4 test.py:
321 variables:
322 TEST_PY_BD: "vexpress_ca9x4"
Tom Rini5692b9c2024-10-15 12:28:26 -0600323 TEST_PY_TEST_SPEC: "not sleep"
Kristian Amlie8f8a2992021-09-07 08:37:51 +0200324 TEST_PY_ID: "--id qemu"
325 <<: *buildman_and_testpy_dfn
326
Tom Rinid2244b92019-06-19 09:25:17 -0400327integratorcp_cm926ejs test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400328 variables:
329 TEST_PY_BD: "integratorcp_cm926ejs"
330 TEST_PY_TEST_SPEC: "not sleep"
331 TEST_PY_ID: "--id qemu"
Tom Rinid2244b92019-06-19 09:25:17 -0400332 <<: *buildman_and_testpy_dfn
333
334qemu_arm test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400335 variables:
336 TEST_PY_BD: "qemu_arm"
337 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinid2244b92019-06-19 09:25:17 -0400338 <<: *buildman_and_testpy_dfn
339
340qemu_arm64 test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400341 variables:
342 TEST_PY_BD: "qemu_arm64"
343 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinid2244b92019-06-19 09:25:17 -0400344 <<: *buildman_and_testpy_dfn
345
Jerome Forissierde134d92024-10-16 12:04:14 +0200346qemu_arm64_lwip test.py:
347 variables:
348 TEST_PY_BD: "qemu_arm64_lwip"
349 TEST_PY_TEST_SPEC: "test_net_dhcp or test_net_ping or test_net_tftpboot"
350 <<: *buildman_and_testpy_dfn
351
Patrick Rudolphd67a7422024-10-23 15:20:20 +0200352qemu_arm_sbsa test.py:
353 variables:
354 TEST_PY_BD: "qemu-arm-sbsa"
355 TEST_PY_TEST_SPEC: "not sleep"
356 <<: *buildman_and_testpy_dfn
357
Marek Vasut07240eb2023-03-23 01:22:41 +0100358qemu_m68k test.py:
359 variables:
360 TEST_PY_BD: "M5208EVBE"
361 TEST_PY_ID: "--id qemu"
362 TEST_PY_TEST_SPEC: "not sleep and not efi"
363 OVERRIDE: "-a CONFIG_M68K_QEMU=y -a ~CONFIG_MCFTMR"
364 <<: *buildman_and_testpy_dfn
365
Daniel Schwierzeck744af392020-06-06 22:21:47 +0200366qemu_malta test.py:
Daniel Schwierzeck744af392020-06-06 22:21:47 +0200367 variables:
368 TEST_PY_BD: "malta"
369 TEST_PY_TEST_SPEC: "not sleep and not efi"
370 TEST_PY_ID: "--id qemu"
371 <<: *buildman_and_testpy_dfn
372
373qemu_maltael test.py:
Daniel Schwierzeck744af392020-06-06 22:21:47 +0200374 variables:
375 TEST_PY_BD: "maltael"
376 TEST_PY_TEST_SPEC: "not sleep and not efi"
377 TEST_PY_ID: "--id qemu"
378 <<: *buildman_and_testpy_dfn
379
380qemu_malta64 test.py:
Daniel Schwierzeck744af392020-06-06 22:21:47 +0200381 variables:
382 TEST_PY_BD: "malta64"
383 TEST_PY_TEST_SPEC: "not sleep and not efi"
384 TEST_PY_ID: "--id qemu"
385 <<: *buildman_and_testpy_dfn
386
387qemu_malta64el test.py:
Daniel Schwierzeck744af392020-06-06 22:21:47 +0200388 variables:
389 TEST_PY_BD: "malta64el"
390 TEST_PY_TEST_SPEC: "not sleep and not efi"
391 TEST_PY_ID: "--id qemu"
392 <<: *buildman_and_testpy_dfn
393
Tom Rinid2244b92019-06-19 09:25:17 -0400394qemu-ppce500 test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400395 variables:
396 TEST_PY_BD: "qemu-ppce500"
397 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinid2244b92019-06-19 09:25:17 -0400398 <<: *buildman_and_testpy_dfn
399
Bin Mengaeb3ea42020-03-28 07:25:27 -0700400qemu-riscv32 test.py:
Bin Mengaeb3ea42020-03-28 07:25:27 -0700401 variables:
402 TEST_PY_BD: "qemu-riscv32"
403 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengaeb3ea42020-03-28 07:25:27 -0700404 <<: *buildman_and_testpy_dfn
405
Tom Rinic8c320e2019-08-02 11:32:37 -0400406qemu-riscv64 test.py:
Tom Rinic8c320e2019-08-02 11:32:37 -0400407 variables:
408 TEST_PY_BD: "qemu-riscv64"
409 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinic8c320e2019-08-02 11:32:37 -0400410 <<: *buildman_and_testpy_dfn
411
Bin Mengb68d9d62020-03-28 07:25:29 -0700412qemu-riscv32_spl test.py:
Bin Mengb68d9d62020-03-28 07:25:29 -0700413 variables:
414 TEST_PY_BD: "qemu-riscv32_spl"
415 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengb68d9d62020-03-28 07:25:29 -0700416 <<: *buildman_and_testpy_dfn
417
418qemu-riscv64_spl test.py:
Bin Mengb68d9d62020-03-28 07:25:29 -0700419 variables:
420 TEST_PY_BD: "qemu-riscv64_spl"
421 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengb68d9d62020-03-28 07:25:29 -0700422 <<: *buildman_and_testpy_dfn
423
Tom Rinid2244b92019-06-19 09:25:17 -0400424qemu-x86 test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400425 variables:
426 TEST_PY_BD: "qemu-x86"
427 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinid2244b92019-06-19 09:25:17 -0400428 <<: *buildman_and_testpy_dfn
429
430qemu-x86_64 test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400431 variables:
432 TEST_PY_BD: "qemu-x86_64"
433 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinid2244b92019-06-19 09:25:17 -0400434 <<: *buildman_and_testpy_dfn
435
Jiaxun Yangacc795b2024-06-18 14:56:11 +0100436qemu-xtensa-dc233c test.py:
437 variables:
438 TEST_PY_BD: "qemu-xtensa-dc233c"
439 TEST_PY_TEST_SPEC: "not sleep and not efi"
Tom Rini5d18a672024-12-08 11:07:24 -0600440 tags:
Tom Rinif9d00182024-12-08 11:07:26 -0600441 - ${DEFAULT_AMD64_TAG}
Jiaxun Yangacc795b2024-06-18 14:56:11 +0100442 <<: *buildman_and_testpy_dfn
443
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200444r2dplus_i82557c test.py:
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200445 variables:
446 TEST_PY_BD: "r2dplus"
Tom Rini5692b9c2024-10-15 12:28:26 -0600447 TEST_PY_TEST_SPEC: "not sleep"
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200448 TEST_PY_ID: "--id i82557c_qemu"
449 <<: *buildman_and_testpy_dfn
450
451r2dplus_pcnet test.py:
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200452 variables:
453 TEST_PY_BD: "r2dplus"
Tom Rini5692b9c2024-10-15 12:28:26 -0600454 TEST_PY_TEST_SPEC: "not sleep"
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200455 TEST_PY_ID: "--id pcnet_qemu"
456 <<: *buildman_and_testpy_dfn
457
458r2dplus_rtl8139 test.py:
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200459 variables:
460 TEST_PY_BD: "r2dplus"
Tom Rini5692b9c2024-10-15 12:28:26 -0600461 TEST_PY_TEST_SPEC: "not sleep"
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200462 TEST_PY_ID: "--id rtl8139_qemu"
463 <<: *buildman_and_testpy_dfn
464
465r2dplus_tulip test.py:
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200466 variables:
467 TEST_PY_BD: "r2dplus"
Tom Rini5692b9c2024-10-15 12:28:26 -0600468 TEST_PY_TEST_SPEC: "not sleep"
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200469 TEST_PY_ID: "--id tulip_qemu"
470 <<: *buildman_and_testpy_dfn
471
Bin Meng0ae41062021-08-26 23:33:35 +0800472sifive_unleashed_sdcard test.py:
473 variables:
474 TEST_PY_BD: "sifive_unleashed"
Tom Rini5692b9c2024-10-15 12:28:26 -0600475 TEST_PY_TEST_SPEC: "not sleep"
Bin Meng0ae41062021-08-26 23:33:35 +0800476 TEST_PY_ID: "--id sdcard_qemu"
477 <<: *buildman_and_testpy_dfn
478
479sifive_unleashed_spi-nor test.py:
480 variables:
481 TEST_PY_BD: "sifive_unleashed"
Tom Rini5692b9c2024-10-15 12:28:26 -0600482 TEST_PY_TEST_SPEC: "not sleep"
Bin Meng0ae41062021-08-26 23:33:35 +0800483 TEST_PY_ID: "--id spi-nor_qemu"
484 <<: *buildman_and_testpy_dfn
485
Michal Simekf8834fd2020-02-13 15:03:29 +0100486xilinx_zynq_virt test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400487 variables:
Michal Simekf8834fd2020-02-13 15:03:29 +0100488 TEST_PY_BD: "xilinx_zynq_virt"
Tom Rinid2244b92019-06-19 09:25:17 -0400489 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinid2244b92019-06-19 09:25:17 -0400490 TEST_PY_ID: "--id qemu"
Tom Rinid2244b92019-06-19 09:25:17 -0400491 <<: *buildman_and_testpy_dfn
492
493xilinx_versal_virt test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400494 variables:
495 TEST_PY_BD: "xilinx_versal_virt"
496 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinid2244b92019-06-19 09:25:17 -0400497 TEST_PY_ID: "--id qemu"
Tom Rinid2244b92019-06-19 09:25:17 -0400498 <<: *buildman_and_testpy_dfn
499
500xtfpga test.py:
Tom Rinid2244b92019-06-19 09:25:17 -0400501 variables:
502 TEST_PY_BD: "xtfpga"
503 TEST_PY_TEST_SPEC: "not sleep"
Tom Rinid2244b92019-06-19 09:25:17 -0400504 TEST_PY_ID: "--id qemu"
Tom Rini5d18a672024-12-08 11:07:24 -0600505 tags:
Tom Rinif9d00182024-12-08 11:07:26 -0600506 - ${DEFAULT_AMD64_TAG}
Tom Rinid2244b92019-06-19 09:25:17 -0400507 <<: *buildman_and_testpy_dfn
Simon Glass13e1fa02022-01-21 10:23:01 -0700508
509coreboot test.py:
510 variables:
511 TEST_PY_BD: "coreboot"
512 TEST_PY_TEST_SPEC: "not sleep"
513 TEST_PY_ID: "--id qemu"
Simon Glass13e1fa02022-01-21 10:23:01 -0700514 <<: *buildman_and_testpy_dfn
Simon Glass42f0dd02024-11-12 07:13:26 -0700515
516.lab_template: &lab_dfn
517 stage: sjg-lab
518 rules:
519 - if: $SJG_LAB == "1"
520 when: always
Tom Rini06a22342024-11-13 12:05:00 -0600521 - if: $SJG_LAB != "1"
522 when: manual
523 allow_failure: true
Simon Glass42f0dd02024-11-12 07:13:26 -0700524 tags: [ 'lab' ]
525 script:
526 - if [[ -z "${SJG_LAB}" ]]; then
527 exit 0;
528 fi
529 # Environment:
530 # SRC - source tree
531 # OUT - output directory for builds
532 - export SRC="$(pwd)"
533 - export OUT="${SRC}/build/${BOARD}"
534 - export PATH=$PATH:~/bin
535 - export PATH=$PATH:/vid/software/devel/ubtest/u-boot-test-hooks/bin
536
537 # Load it on the device
538 - ret=0
539 - echo "role ${ROLE}"
540 - export strategy="-s uboot -e off"
541 - export USE_LABGRID_SJG=1
542 # export verbose="-v"
543 - ${SRC}/test/py/test.py --role ${ROLE} --build-dir "${OUT}"
544 --capture=tee-sys -k "not bootstd" || ret=$?
545 - U_BOOT_BOARD_IDENTITY="${ROLE}" u-boot-test-release || true
546 - if [[ $ret -ne 0 ]]; then
547 exit $ret;
548 fi
549 artifacts:
550 when: always
551 paths:
552 - "build/${BOARD}/test-log.html"
553 - "build/${BOARD}/multiplexed_log.css"
554 expire_in: 1 week
555
556rpi3:
557 variables:
558 ROLE: rpi3
559 <<: *lab_dfn
560
561opi_pc:
562 variables:
563 ROLE: opi_pc
564 <<: *lab_dfn
565
566pcduino3_nano:
567 variables:
568 ROLE: pcduino3_nano
569 <<: *lab_dfn
570
571samus:
572 variables:
573 ROLE: samus
574 <<: *lab_dfn
575
576link:
577 variables:
578 ROLE: link
579 <<: *lab_dfn
580
581jerry:
582 variables:
583 ROLE: jerry
584 <<: *lab_dfn
585
586minnowmax:
587 variables:
588 ROLE: minnowmax
589 <<: *lab_dfn
590
591opi_pc2:
592 variables:
593 ROLE: opi_pc2
594 <<: *lab_dfn
595
596bpi:
597 variables:
598 ROLE: bpi
599 <<: *lab_dfn
600
601rpi2:
602 variables:
603 ROLE: rpi2
604 <<: *lab_dfn
605
606bob:
607 variables:
608 ROLE: bob
609 <<: *lab_dfn
610
611ff3399:
612 variables:
613 ROLE: ff3399
614 <<: *lab_dfn
615
616coral:
617 variables:
618 ROLE: coral
619 <<: *lab_dfn
620
621rpi3z:
622 variables:
623 ROLE: rpi3z
624 <<: *lab_dfn
625
626bbb:
627 variables:
628 ROLE: bbb
629 <<: *lab_dfn
630
631kevin:
632 variables:
633 ROLE: kevin
634 <<: *lab_dfn
635
636pine64:
637 variables:
638 ROLE: pine64
639 <<: *lab_dfn
640
641c4:
642 variables:
643 ROLE: c4
644 <<: *lab_dfn
645
646rpi4:
647 variables:
648 ROLE: rpi4
649 <<: *lab_dfn
650
651rpi0:
652 variables:
653 ROLE: rpi0
654 <<: *lab_dfn
655
656snow:
657 variables:
658 ROLE: snow
659 <<: *lab_dfn
660
661pcduino3:
662 variables:
663 ROLE: pcduino3
664 <<: *lab_dfn
665
666nyan-big:
667 variables:
668 ROLE: nyan-big
669 <<: *lab_dfn