blob: 81ab77e1345c952483eb516870cb461f79953297 [file] [log] [blame]
Bin Mengc7072d12019-10-27 05:19:48 -07001variables:
Tom Rinid5f27cb2021-10-31 13:24:42 -04002 windows_vm: windows-2019
Bin Mengddaa6b12019-10-28 07:25:03 -07003 ubuntu_vm: ubuntu-18.04
Tom Riniab1e85b2020-05-26 20:39:03 -04004 macos_vm: macOS-10.15
Tom Rinieace69f2022-02-03 08:38:34 -05005 ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20220113-03Feb2022
Bin Mengddaa6b12019-10-28 07:25:03 -07006 # 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
Bin Mengc7072d12019-10-27 05:19:48 -070011
Tom Rini4c268a62022-01-11 19:14:28 -050012stages:
13- stage: testsuites
14 jobs:
Bin Mengc7072d12019-10-27 05:19:48 -070015 - job: tools_only_windows
16 displayName: 'Ensure host tools build for Windows'
17 pool:
18 vmImage: $(windows_vm)
Bin Mengc7072d12019-10-27 05:19:48 -070019 steps:
Bin Meng31c3bce2020-07-28 02:06:44 -070020 - powershell: |
Bin Mengbd97b0d2021-06-22 07:33:21 +080021 (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")
Bin Mengc7072d12019-10-27 05:19:48 -070022 displayName: 'Install MSYS2'
23 - script: |
Bin Meng31c3bce2020-07-28 02:06:44 -070024 sfx.exe -y -o%CD:~0,2%\
Bin Meng8c655152020-07-28 02:06:42 -070025 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syyuu"
Bin Mengc7072d12019-10-27 05:19:48 -070026 displayName: 'Update MSYS2'
27 - script: |
Tom Rinia66021b2021-03-26 15:14:14 -040028 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy make gcc bison flex diffutils openssl-devel"
Bin Mengc7072d12019-10-27 05:19:48 -070029 displayName: 'Install Toolchain'
30 - script: |
Bin Mengc7072d12019-10-27 05:19:48 -070031 echo make tools-only_defconfig tools-only NO_SDL=1 > build-tools.sh
Bin Meng8c655152020-07-28 02:06:42 -070032 %CD:~0,2%\msys64\usr\bin\bash -lc "bash build-tools.sh"
Bin Mengc7072d12019-10-27 05:19:48 -070033 displayName: 'Build Host Tools'
34 env:
35 # Tell MSYS2 we need a POSIX emulation layer
36 MSYSTEM: MSYS
37 # Tell MSYS2 not to ‘cd’ our startup directory to HOME
38 CHERE_INVOKING: yes
Bin Mengddaa6b12019-10-28 07:25:03 -070039
Tom Riniab1e85b2020-05-26 20:39:03 -040040 - job: tools_only_macOS
41 displayName: 'Ensure host tools build for macOS X'
42 pool:
43 vmImage: $(macos_vm)
44 steps:
45 - script: brew install make
46 displayName: Brew install dependencies
47 - script: |
48 gmake tools-only_config tools-only NO_SDL=1 \
49 HOSTCFLAGS="-I/usr/local/opt/openssl@1.1/include" \
50 HOSTLDFLAGS="-L/usr/local/opt/openssl@1.1/lib" \
51 -j$(sysctl -n hw.logicalcpu)
52 displayName: 'Perform tools-only build'
53
Tom Rinibdfa3762021-12-14 13:36:41 -050054 - job: check_for_migrated_symbols_in_board_header
55 displayName: 'Check for migrated symbols in board header'
56 pool:
57 vmImage: $(ubuntu_vm)
58 container:
59 image: $(ci_runner_image)
60 options: $(container_option)
61 steps:
62 - script: |
63 KSYMLST=`mktemp`
64 KUSEDLST=`mktemp`
65 cat `find . -name "Kconfig*"` | \
66 sed -n -e 's/^\s*config *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
67 -e 's/^\s*menuconfig *\([A-Za-z0-9_]*\).*$/CONFIG_\1/p' \
68 | sort -u > $KSYMLST
69 for CFG in `find include/configs -name "*.h"`; do
70 grep '#define[[:blank:]]CONFIG_' $CFG | \
71 sed -n 's/#define.\(CONFIG_[A-Za-z0-9_]*\).*/\1/p' | \
72 sort -u > ${KUSEDLST} || true
73 NUM=`comm -12 --total --output-delimiter=, ${KSYMLST} ${KUSEDLST} | \
74 cut -d , -f 3`
75 if [[ $NUM -ne 0 ]]; then
76 echo "Unmigrated symbols found in $CFG"
77 exit 1
78 fi
79 done
80
Bin Mengddaa6b12019-10-28 07:25:03 -070081 - job: cppcheck
82 displayName: 'Static code analysis with cppcheck'
83 pool:
84 vmImage: $(ubuntu_vm)
85 container:
86 image: $(ci_runner_image)
87 options: $(container_option)
88 steps:
Simon Glasscd1ccfa2020-04-05 14:35:43 -060089 - script: cppcheck -j$(nproc) --force --quiet --inline-suppr .
Bin Mengddaa6b12019-10-28 07:25:03 -070090
Heinrich Schuchardtfbf2bf92020-02-21 18:24:02 +010091 - job: htmldocs
92 displayName: 'Build HTML documentation'
93 pool:
94 vmImage: $(ubuntu_vm)
95 container:
96 image: $(ci_runner_image)
97 options: $(container_option)
98 steps:
Heinrich Schuchardt846abe42021-01-25 22:06:25 +010099 - script: |
100 virtualenv -p /usr/bin/python3 /tmp/venvhtml
101 . /tmp/venvhtml/bin/activate
102 pip install -r doc/sphinx/requirements.txt
103 make htmldocs
Heinrich Schuchardtfbf2bf92020-02-21 18:24:02 +0100104
Bin Mengddaa6b12019-10-28 07:25:03 -0700105 - job: todo
106 displayName: 'Search for TODO within source tree'
107 pool:
108 vmImage: $(ubuntu_vm)
109 container:
110 image: $(ci_runner_image)
111 options: $(container_option)
112 steps:
113 - script: grep -r TODO .
114 - script: grep -r FIXME .
115 - script: grep -r HACK . | grep -v HACKKIT
116
117 - job: sloccount
118 displayName: 'Some statistics about the code base'
119 pool:
120 vmImage: $(ubuntu_vm)
121 container:
122 image: $(ci_runner_image)
123 options: $(container_option)
124 steps:
125 - script: sloccount .
126
127 - job: maintainers
128 displayName: 'Ensure all configs have MAINTAINERS entries'
129 pool:
130 vmImage: $(ubuntu_vm)
131 container:
132 image: $(ci_runner_image)
133 options: $(container_option)
134 steps:
135 - script: |
136 if [ `./tools/genboardscfg.py -f 2>&1 | wc -l` -ne 0 ]; then exit 1; fi
137
138 - job: tools_only
139 displayName: 'Ensure host tools build'
140 pool:
141 vmImage: $(ubuntu_vm)
142 container:
143 image: $(ci_runner_image)
144 options: $(container_option)
145 steps:
146 - script: |
147 make tools-only_config tools-only -j$(nproc)
148
149 - job: envtools
150 displayName: 'Ensure env tools build'
151 pool:
152 vmImage: $(ubuntu_vm)
153 container:
154 image: $(ci_runner_image)
155 options: $(container_option)
156 steps:
157 - script: |
158 make tools-only_config envtools -j$(nproc)
159
160 - job: utils
Tom Rini0b3e0c42020-03-11 18:11:15 -0400161 displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites'
Bin Mengddaa6b12019-10-28 07:25:03 -0700162 pool:
163 vmImage: $(ubuntu_vm)
164 steps:
165 - script: |
166 cat << EOF > build.sh
167 set -ex
168 cd ${WORK_DIR}
169 EOF
170 cat << "EOF" >> build.sh
171 git config --global user.name "Azure Pipelines"
172 git config --global user.email bmeng.cn@gmail.com
173 export USER=azure
Tom Rini6c883102020-02-11 12:41:14 -0500174 virtualenv -p /usr/bin/python3 /tmp/venv
Bin Mengddaa6b12019-10-28 07:25:03 -0700175 . /tmp/venv/bin/activate
Tom Rini70c66dd2021-02-26 07:52:29 -0500176 pip install -r test/py/requirements.txt
Simon Glass9e589c02020-03-18 09:42:50 -0600177 export UBOOT_TRAVIS_BUILD_DIR=/tmp/sandbox_spl
Bin Mengddaa6b12019-10-28 07:25:03 -0700178 export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
179 export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
Simon Glassa26d8fe2021-03-22 08:22:53 +1300180 ./tools/buildman/buildman -T0 -o ${UBOOT_TRAVIS_BUILD_DIR} -w --board sandbox_spl
Bin Mengddaa6b12019-10-28 07:25:03 -0700181 ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test
182 ./tools/buildman/buildman -t
183 ./tools/dtoc/dtoc -t
Simon Glass109e84e2020-07-05 21:41:55 -0600184 ./tools/patman/patman test
Tom Rini0b3e0c42020-03-11 18:11:15 -0400185 make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig
Bin Mengddaa6b12019-10-28 07:25:03 -0700186 EOF
187 cat build.sh
188 # We cannot use "container" like other jobs above, as buildman
189 # seems to hang forever with pre-configured "container" environment
190 docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh
191
Pali Rohár80ad67b2020-05-17 14:38:22 +0200192 - job: nokia_rx51_test
193 displayName: 'Run tests for Nokia RX-51 (aka N900)'
194 pool:
195 vmImage: $(ubuntu_vm)
196 container:
197 image: $(ci_runner_image)
198 options: $(container_option)
199 steps:
200 - script: |
Tom Rinicc0a4542021-10-14 22:21:29 -0400201 export PATH=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin:$PATH
Pali Rohár80ad67b2020-05-17 14:38:22 +0200202 test/nokia_rx51_test.sh
203
Tom Rini4c268a62022-01-11 19:14:28 -0500204- stage: test_py
205 jobs:
Bin Mengddaa6b12019-10-28 07:25:03 -0700206 - job: test_py
207 displayName: 'test.py'
208 pool:
209 vmImage: $(ubuntu_vm)
210 strategy:
211 matrix:
212 sandbox:
213 TEST_PY_BD: "sandbox"
Tom Rini99a1bb32019-11-06 19:30:47 -0500214 sandbox_clang:
215 TEST_PY_BD: "sandbox"
Tom Rini4d4251b2021-10-05 13:51:38 -0400216 OVERRIDE: "-O clang-13"
Bin Mengddaa6b12019-10-28 07:25:03 -0700217 sandbox_spl:
218 TEST_PY_BD: "sandbox_spl"
Simon Glass36a69e12020-10-25 20:38:36 -0600219 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
Simon Glass492f0b02021-03-15 17:25:34 +1300220 sandbox_noinst:
221 TEST_PY_BD: "sandbox_noinst"
222 TEST_PY_TEST_SPEC: "test_ofplatdata or test_handoff or test_spl"
Bin Mengddaa6b12019-10-28 07:25:03 -0700223 sandbox_flattree:
224 TEST_PY_BD: "sandbox_flattree"
Simon Glass13e1fa02022-01-21 10:23:01 -0700225 coreboot:
226 TEST_PY_BD: "coreboot"
227 TEST_PY_ID: "--id qemu"
228 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700229 evb_ast2500:
230 TEST_PY_BD: "evb-ast2500"
231 TEST_PY_ID: "--id qemu"
Kristian Amlie8f8a2992021-09-07 08:37:51 +0200232 vexpress_ca9x4:
233 TEST_PY_BD: "vexpress_ca9x4"
234 TEST_PY_ID: "--id qemu"
Bin Mengddaa6b12019-10-28 07:25:03 -0700235 integratorcp_cm926ejs:
236 TEST_PY_BD: "integratorcp_cm926ejs"
237 TEST_PY_ID: "--id qemu"
238 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700239 qemu_arm:
240 TEST_PY_BD: "qemu_arm"
241 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700242 qemu_arm64:
243 TEST_PY_BD: "qemu_arm64"
244 TEST_PY_TEST_SPEC: "not sleep"
Daniel Schwierzeck879bc742020-06-06 22:21:47 +0200245 qemu_malta:
246 TEST_PY_BD: "malta"
247 TEST_PY_ID: "--id qemu"
248 TEST_PY_TEST_SPEC: "not sleep and not efi"
249 qemu_maltael:
250 TEST_PY_BD: "maltael"
251 TEST_PY_ID: "--id qemu"
252 TEST_PY_TEST_SPEC: "not sleep and not efi"
253 qemu_malta64:
254 TEST_PY_BD: "malta64"
255 TEST_PY_ID: "--id qemu"
256 TEST_PY_TEST_SPEC: "not sleep and not efi"
257 qemu_malta64el:
258 TEST_PY_BD: "malta64el"
259 TEST_PY_ID: "--id qemu"
260 TEST_PY_TEST_SPEC: "not sleep and not efi"
Bin Mengddaa6b12019-10-28 07:25:03 -0700261 qemu_ppce500:
262 TEST_PY_BD: "qemu-ppce500"
263 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengaeb3ea42020-03-28 07:25:27 -0700264 qemu_riscv32:
265 TEST_PY_BD: "qemu-riscv32"
266 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700267 qemu_riscv64:
268 TEST_PY_BD: "qemu-riscv64"
269 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengb68d9d62020-03-28 07:25:29 -0700270 qemu_riscv32_spl:
271 TEST_PY_BD: "qemu-riscv32_spl"
272 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengb68d9d62020-03-28 07:25:29 -0700273 qemu_riscv64_spl:
274 TEST_PY_BD: "qemu-riscv64_spl"
275 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700276 qemu_x86:
277 TEST_PY_BD: "qemu-x86"
278 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700279 qemu_x86_64:
280 TEST_PY_BD: "qemu-x86_64"
281 TEST_PY_TEST_SPEC: "not sleep"
Marek Vasutfc5a9d72020-09-14 21:55:58 +0200282 r2dplus_i82557c:
283 TEST_PY_BD: "r2dplus"
284 TEST_PY_ID: "--id i82557c_qemu"
285 r2dplus_pcnet:
286 TEST_PY_BD: "r2dplus"
287 TEST_PY_ID: "--id pcnet_qemu"
288 r2dplus_rtl8139:
289 TEST_PY_BD: "r2dplus"
290 TEST_PY_ID: "--id rtl8139_qemu"
291 r2dplus_tulip:
292 TEST_PY_BD: "r2dplus"
293 TEST_PY_ID: "--id tulip_qemu"
Bin Meng0ae41062021-08-26 23:33:35 +0800294 sifive_unleashed_sdcard:
295 TEST_PY_BD: "sifive_unleashed"
296 TEST_PY_ID: "--id sdcard_qemu"
297 sifive_unleashed_spi-nor:
298 TEST_PY_BD: "sifive_unleashed"
299 TEST_PY_ID: "--id spi-nor_qemu"
Michal Simekf8834fd2020-02-13 15:03:29 +0100300 xilinx_zynq_virt:
301 TEST_PY_BD: "xilinx_zynq_virt"
Bin Mengddaa6b12019-10-28 07:25:03 -0700302 TEST_PY_ID: "--id qemu"
303 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700304 xilinx_versal_virt:
305 TEST_PY_BD: "xilinx_versal_virt"
306 TEST_PY_ID: "--id qemu"
307 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700308 xtfpga:
309 TEST_PY_BD: "xtfpga"
310 TEST_PY_ID: "--id qemu"
311 TEST_PY_TEST_SPEC: "not sleep"
Bin Mengddaa6b12019-10-28 07:25:03 -0700312 steps:
313 - script: |
314 cat << EOF > test.sh
315 set -ex
316 # make environment variables available as tests are running inside a container
317 export WORK_DIR="${WORK_DIR}"
318 export TEST_PY_BD="${TEST_PY_BD}"
319 export TEST_PY_ID="${TEST_PY_ID}"
320 export TEST_PY_TEST_SPEC="${TEST_PY_TEST_SPEC}"
Tom Rini99a1bb32019-11-06 19:30:47 -0500321 export OVERRIDE="${OVERRIDE}"
Bin Mengddaa6b12019-10-28 07:25:03 -0700322 EOF
323 cat << "EOF" >> test.sh
324 # the below corresponds to .gitlab-ci.yml "before_script"
325 cd ${WORK_DIR}
Tom Rini2a1df582021-02-24 17:05:04 -0500326 git clone --depth=1 https://source.denx.de/u-boot/u-boot-test-hooks /tmp/uboot-test-hooks
Bin Mengddaa6b12019-10-28 07:25:03 -0700327 ln -s travis-ci /tmp/uboot-test-hooks/bin/`hostname`
328 ln -s travis-ci /tmp/uboot-test-hooks/py/`hostname`
Bin Mengddaa6b12019-10-28 07:25:03 -0700329 grub-mkimage --prefix=\"\" -o ~/grub_x86.efi -O i386-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
330 grub-mkimage --prefix=\"\" -o ~/grub_x64.efi -O x86_64-efi normal echo lsefimmap lsefi lsefisystab efinet tftp minicmd
Bin Mengb68d9d62020-03-28 07:25:29 -0700331 if [[ "${TEST_PY_BD}" == "qemu-riscv32_spl" ]]; then
Heinrich Schuchardtac1b4002021-04-02 11:42:01 +0200332 wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
333 export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin;
Bin Mengb68d9d62020-03-28 07:25:29 -0700334 fi
Bin Meng0ae41062021-08-26 23:33:35 +0800335 if [[ "${TEST_PY_BD}" == "qemu-riscv64_spl" ]] || [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
Heinrich Schuchardtac1b4002021-04-02 11:42:01 +0200336 wget -O - https://github.com/riscv/opensbi/releases/download/v0.9/opensbi-0.9-rv-bin.tar.xz | tar -C /tmp -xJ;
337 export OPENSBI=/tmp/opensbi-0.9-rv-bin/share/opensbi/lp64/generic/firmware/fw_dynamic.bin;
Bin Mengb68d9d62020-03-28 07:25:29 -0700338 fi
Bin Mengddaa6b12019-10-28 07:25:03 -0700339 # the below corresponds to .gitlab-ci.yml "script"
340 cd ${WORK_DIR}
Simon Glass28d83e72020-03-18 09:42:55 -0600341 export UBOOT_TRAVIS_BUILD_DIR=/tmp/${TEST_PY_BD};
Simon Glass87c80462020-03-18 09:43:00 -0600342 tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e --board ${TEST_PY_BD} ${OVERRIDE}
Heinrich Schuchardt0c9fdd02020-07-14 00:40:19 +0200343 cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/
344 cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/
345 cp /opt/grub/grubriscv64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi
Heinrich Schuchardt0c9fdd02020-07-14 00:40:19 +0200346 cp /opt/grub/grubaa64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi
347 cp /opt/grub/grubarm.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi
Bin Meng0ae41062021-08-26 23:33:35 +0800348 # create sdcard / spi-nor images for sifive unleashed using genimage
349 if [[ "${TEST_PY_BD}" == "sifive_unleashed" ]]; then
350 mkdir -p root;
351 cp ${UBOOT_TRAVIS_BUILD_DIR}/spl/u-boot-spl.bin .;
352 cp ${UBOOT_TRAVIS_BUILD_DIR}/u-boot.itb .;
353 rm -rf tmp;
354 genimage --inputpath . --config board/sifive/unleashed/genimage_sdcard.cfg;
355 cp images/sdcard.img ${UBOOT_TRAVIS_BUILD_DIR}/;
356 rm -rf tmp;
357 genimage --inputpath . --config board/sifive/unleashed/genimage_spi-nor.cfg;
358 cp images/spi-nor.img ${UBOOT_TRAVIS_BUILD_DIR}/;
359 fi
Simon Glass13e1fa02022-01-21 10:23:01 -0700360 if [[ "${TEST_PY_BD}" == "coreboot" ]]; then
361 wget -O - "https://drive.google.com/uc?id=1x6nrtWIyIRPLS2cQBwYTnT2TbOI8UjmM&export=download" |xz -dc >${UBOOT_TRAVIS_BUILD_DIR}/coreboot.rom;
362 wget -O - "https://drive.google.com/uc?id=149Cz-5SZXHNKpi9xg6R_5XITWohu348y&export=download" >cbfstool;
363 chmod a+x cbfstool;
364 ./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;
365 fi
Tom Rini17e41f22019-10-31 10:45:03 -0400366 virtualenv -p /usr/bin/python3 /tmp/venv
367 . /tmp/venv/bin/activate
368 pip install -r test/py/requirements.txt
Tom Rini528facb2019-11-01 13:59:14 -0400369 export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
Bin Mengddaa6b12019-10-28 07:25:03 -0700370 export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
Simon Glass2600f7e2020-03-18 09:42:56 -0600371 # "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
Heinrich Schuchardt2a3ec0a2020-07-10 22:04:40 +0200372 ./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"} --build-dir "$UBOOT_TRAVIS_BUILD_DIR";
Bin Mengddaa6b12019-10-28 07:25:03 -0700373 # the below corresponds to .gitlab-ci.yml "after_script"
Tom Rini6d4656b2020-02-07 11:45:55 -0500374 rm -rf /tmp/uboot-test-hooks /tmp/venv
Bin Mengddaa6b12019-10-28 07:25:03 -0700375 EOF
376 cat test.sh
377 # make current directory writeable to uboot user inside the container
378 # as sandbox testing need create files like spi flash images, etc.
379 # (TODO: clean up this in the future)
380 chmod 777 .
Alper Nebi Yasakc6d25c12021-06-21 21:51:56 +0300381 # Filesystem tests need extra docker args to run
382 set --
383 if [[ "${TEST_PY_BD}" == "sandbox" ]]; then
384 # mount -o loop needs the loop devices
385 if modprobe loop; then
386 for d in $(find /dev -maxdepth 1 -name 'loop*'); do
387 set -- "$@" --device $d:$d
388 done
389 fi
390 # Needed for mount syscall (for guestmount as well)
391 set -- "$@" --cap-add SYS_ADMIN
392 # Default apparmor profile denies mounts
393 set -- "$@" --security-opt apparmor=unconfined
394 fi
Alper Nebi Yasak6fb91f62021-06-21 21:51:55 +0300395 # Some tests using libguestfs-tools need the fuse device to run
Alper Nebi Yasakc6d25c12021-06-21 21:51:56 +0300396 docker run "$@" --device /dev/fuse:/dev/fuse -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/test.sh
Bin Mengddaa6b12019-10-28 07:25:03 -0700397
Tom Rini4c268a62022-01-11 19:14:28 -0500398- stage: world_build
399 jobs:
Bin Mengddaa6b12019-10-28 07:25:03 -0700400 - job: build_the_world
401 displayName: 'Build the World'
402 pool:
403 vmImage: $(ubuntu_vm)
404 strategy:
405 # Use almost the same target division in .travis.yml, only merged
406 # 4 small build jobs (arc/microblaze/nds32/xtensa) into one.
407 matrix:
408 arc_microblaze_nds32_xtensa:
409 BUILDMAN: "arc microblaze nds32 xtensa"
410 arm11_arm7_arm920t_arm946es:
411 BUILDMAN: "arm11 arm7 arm920t arm946es"
412 arm926ejs:
Tom Rinif5376452021-07-08 07:50:08 -0400413 BUILDMAN: "arm926ejs -x freescale,siemens,at91,kirkwood,omap"
Bin Mengddaa6b12019-10-28 07:25:03 -0700414 at91_non_armv7:
415 BUILDMAN: "at91 -x armv7"
416 at91_non_arm926ejs:
417 BUILDMAN: "at91 -x arm926ejs"
418 boundary_engicam_toradex:
419 BUILDMAN: "boundary engicam toradex"
420 arm_bcm:
421 BUILDMAN: "bcm -x mips"
422 nxp_arm32:
Heiko Schocher56b9b312019-11-22 11:17:29 +0100423 BUILDMAN: "freescale -x powerpc,m68k,aarch64,ls101,ls102,ls104,ls108,ls20,lx216"
424 nxp_ls101x:
425 BUILDMAN: "freescale&ls101"
426 nxp_ls102x:
427 BUILDMAN: "freescale&ls102"
428 nxp_ls104x:
429 BUILDMAN: "freescale&ls104"
430 nxp_ls108x:
431 BUILDMAN: "freescale&ls108"
432 nxp_ls20xx:
433 BUILDMAN: "freescale&ls20"
434 nxp_lx216x:
435 BUILDMAN: "freescale&lx216"
Bin Mengddaa6b12019-10-28 07:25:03 -0700436 imx6:
437 BUILDMAN: "mx6 -x boundary,engicam,freescale,technexion,toradex"
438 imx:
439 BUILDMAN: "mx -x mx6,freescale,technexion,toradex"
Tom Rini45b49bc2021-07-27 17:01:28 -0400440 imx8:
441 BUILDMAN: "imx8"
Bin Mengddaa6b12019-10-28 07:25:03 -0700442 keystone2_keystone3:
443 BUILDMAN: "k2 k3"
444 samsung_socfpga:
445 BUILDMAN: "samsung socfpga"
Bin Mengddaa6b12019-10-28 07:25:03 -0700446 sun4i:
447 BUILDMAN: "sun4i"
448 sun5i:
449 BUILDMAN: "sun5i"
450 sun6i:
451 BUILDMAN: "sun6i"
452 sun7i:
453 BUILDMAN: "sun7i"
454 sun8i_32bit:
455 BUILDMAN: "sun8i&armv7"
456 sun8i_64bit:
457 BUILDMAN: "sun8i&aarch64"
458 sun9i:
459 BUILDMAN: "sun9i"
460 sun50i:
461 BUILDMAN: "sun50i"
462 arm_catch_all:
Tom Rinif04bde52021-02-15 10:52:19 -0500463 BUILDMAN: "arm -x arm11,arm7,arm9,aarch64,at91,bcm,freescale,kirkwood,mvebu,renesas,siemens,tegra,uniphier,mx,samsung,sunxi,am33xx,omap,rk,toradex,socfpga,k2,k3,zynq"
Bin Mengddaa6b12019-10-28 07:25:03 -0700464 sandbox_x86:
465 BUILDMAN: "sandbox x86"
466 technexion:
467 BUILDMAN: "technexion"
468 kirkwood:
469 BUILDMAN: "kirkwood"
470 mvebu:
471 BUILDMAN: "mvebu"
472 m68k:
473 BUILDMAN: "m68k"
474 mips:
475 BUILDMAN: "mips"
476 non_fsl_ppc:
477 BUILDMAN: "powerpc -x freescale"
478 mpc85xx_freescale:
Simon Glass88b8c4d2021-08-01 18:54:42 -0600479 BUILDMAN: "mpc85xx&freescale -x t208xrdb -x t102* -x p1_p2_rdb_pc -x p1010rdb -x corenet_ds -x bsc91*"
Bin Mengddaa6b12019-10-28 07:25:03 -0700480 t208xrdb_corenet_ds:
481 BUILDMAN: "t208xrdb corenet_ds"
482 fsl_ppc:
Simon Glass88b8c4d2021-08-01 18:54:42 -0600483 BUILDMAN: "mpc83xx&freescale"
Bin Mengddaa6b12019-10-28 07:25:03 -0700484 t102x:
485 BUILDMAN: "t102*"
486 p1_p2_rdb_pc:
487 BUILDMAN: "p1_p2_rdb_pc"
488 p1010rdb_bsc91:
489 BUILDMAN: "p1010rdb bsc91"
490 siemens:
491 BUILDMAN: "siemens"
492 tegra:
493 BUILDMAN: "tegra -x toradex"
494 am33xx_no_siemens:
495 BUILDMAN: "am33xx -x siemens"
496 omap:
497 BUILDMAN: "omap"
498 uniphier:
499 BUILDMAN: "uniphier"
500 aarch64_catch_all:
Tom Rini45b49bc2021-07-27 17:01:28 -0400501 BUILDMAN: "aarch64 -x bcm,imx8,k3,tegra,ls1,ls2,lx216,mvebu,uniphier,renesas,sunxi,samsung,socfpga,rk,versal,zynq"
Bin Mengddaa6b12019-10-28 07:25:03 -0700502 rockchip:
Tom Rinie289a162020-03-09 13:01:57 -0400503 BUILDMAN: "rk"
Tom Rinif04bde52021-02-15 10:52:19 -0500504 renesas:
505 BUILDMAN: "renesas"
Bin Mengddaa6b12019-10-28 07:25:03 -0700506 zynq:
507 BUILDMAN: "zynq&armv7"
508 zynqmp_versal:
509 BUILDMAN: "versal|zynqmp&aarch64"
510 riscv:
511 BUILDMAN: "riscv"
512 steps:
513 - script: |
514 cat << EOF > build.sh
515 set -ex
516 cd ${WORK_DIR}
517 # make environment variables available as tests are running inside a container
518 export BUILDMAN="${BUILDMAN}"
519 EOF
520 cat << "EOF" >> build.sh
521 if [[ "${BUILDMAN}" != "" ]]; then
522 ret=0;
Bin Meng8ba3d242021-01-31 16:38:35 +0800523 tools/buildman/buildman -o /tmp -P -E -W ${BUILDMAN} ${OVERRIDE} || ret=$?;
Simon Glassda499352020-03-18 09:42:57 -0600524 if [[ $ret -ne 0 ]]; then
Simon Glassad8eaed2020-03-18 09:42:53 -0600525 tools/buildman/buildman -o /tmp -seP ${BUILDMAN};
Bin Mengddaa6b12019-10-28 07:25:03 -0700526 exit $ret;
527 fi;
528 fi
529 EOF
530 cat build.sh
531 docker run -v $PWD:$(work_dir) $(ci_runner_image) /bin/bash $(work_dir)/build.sh