Skip to content
Snippets Groups Projects
Commit fb280603 authored by Chase Qi's avatar Chase Qi
Browse files

zephyr-kernel-test-twister: fix image deployment for zephyr v3.1.0


Twister switched data format from csv to json in v3.1.0.

Signed-off-by: default avatarChase Qi <chase.qi@linaro.org>
parent 7574ff04
No related branches found
No related tags found
1 merge request!19zephyr-kernel-test-twister: fix image deployment for zephyr v3.1.0
Pipeline #7575 passed with warnings
......@@ -68,6 +68,14 @@ ZEPHYRTESTS_DELETE:96b-nitrogen = "\
benchmarks/app_kernel \
benchmarks/sys_kernel \
"
# Deploy the needed files that can be executed and run on DUT using
# twister --test-only.
ARTIFACTS = "\
twister.json \
zephyr.hex \
zephyr.bin \
zephyr.elf \
"
do_compile() {
if test -n "${ZEPHYRTESTS}"; then
......@@ -130,17 +138,21 @@ do_compile() {
do_deploy () {
if test -n "${ZEPHYRTESTS}"; then
# Twister '--test-only' option only needs the below files. Directory
# structure must be kept as it is.
# - zephyr.elf
# - twister.csv
twister_out="${S}/twister-out"
find ${twister_out}/ \( -type f -o -type l \) -a ! \( -name "zephyr.elf" -o -name "twister.csv" \) -print -delete
find ${twister_out}/ -empty -type d -delete
image_name="twister-out-${MACHINE}.tar.bz2"
tar -jcvf ${image_name} -C ${S} twister-out
install -D ${image_name} ${DEPLOYDIR}/
rm -rf "${B}/twister-out"
# Twister '--test-only' option needs the files defined in
# ARTIFACTS variable for on device testing. Directory structure
# must be kept as it is.
(
cd "${S}"
for artifact in ${ARTIFACTS}; do
find twister-out/ \( -type f -o -type l \) \
-name "${artifact}" \
-exec cp --verbose --archive --parents {} "${B}" \;
done
)
image_path="${B}/twister-out-${MACHINE}.tar.bz2"
tar -jcvf ${image_path} -C "${B}" twister-out
install -D ${image_path} ${DEPLOYDIR}/
else
bbnote "Do nothing as ZEPHYRTESTS is empty."
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment