Skip to content

Commit fb170f1

Browse files
committed
feat(ci): Check contents.xml for missing files
Extend the integration tests to also extract file names from contents.xml file and test whether these were generated by ptool (rawprogram*.xml, patch*.xml) or are known files provided in boot binaries. Signed-off-by: Loïc Minier <[email protected]>
1 parent abf334c commit fb170f1

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

tests/integration/check-missing-files

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,33 @@
22
# Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
33
# SPDX-License-Identifier: BSD-3-Clause-Clear
44

5-
# Takes XML files as arguments, collects the filenames referenced, and checks
6-
# if any gpt_* or zeros_* file is missing
5+
# Takes rawprogram*.xml and contents.xml files as arguments, collects the
6+
# filenames referenced, and checks if any gpt_* or zeros_* file is missing
77

88
set -eu
99

1010
errors=no
1111

1212
for xml in "$@"; do
1313
dir="$(dirname "${xml}")"
14-
for file in $(sed -En 's/.*filename="([^"]+)".*/\1/p' "${xml}" | sort -u); do
14+
rawprogram_filenames="$(
15+
sed -En 's:.*filename="([^"]+)".*:\1:p' "${xml}"
16+
)"
17+
contents_filenames="$(
18+
sed -En 's:.*<file_name>([^<]+)</file_name>.*:\1:p' "${xml}"
19+
)"
20+
for file in $(
21+
echo ${rawprogram_filenames} ${contents_filenames} | sort -u
22+
); do
1523
case "${file}" in
1624
# expected files that should be generated by ptool
17-
gpt_*|zeros_*)
25+
gpt_*|zeros_*|patch*.xml|rawprogram*.xml)
1826
if ! [ -r "${dir}/${file}" ]; then
1927
errors=yes
2028
echo "Missing ${file} referenced in ${xml}" >&2
2129
fi
2230
;;
23-
# known files that will be provided by the OS
31+
# known files that will be provided by the OS or boot binaries
2432
abl.elf) ;;
2533
aop.mbn) ;;
2634
boot.img) ;;
@@ -46,9 +54,12 @@ for xml in "$@"; do
4654
multi_image_qti.mbn) ;;
4755
multi_image.mbn) ;;
4856
pmic.elf) ;;
57+
prog_firehose_ddr.elf) ;;
58+
prog_firehose_lite.elf) ;;
4959
qupv3fw.elf) ;;
5060
rootfs.img) ;;
5161
rpm.mbn) ;;
62+
sailfreertos.elf) ;;
5263
sbc_1.0_8016.bin) ;;
5364
sbc_1.0_8096.bin) ;;
5465
sbl1.mbn) ;;

0 commit comments

Comments
 (0)