Skip to content
Snippets Groups Projects
Commit bb16b7a1 authored by Esben Haabendal's avatar Esben Haabendal
Browse files

openharmony-standard: Align ptest integration ptest.bbclass


This adjusts the ptest integration to align more with the normal way to use
ptest.bbclass, meaning we package into ${PN}-ptest package, place files in
/usr/lib/${BPN}/ptest and is prepared for extending the tests beyond the hilog
test suite.

Signed-off-by: default avatarEsben Haabendal <esben.haabendal@huawei.com>
parent a2c4a288
No related branches found
No related tags found
No related merge requests found
......@@ -7,13 +7,16 @@
mkdir -p /dev/unix/socket
mkdir -p /data/log/hilog
# Add /system/bin to PATH
export PATH="/system/bin:${PATH}"
# Add path to hilog test suite $PATH
PTEST_PATH=$(dirname $(readlink -f $0))
export PATH="${PTEST_PATH}/moduletest/hiviewdfx/hilog:${PATH}"
hilogd &
HILOGD_PID=$!
# Wait a bit so there is a better chance that hilogd is ready for the test
sleep 1
./HiLogNDKTest
HiLogNDKTest
TEST_RESULT=$?
kill "${HILOGD_PID}"
......
......@@ -79,7 +79,6 @@ SRC_URI += "file://run-ptest"
inherit python3native gn_base ptest
PTEST_PATH = "${libdir}/hilog/ptest"
B = "${S}/out/ohos-arm-release"
COMPATIBLE_MACHINE = "qemuarm"
......@@ -182,15 +181,11 @@ do_install () {
rm ${D}${bindir}/udevadm
}
PACKAGES =+ "${PN}-libs ${PN}-exes ${PN}-configs ${PN}-fonts hilog-ptest"
PACKAGES =+ "${PN}-libs ${PN}-exes ${PN}-configs ${PN}-fonts"
RDEPENDS:${PN}-libs += "libcxx musl libcrypto libssl libatomic"
RDEPENDS:${PN}-libs += "musl libcxx libcrypto libssl libatomic"
RDEPENDS:${PN}-exes += "musl libcxx libcrypto ${PN}-libs ${PN}-configs ${PN}-fonts"
RDEPENDS:hilog-ptest += "${PN}-libs libcxx musl"
# ptest class adds ${PN}-ptest package which depends on ${PN} package which in
# case of this umbrella-recipe is not provided
PACKAGES:remove = "${PN}-ptest"
RDEPENDS:${PN}-ptest = "${PN}-exes"
# OpenHarmony libraries are not versioned properly.
# Move the unversioned .so files to the primary package.
......@@ -202,8 +197,6 @@ FILES:${PN}-exes = "${bindir} /system/bin"
FILES:${PN}-configs = "${sysconfdir} /system/etc"
FILES:${PN}-fonts = "${datadir}/fonts /system/fonts"
FILES:hilog-ptest =+ "${PTEST_PATH}"
generate_build_config_json_file() {
mkdir -p "${OHOS_PRELOADER_BUILD_CONFIG_DIR}"
......@@ -222,8 +215,10 @@ EOF
}
do_install_ptest () {
install -d ${D}${PTEST_PATH}
install ${B}/tests/moduletest/hiviewdfx/hilog/HiLogNDKTest ${D}${PTEST_PATH}
for f in $(cd "${B}/tests" && find . -type f)
do
install -D -m 755 "${B}/tests/$f" "${D}${PTEST_PATH}/$f"
done
}
generate_platforms_build_file() {
......
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