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 = "\ ...@@ -68,6 +68,14 @@ ZEPHYRTESTS_DELETE:96b-nitrogen = "\
benchmarks/app_kernel \ benchmarks/app_kernel \
benchmarks/sys_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() { do_compile() {
if test -n "${ZEPHYRTESTS}"; then if test -n "${ZEPHYRTESTS}"; then
...@@ -130,17 +138,21 @@ do_compile() { ...@@ -130,17 +138,21 @@ do_compile() {
do_deploy () { do_deploy () {
if test -n "${ZEPHYRTESTS}"; then if test -n "${ZEPHYRTESTS}"; then
# Twister '--test-only' option only needs the below files. Directory rm -rf "${B}/twister-out"
# structure must be kept as it is. # Twister '--test-only' option needs the files defined in
# - zephyr.elf # ARTIFACTS variable for on device testing. Directory structure
# - twister.csv # must be kept as it is.
twister_out="${S}/twister-out" (
find ${twister_out}/ \( -type f -o -type l \) -a ! \( -name "zephyr.elf" -o -name "twister.csv" \) -print -delete cd "${S}"
find ${twister_out}/ -empty -type d -delete for artifact in ${ARTIFACTS}; do
find twister-out/ \( -type f -o -type l \) \
image_name="twister-out-${MACHINE}.tar.bz2" -name "${artifact}" \
tar -jcvf ${image_name} -C ${S} twister-out -exec cp --verbose --archive --parents {} "${B}" \;
install -D ${image_name} ${DEPLOYDIR}/ done
)
image_path="${B}/twister-out-${MACHINE}.tar.bz2"
tar -jcvf ${image_path} -C "${B}" twister-out
install -D ${image_path} ${DEPLOYDIR}/
else else
bbnote "Do nothing as ZEPHYRTESTS is empty." bbnote "Do nothing as ZEPHYRTESTS is empty."
fi 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