Пример #1
0
def convert_and_store_in_directory(dest_path, target_name):
    target_name = target_name.replace(Res.hprof_suffix, '')
    dump_file_path = os.path.join(dest_path, target_name)
    dump_file = dump_file_path + Res.hprof_suffix if not dump_file_path.endswith(
        Res.hprof_suffix) else dump_file_path
    Fun.make_dir_if_not_exist(dump_file_path)
    convert_file = os.path.join(dump_file_path,
                                target_name + Res.convert_suffix)
    Fun.p_open(Res.adb_convert_heap_profile(dump_file, convert_file))
Пример #2
0
def exception_handle(device_id, logcat_to_file=False):
    # if logcat_to_file:
    FunCom.log_cat_to_file(device_id)
    device_info = FunCom.parse_device_info(device_id)
    dir_to_store_logfile = FunCom.get_abspath(
        FunCom.path_join(
            Res.log_path, device_info + Res.underline + Res.logcat_tag +
            FunCom.current_time()))
    FunCom.make_dir_if_not_exist(dir_to_store_logfile)
    FunCom.log('Exception handle id:' + device_id + " dir to store log::" +
               dir_to_store_logfile)
    FunCom.p_open(Res.asb_shell_pull_log_file(device_id, dir_to_store_logfile))
Пример #3
0
def make_device_tag_dir(d):
    model, bluetooth = Fun.parse_device_model_and_bluetooth(d)
    path = os.path.join(Res.output_path, model + Res.underline + bluetooth)
    Fun.make_dir_if_not_exist(path)
    return path
Пример #4
0
import sys