def __init__(self, project_rootpath):
     self.log = platform_logger("BuildTestcases")
     self.project_rootpath = project_rootpath
     self.is_doublefwk = UserConfigManager().get_user_config_flag(
         "common", "doublefwk")
     self.is_build_example = UserConfigManager().get_user_config_flag(
         "build", "example")
def get_subsystem_module_list():
    module_path_list = []
    testcase_dir = UserConfigManager().get_user_config("testcases").get("dir")
    if testcase_dir == "":
        module_path_list = get_output_path_by_param()
    else:
        module_path_list = \
            get_test_dir_by_param(testcase_dir)
    return module_path_list
Esempio n. 3
0
 def _before_execute_test(cls):
     """
     need copy test case to nfs dir
     :param request: nfs dir, test case path
     :return:
     """
     cls.nfs_dir = \
         UserConfigManager().get_user_config("NFS").get("host_dir")
     if cls.nfs_dir == "":
         cls.log.error("no configure for nfs directory")
         return False
     pre_result, status, _ = \
         cls.lite_device.execute_command_with_timeout("cd /{}".format(
             UserConfigManager().get_user_config("NFS").get("board_dir")),
         case_type=DeviceTestType.lite_cpp_test)
     if not status:
         cls.log.error("pre execute command failed")
         return False
     cls.log.info("pre execute command success")
     return True
 def get_target_out_path(cls, product_form, build_variant):
     target_out_path = UserConfigManager().get_user_config(
         "test_cases").get("dir", "")
     if target_out_path == "":
         target_out_path = os.path.join(
             sys.source_code_root_path,
             "out",
             build_variant,
             "packages",
             product_form)
     target_out_path = os.path.abspath(target_out_path)
     return target_out_path
Esempio n. 5
0
 def _build_version(cls, product_form):
     build_result = True
     project_root_path = sys.source_code_root_path
     if project_root_path != "":
         from _core.build.build_manager import BuildManager
         build_manager = BuildManager()
         is_build_version = UserConfigManager().get_user_config_flag(
             "build", "version")
         if is_build_version:
             build_result = build_manager.build_version(
                 project_root_path, product_form)
         else:
             build_result = build_manager.build_gn_file(
                 project_root_path, product_form)
     return build_result
def show_subsystem_list(product_form):
    print("List of currently supported subsystem names:")

    test_case_dir = \
        UserConfigManager().get_user_config("test_cases").get("dir")
    if test_case_dir == "":
        subsystem_name_list = FilterTargets(
            sys.source_code_root_path).get_part_name_list_by_product(
            product_form)
    else:
        subsystem_name_list = get_test_dir_by_subsystem(test_case_dir)

    subsystem_name_list.sort()
    for subsystem_name in subsystem_name_list:
        print("show subsystem_name: {}".format(subsystem_name))