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

Merge branch 'feat/dsoftbus-porting' into 'kirkstone'

openharmony-standard-system-image-tests: Add OpenHarmony tests package

See merge request OSTC/pre-integration/meta-openharmony!64
parents c5b1bbc3 5b8d422e
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
require recipes-core/images/core-image-base.bb SUMMARY = "A console-only image with OpenHarmony first party components and unit tests"
inherit core-image
python do_check_if_testimage_inherited() { python do_check_if_testimage_inherited() {
if not bb.utils.contains("INHERIT", "testimage", True, False, d): if not bb.utils.contains("INHERIT", "testimage", True, False, d):
...@@ -29,4 +31,5 @@ EXTRA_IMAGE_FEATURES += "debug-tweaks" ...@@ -29,4 +31,5 @@ EXTRA_IMAGE_FEATURES += "debug-tweaks"
IMAGE_INSTALL += "sshd ptest-runner" IMAGE_INSTALL += "sshd ptest-runner"
# install OpenHarmony components and ptests # install OpenHarmony components and ptests
IMAGE_INSTALL += "openharmony-standard-system-components-exes hilog-ptest" IMAGE_INSTALL += "openharmony-standard-system-components-exes"
IMAGE_INSTALL += "openharmony-standard-system-components-tests"
...@@ -72,7 +72,7 @@ SRC_URI += "file://run-ptest" ...@@ -72,7 +72,7 @@ SRC_URI += "file://run-ptest"
inherit python3native gn ptest inherit python3native gn ptest
PTEST_PATH = "${libdir}/hilog/ptest" PTEST_PATH = "${datadir}/ptest"
B = "${S}/out/ohos-arm-release" B = "${S}/out/ohos-arm-release"
COMPATIBLE_MACHINE = "qemuarm" COMPATIBLE_MACHINE = "qemuarm"
...@@ -476,6 +476,32 @@ OPENHARMONY_LIBS=" \ ...@@ -476,6 +476,32 @@ OPENHARMONY_LIBS=" \
/system/lib/module/telephony/libsim.z.so \ /system/lib/module/telephony/libsim.z.so \
" "
# Openharmony service abilities are started by calling sa_main with a config xml
# file as an argument.
SERVICE_ABILITY_CONFIGS = " \
/system/profile/pulseaudio.xml \
/system/profile/telephony.xml \
/system/profile/multimodalinputservice.xml \
/system/profile/huks_service.xml \
/system/profile/distributedsched.xml \
/system/profile/accountmgr.xml \
/system/profile/foundation.xml \
/system/profile/distributeddata.xml \
/system/profile/media_service.xml \
/system/profile/audio_policy.xml \
/system/profile/dps_service.xml \
/system/profile/camera_service.xml \
/system/profile/inputmethod_service.xml \
/system/profile/softbus_server.xml \
/system/profile/time_service.xml \
"
OPENHARMONY_CONFIGS = " \
${SERVICE_ABILITY_CONFIGS} \
/system/etc/hilog_domains.conf \
/system/etc/communication/softbus/softbus_trans_permission.json \
"
# OpenHarmony build system generates all possible targets, but only `packages` # OpenHarmony build system generates all possible targets, but only `packages`
# target is build with ninja in the end # target is build with ninja in the end
NINJA_ARGS = "packages" NINJA_ARGS = "packages"
...@@ -520,13 +546,18 @@ do_install () { ...@@ -520,13 +546,18 @@ do_install () {
done done
install -D -m 644 ${THISDIR}/${PN}-${PV}/ohos-config.sh "${D}/etc/profile.d/ohos-config.sh" install -D -m 644 ${THISDIR}/${PN}-${PV}/ohos-config.sh "${D}/etc/profile.d/ohos-config.sh"
for cfg in ${OPENHARMONY_CONFIGS}
do
install -D -m 755 "${OHOS_PACKAGE_OUT_DIR}/${cfg}" "${D}/${cfg}"
done
} }
PACKAGES =+ "${PN}-libs ${PN}-exes ${PN}-configs hilog-ptest" PACKAGES =+ "${PN}-libs ${PN}-exes ${PN}-configs ${PN}-tests"
RDEPENDS:${PN}-libs += "libcxx musl libcrypto libssl libatomic" RDEPENDS:${PN}-libs += "libcxx musl libcrypto libssl libatomic"
RDEPENDS:${PN}-exes += "libcxx libcrypto ${PN}-libs ${PN}-configs" RDEPENDS:${PN}-exes += "libcxx libcrypto ${PN}-libs ${PN}-configs"
RDEPENDS:hilog-ptest += "${PN}-libs libcxx musl" RDEPENDS:${PN}-tests += "libcxx musl libcrypto libssl ${PN}-libs ${PN}-configs"
# ptest class adds ${PN}-ptest package which depends on ${PN} package which in # ptest class adds ${PN}-ptest package which depends on ${PN} package which in
# case of this umbrella-recipe is not provided # case of this umbrella-recipe is not provided
...@@ -540,8 +571,9 @@ FILES_SOLIBSDEV = "" ...@@ -540,8 +571,9 @@ FILES_SOLIBSDEV = ""
FILES:${PN}-libs = "${OPENHARMONY_LIBS}" FILES:${PN}-libs = "${OPENHARMONY_LIBS}"
FILES:${PN}-exes = "${OPENHARMONY_EXES}" FILES:${PN}-exes = "${OPENHARMONY_EXES}"
FILES:${PN}-configs = "/etc/profile.d/ohos-config.sh" FILES:${PN}-configs = "/etc/profile.d/ohos-config.sh"
FILES:${PN}-configs += "${OPENHARMONY_CONFIGS}"
FILES:hilog-ptest =+ "${PTEST_PATH}" FILES:${PN}-tests = "${PTEST_PATH}"
generate_build_config_json_file() { generate_build_config_json_file() {
...@@ -561,8 +593,10 @@ EOF ...@@ -561,8 +593,10 @@ EOF
} }
do_install_ptest () { do_install_ptest () {
install -d ${D}${PTEST_PATH} for f in $(cd "${B}/tests" && find . -type f)
install ${B}/tests/moduletest/hiviewdfx/hilog/HiLogNDKTest ${D}${PTEST_PATH} do
install -D -m 755 "${B}/tests/$f" "${D}${PTEST_PATH}/$f"
done
} }
generate_platforms_build_file() { 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