diff --git a/docker/tester-exec.sh b/docker/tester-exec.sh index b2d51691d4..e957822ed9 100755 --- a/docker/tester-exec.sh +++ b/docker/tester-exec.sh @@ -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/ diff --git a/meta-iotqa/classes/test-iot.bbclass b/meta-iotqa/classes/test-iot.bbclass index 5e7f8ac704..c1537c0f48 100644 --- a/meta-iotqa/classes/test-iot.bbclass +++ b/meta-iotqa/classes/test-iot.bbclass @@ -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" @@ -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) @@ -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") diff --git a/meta-iotqa/conf/test/refkit-image-common.manifest b/meta-iotqa/conf/test/refkit-image-common.manifest new file mode 100644 index 0000000000..0e773800b8 --- /dev/null +++ b/meta-iotqa/conf/test/refkit-image-common.manifest @@ -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 diff --git a/meta-iotqa/conf/test/refkit-image-computervision.manifest b/meta-iotqa/conf/test/refkit-image-computervision.manifest new file mode 100644 index 0000000000..537fcd7a7b --- /dev/null +++ b/meta-iotqa/conf/test/refkit-image-computervision.manifest @@ -0,0 +1 @@ +# Tests for computervision profile diff --git a/meta-iotqa/conf/test/refkit-image-gateway.manifest b/meta-iotqa/conf/test/refkit-image-gateway.manifest new file mode 100644 index 0000000000..924dfc120a --- /dev/null +++ b/meta-iotqa/conf/test/refkit-image-gateway.manifest @@ -0,0 +1 @@ +# Tests for gateway profile diff --git a/meta-refkit/conf/distro/include/refkit-ci.inc b/meta-refkit/conf/distro/include/refkit-ci.inc index c886c88d4e..d5652f7eed 100644 --- a/meta-refkit/conf/distro/include/refkit-ci.inc +++ b/meta-refkit/conf/distro/include/refkit-ci.inc @@ -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: