ptest: better ptest support

Make run-ptest script correctly log passed and failed tests.
Set env variables to make more tests pass correctly.

Pick-to: 6.6 6.5
Change-Id: I3c23a0a093b396df6b88aedc51a15a871f1ba9e9
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
This commit is contained in:
Samuli Piippo 2023-11-01 13:37:47 +00:00
parent 44f08284c7
commit 097cfd9d54
3 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,16 @@
#!/bin/sh
if [ ! -e tst_list ]; then
echo PASS: no tests
exit 0
fi
export LANG=C.UTF-8
export QT_QPA_PLATFORM=offscreen
for test in $(cat tst_list); do
( cd $(dirname ${test}) && ./$(basename ${test}) )
(
cd $(dirname ${test})
t=$(basename ${test})
./${t} && echo PASS: ${t} || echo FAIL: ${t}
)
done

View File

@ -10,6 +10,8 @@ DEBUG_PREFIX_MAP += "\
-fmacro-prefix-map=${D}= \
"
do_install_ptest_base[progress] = "${@d.getVarFlag('do_compile', 'progress')}"
fakeroot do_install_ptest() {
cat >${WORKDIR}/toolchain-ptest.cmake <<EOF
include(${WORKDIR}/toolchain.cmake)

View File

@ -33,6 +33,7 @@ DEPENDS:remove:class-native = "qtbase-native"
RDEPENDS_${PN}:remove:class-native = "libssl-native"
RRECOMMENDS:${PN}:append:libc-glibc:class-target = " locale-base-c"
RRECOMMENDS:${PN}-ptest:append = " tzdata"
PACKAGECONFIG:class-native ?= "\
gui widgets jpeg png dbus no-opengl openssl zlib zstd \