Esempio n. 1
0
def main():
    args = parse_arguments()
    script_dir = os.path.realpath(os.path.dirname(__file__))
    source_dir = os.path.normpath(os.path.join(script_dir, "..", ".."))
    cwd = os.path.abspath(os.path.join(args.build_dir, args.config))
    adb_shell('cd /data/local/tmp && tar -zcvf gcda_files.tar.gz *.dir')
    adb_pull('/data/local/tmp/gcda_files.tar.gz', cwd)
    os.chdir(cwd)
    run_subprocess("tar -zxvf gcda_files.tar.gz -C CMakeFiles".split(' '))
    run_subprocess("gcovr -s -r {} .".format(
        os.path.join(source_dir, "onnxruntime")).split(' '),
                   cwd=os.path.join(cwd, "CMakeFiles"))
Esempio n. 2
0
def main():
    args = parse_arguments()
    script_dir = os.path.realpath(os.path.dirname(__file__))
    source_dir = os.path.normpath(os.path.join(script_dir, "..", ".."))
    cwd = os.path.abspath(os.path.join(args.build_dir, args.config))
    adb_shell('cd /data/local/tmp && tar -zcf gcda_files.tar.gz *.dir')
    adb_pull('/data/local/tmp/gcda_files.tar.gz', cwd)
    os.chdir(cwd)
    run_subprocess("tar -zxf gcda_files.tar.gz -C CMakeFiles".split(' '))
    cmd = ["gcovr", "-s", "-r"]
    cmd.append(os.path.join(source_dir, "onnxruntime"))
    cmd.extend([".", "-o"])
    cmd.append(os.path.join(cwd, "coverage_rpt.txt"))
    run_subprocess(cmd, cwd=os.path.join(cwd, "CMakeFiles"))
Esempio n. 3
0
def main():
    args = parse_arguments()

    sdk_tool_paths = android.get_sdk_tool_paths(args.android_sdk_path)

    def adb_pull(src, dest, **kwargs):
        return run_subprocess([sdk_tool_paths.adb, "pull", src, dest],
                              **kwargs)

    def adb_shell(*args, **kwargs):
        return run_subprocess([sdk_tool_paths.adb, "shell", *args], **kwargs)

    script_dir = os.path.realpath(os.path.dirname(__file__))
    source_dir = os.path.normpath(os.path.join(script_dir, "..", ".."))
    cwd = os.path.abspath(os.path.join(args.build_dir, args.config))
    adb_shell("cd /data/local/tmp && tar -zcf gcda_files.tar.gz *.dir")
    adb_pull("/data/local/tmp/gcda_files.tar.gz", cwd)
    os.chdir(cwd)
    run_subprocess("tar -zxf gcda_files.tar.gz -C CMakeFiles".split(" "))
    cmd = ["gcovr", "-s", "-r"]
    cmd.append(os.path.join(source_dir, "onnxruntime"))
    cmd.extend([".", "-o"])
    cmd.append(os.path.join(cwd, "coverage_rpt.txt"))
    run_subprocess(cmd, cwd=os.path.join(cwd, "CMakeFiles"))
Esempio n. 4
0
 def adb_shell(*args, **kwargs):
     return run_subprocess([sdk_tool_paths.adb, "shell", *args], **kwargs)
Esempio n. 5
0
 def adb_pull(src, dest, **kwargs):
     return run_subprocess([sdk_tool_paths.adb, "pull", src, dest],
                           **kwargs)
Esempio n. 6
0
def adb_pull(src, dest, **kwargs):
    return run_subprocess(['adb', 'pull', src, dest], **kwargs)