From f76ac03dd824bb0c7b5ccd32f2e4a2e7a9aac61f Mon Sep 17 00:00:00 2001
From: Esben Haabendal <esben@geanix.com>
Date: Mon, 20 Feb 2023 14:28:10 +0100
Subject: [PATCH] Add minimal documentation of how to build and use ACTS

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 README.md                            |  3 ++-
 recipes-openharmony/tools/README.rst | 26 ++++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 143d828c..de0a5116 100644
--- a/README.md
+++ b/README.md
@@ -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.
diff --git a/recipes-openharmony/tools/README.rst b/recipes-openharmony/tools/README.rst
index 94f14cb5..9888d476 100644
--- a/recipes-openharmony/tools/README.rst
+++ b/recipes-openharmony/tools/README.rst
@@ -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]
+    ...
+
-- 
GitLab