Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/tester-exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ testimg() {
_IMG_NAME_MACHINE=${_IMG_NAME}-${MACHINE}

# Get test suite
wget ${_WGET_OPTS} ${TEST_SUITE_FOLDER_URL}/${TEST_SUITE_FILE}
wget ${_WGET_OPTS} ${TEST_SUITE_FOLDER_URL}/${TEST_CASES_FILE}
wget ${_WGET_OPTS} ${TEST_SUITE_FOLDER_URL}/${_IMG_NAME}/${TEST_SUITE_FILE}
wget ${_WGET_OPTS} ${TEST_SUITE_FOLDER_URL}/${_IMG_NAME}/${TEST_CASES_FILE}
tar -xzf ${TEST_SUITE_FILE}
tar -xzf ${TEST_CASES_FILE} -C iottest/

Expand Down
16 changes: 15 additions & 1 deletion meta-iotqa/classes/test-iot.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# TEST_QEMUBOOT_TIMEOUT can be used to set the maximum time in seconds the launch code will wait for the login prompt.

inherit testimage
DEPLOY_DIR_TESTSUITE ?= "${DEPLOY_DIR}/testsuite"
DEPLOY_DIR_TESTSUITE ?= "${DEPLOY_DIR}/testsuite/${IMAGE_BASENAME}"

# Extra target binaries not installed in the target image, required for image testing.
IOTQA_TESTIMAGEDEPENDS += "mraa-test read-map shm-util gdb upm-test"
Expand Down Expand Up @@ -180,6 +180,19 @@ def copy_manifest(d, tdir):
import shutil
shutil.copytree(srcpath, tdir)

def make_manifest(d, tdir):
common_testfile = "refkit-image-common.manifest"
profile_testfile = d.getVar("IMAGE_BASENAME", True) + ".manifest"
manifest_name = "image-testplan.manifest"
with open(os.path.join(tdir, common_testfile), "r") as f:
common_tests = f.read()
profile_tests = ""
if not profile_testfile == "refkit-image-common.manifest":
with open(os.path.join(tdir, profile_testfile), "r") as f:
profile_tests = f.read()
with open(os.path.join(tdir, manifest_name), "w") as f:
f.write(common_tests + profile_tests)

def re_creat_dir(path):
bb.utils.remove(path, recurse=True)
bb.utils.mkdirhier(path)
Expand All @@ -206,6 +219,7 @@ python do_test_iot_export() {
export_testsuite(d, exportdir)
plandir = os.path.join(exportdir, "testplan")
copy_manifest(d, plandir)
make_manifest(d, plandir)
outdir = d.getVar("DEPLOY_DIR_TESTSUITE", True)
bb.utils.mkdirhier(outdir)
fname = os.path.join(outdir, "iot-testsuite.tar.gz")
Expand Down
9 changes: 9 additions & 0 deletions meta-iotqa/conf/test/refkit-image-common.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Tests for common profile
oeqa.runtime.sanity.comm_ssh
oeqa.runtime.sanity.comm_managerdaemon
oeqa.runtime.sanity.baseos
oeqa.runtime.sanity.apprt_python
oeqa.runtime.sanity.mraa_hello
oeqa.runtime.sanity.iotivity
oeqa.runtime.alsa.alsa
oeqa.runtime.sanity.upm
1 change: 1 addition & 0 deletions meta-iotqa/conf/test/refkit-image-computervision.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tests for computervision profile
1 change: 1 addition & 0 deletions meta-iotqa/conf/test/refkit-image-gateway.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Tests for gateway profile
2 changes: 1 addition & 1 deletion meta-refkit/conf/distro/include/refkit-ci.inc
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ REFKIT_CI_SDK_TARGETS=""
# as possible.
REFKIT_CI_ESDK_TARGETS=""
# Following targets would be executed with do_test_iot_export task
REFKIT_CI_TEST_EXPORT_TARGETS="refkit-image-common"
REFKIT_CI_TEST_EXPORT_TARGETS="refkit-image-common refkit-image-computervision refkit-image-gateway"
# Execute automatic tests for following images with corresponding
# test suite and test files.
# Space separated list of tuples, each should in format:
Expand Down