()
| 30 | |
| 31 | |
| 32 | def export() -> None: |
| 33 | start_time = time.time() |
| 34 | # collect .gcda files |
| 35 | gcda_files = get_gcda_files() |
| 36 | # file name like utils.cpp may have same name in different folder |
| 37 | gzip_dict: Dict[str, int] = {} |
| 38 | for gcda_item in gcda_files: |
| 39 | # generate json.gz |
| 40 | subprocess.check_call(["gcov", "-i", gcda_item]) |
| 41 | # cp json.gz to profile/json folder |
| 42 | gz_file_name = os.path.basename(gcda_item) + ".gcov.json.gz" |
| 43 | new_file_path = os.path.join( |
| 44 | JSON_FOLDER_BASE_DIR, update_gzip_dict(gzip_dict, gz_file_name) |
| 45 | ) |
| 46 | os.rename(gz_file_name, new_file_path) |
| 47 | # unzip json.gz to json |
| 48 | subprocess.check_output(["gzip", "-d", new_file_path]) |
| 49 | print_time("export take time: ", start_time, summary_time=True) |
nothing calls this directly
no test coverage detected
searching dependent graphs…