From d01728eb8d047bf030fbcb7ff0023eb6033bc44c Mon Sep 17 00:00:00 2001 From: renxiang Date: Fri, 22 Oct 2021 11:21:06 +0800 Subject: [PATCH 1/4] modify js testcase build method Signed-off-by: renxiang --- examples/app_info/test/unittest/common/get_app_info/BUILD.gn | 2 ++ .../app_info/test/unittest/common/get_app_info/config.json | 1 + src/core/build/build_manager.py | 4 ---- src/main/_init_global_config.py | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/app_info/test/unittest/common/get_app_info/BUILD.gn b/examples/app_info/test/unittest/common/get_app_info/BUILD.gn index 3965ed3..f8a82bd 100644 --- a/examples/app_info/test/unittest/common/get_app_info/BUILD.gn +++ b/examples/app_info/test/unittest/common/get_app_info/BUILD.gn @@ -18,6 +18,8 @@ module_output_path = "developertest/app_info" ohos_js_unittest("GetAppInfoJsTest") { module_out_path = module_output_path + suite_path = + "//test/developertest/examples/app_info/test/unittest/common/get_app_info" hap_profile = "./config.json" certificate_profile = "//test/developertest/signature/openharmony_sx.p7b" } diff --git a/examples/app_info/test/unittest/common/get_app_info/config.json b/examples/app_info/test/unittest/common/get_app_info/config.json index 9889c14..c5d8256 100644 --- a/examples/app_info/test/unittest/common/get_app_info/config.json +++ b/examples/app_info/test/unittest/common/get_app_info/config.json @@ -25,6 +25,7 @@ }, "abilities": [ { + "visible": true, "skills": [ { "entities": [ diff --git a/src/core/build/build_manager.py b/src/core/build/build_manager.py index c6e684b..f2d437f 100755 --- a/src/core/build/build_manager.py +++ b/src/core/build/build_manager.py @@ -96,9 +96,6 @@ class BuildManager(object): LOG.warning("No build target found.") return False - pretreat = PretreatTargets(target_list) - pretreat.pretreat_targets_from_list() - build_cfg_filepath = os.path.join(project_root_path, "test", "developertest", @@ -115,7 +112,6 @@ class BuildManager(object): para.productform, "make_temp_test") self._make_gn_file(build_cfg_filepath, []) - pretreat.disassemble_targets_from_list() return build_result diff --git a/src/main/_init_global_config.py b/src/main/_init_global_config.py index a7d2b77..7929e80 100755 --- a/src/main/_init_global_config.py +++ b/src/main/_init_global_config.py @@ -95,6 +95,8 @@ def _load_internal_plugins(): try: import xdevice_extension._core.environment _iter_module_plugins([xdevice_extension._core.environment]) + import xdevice_extension._core.driver + _iter_module_plugins([xdevice_extension._core.driver]) except (ModuleNotFoundError, ImportError): pass -- Gitee From 95eed611168b1a8c2b844cf12c150fbaa3563c6d Mon Sep 17 00:00:00 2001 From: NicoYam Date: Fri, 22 Oct 2021 03:37:37 +0000 Subject: [PATCH 2/4] modify js testcase build method Signed-off-by: renxiang --- src/core/driver/drivers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/driver/drivers.py b/src/core/driver/drivers.py index 027b050..6c9a9db 100755 --- a/src/core/driver/drivers.py +++ b/src/core/driver/drivers.py @@ -754,7 +754,7 @@ class JSUnitTestDriver(IDriver): if "success" in str(result_value).lower(): LOG.info("execute %s's testcase success. result value=%s" % (self.package_name, result_value)) - time.sleep(5) + time.sleep(30) else: LOG.info("execute %s's testcase failed. result value=%s" % (self.package_name, result_value)) -- Gitee From 9739374d5ba4c360a1a18a07dbf7969a72c7b5a9 Mon Sep 17 00:00:00 2001 From: NicoYam Date: Fri, 22 Oct 2021 09:44:09 +0000 Subject: [PATCH 3/4] modify js testcase build method Signed-off-by: renxiang --- examples/app_info/test/unittest/common/get_app_info/BUILD.gn | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/app_info/test/unittest/common/get_app_info/BUILD.gn b/examples/app_info/test/unittest/common/get_app_info/BUILD.gn index f8a82bd..3965ed3 100644 --- a/examples/app_info/test/unittest/common/get_app_info/BUILD.gn +++ b/examples/app_info/test/unittest/common/get_app_info/BUILD.gn @@ -18,8 +18,6 @@ module_output_path = "developertest/app_info" ohos_js_unittest("GetAppInfoJsTest") { module_out_path = module_output_path - suite_path = - "//test/developertest/examples/app_info/test/unittest/common/get_app_info" hap_profile = "./config.json" certificate_profile = "//test/developertest/signature/openharmony_sx.p7b" } -- Gitee From c6470c6a7eee86bbb0cba0202f33a95ed8e35948 Mon Sep 17 00:00:00 2001 From: NicoYam Date: Sat, 23 Oct 2021 08:01:49 +0000 Subject: [PATCH 4/4] modify js testcase build method Signed-off-by: renxiang --- src/core/build/build_testcases.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/core/build/build_testcases.py b/src/core/build/build_testcases.py index 929e4d2..2189a1b 100755 --- a/src/core/build/build_testcases.py +++ b/src/core/build/build_testcases.py @@ -162,8 +162,6 @@ class BuildTestcases(object): command.append("--product-name") command.append(productform) - command.append("--export-para") - command.append("PYCACHE_ENABLE:true") if os.path.exists(BUILD_FILEPATH): build_command = [BUILD_FILEPATH] -- Gitee