Skip to content
Snippets Groups Projects
Commit bb1b37a8 authored by Francesco Pham's avatar Francesco Pham
Browse files

Merge branch 'acts' into 'kirkstone'

Add ACTS test suite to openharmony-tools

Closes #58 and #68

See merge request eclipse/oniro-core/meta-openharmony!96
parents ed86c8be 1aa9338c
No related branches found
No related tags found
1 merge request!96Add ACTS test suite to openharmony-tools
Pipeline #15030 canceled
......@@ -119,7 +119,8 @@ for more information.
## OpenHarmony host tools
To facilitate working with OpenHarmony systems, an image with various host tools
is provided.
is provided. The ACTS test suite for testing for OpenHarmony compatibility can
be included in this image.
See [recipes-openharmony/tools/README.rst](recipes-openharmony/tools/README.rst)
for more information.
......
......@@ -22,6 +22,9 @@ DISTROOVERRIDES:append = "${OPENHARMONY_OVERRIDES}"
PREFERRED_VERSION_openharmony-standard = "${OPENHARMONY_VERSION}"
# Enable "df-acts" override
DISTRO_FEATURES_OVERRIDES += "acts"
# clang_rt.profile library is used in openharmony-standard build
PACKAGECONFIG:pn-compiler-rt:append:df-openharmony = " profile"
......
......@@ -39,6 +39,8 @@ MACHINE ??= "qemuarma7"
# Default policy config
#
DISTRO ?= "oniro-openharmony-linux"
# Comment this out if you don't want to build ACTS test suite
DISTRO_FEATURES:append = " acts"
#
# Extra image configuration defaults
......
......@@ -1962,6 +1962,26 @@ do_install_ptest:append() {
done
}
PACKAGES:prepend:df-acts = "${PN}-acts "
do_install:append:df-acts() {
mkdir -p ${D}${libexecdir}/${PN}/acts
for d in config testcases ; do
cp -dR --no-preserve=ownership ${B}/suites/acts/$d ${D}${libexecdir}/${PN}/acts/
done
}
FILES:${PN}-acts = "${libexecdir}/${PN}/acts"
INSANE_SKIP:${PN}-acts = "file-rdeps"
PACKAGES =+ "${PN}-hits"
do_install_ptest:append() {
install -D ${WORKDIR}/run-ptest ${D}${libdir}/${BPN}-hits/ptest/run-ptest
mv ${D}${PTEST_PATH}/moduletest/hits ${D}${libdir}/${BPN}-hits/ptest/moduletest
mv ${D}${PTEST_PATH}/moduletest/hit/* ${D}${libdir}/${BPN}-hits/ptest/moduletest
}
FILES:${PN}-hits = "${libdir}/${BPN}-hits/ptest"
RDEPENDS:${PN}-hits += "musl libcxx"
RDEPENDS:${PN}-hits += "${PN}-hicollie ${PN}-libutils ${PN}-hisysevent ${PN}-hiview ${PN}-hitrace ${PN}-hilog ${PN}-faultlogger"
EXCLUDE_FROM_SHLIBS = "1"
# To avoid excessive diskspace blowup, we are stripping our executables
......
......@@ -25,6 +25,10 @@ Once that is in place, the `bitbake` command is simply::
DISTRO=oniro-openharmony-linux MACHINE=qemuarma7 bitbake openharmony-tools
The default configuration (as defined in
[local.conf.sample](conf/local.conf.sample)), enables building of ACTS and
inclusion in the `openharmony-tools` image.
Installation
************
......@@ -46,3 +50,25 @@ In order to use the installed tools, you need to setup your shell environment
$ . /opt/openharmony-tools/environment-setup-x86_64-oesdk-linux
And with that, you will have access to `hdc` and `xdevice` commands.
Running ACTS
============
To run ACTS tests, you need to connect to the OpenHarmony target device (or
QEMU) using `hdc` and then run the tests using `xdevice` command.
(remember to setup the environment as show in the section above)
As an example, running the `ActsContextTest.json` test case against QEMU target
(IP address 192.168.7.2), run
.. code-block::
$ hdc tconn 192.168.7.2:35000
Connect OK
$ xdevice run acts -l ActsContextTest
[2023-02-20 13:25:22,954] [Main] [INFO] [*************** xDevice Test Framework Starting ***************]
[2023-02-20 13:25:22,975] [Utils] [INFO] [The running command is: hdc_std -s tcp:8710 reset]
[2023-02-20 13:25:23,980] [Console] [INFO] [Input command: run -l ActsContextTest]
...
......@@ -8,7 +8,6 @@ LICENSE = "Apache-2.0"
require sanity-check.inc
TOOLCHAIN_HOST_TASK = "nativesdk-hdc nativesdk-xdevice"
TOOLCHAIN_TARGET_TASK = ""
TOOLCHAIN_OUTPUTNAME = "${PN}-${OPENHARMONY_VERSION}-${TUNE_PKGARCH}-${SDK_VERSION}"
......@@ -62,6 +61,16 @@ EOF
fi
}
TOOLCHAIN_TARGET_TASK:append:df-acts = " openharmony-standard-acts"
create_sdk_files:append:df-acts () {
pwd
for f in ${SDK_OUTPUT}/${SDKTARGETSYSROOT}${libexecdir}/openharmony-standard/acts/* ; do
f=$(basename $f)
ln -sft ${SDK_OUTPUT}/${SDKPATHNATIVE}${libdir_nativesdk}/python* \
../../../../${MULTIMACH_TARGET_SYS}${libexecdir}/openharmony-standard/acts/$f
done
}
TOOLCHAIN_NEED_CONFIGSITE_CACHE = ""
INHIBIT_DEFAULT_DEPS = "1"
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