/
vshmidt
/
pytorch
Обзор
Документация
Войти
/
vshmidt
/
pytorch
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tools/code_coverage/package/oss/run.py
29 строк
1019 B
yujunzhao@devvm229.ftw0.facebook.com
Land code coverage tool for OSS (#43778)
28 авг 2020, 23:56
28 авг 2020, 23:56
0564d7a
Код
Авторство
О чём код?
import os import time from ..tool import clang_coverage, gcc_coverage from ..util.setting import TestList, TestPlatform from ..util.utils import get_raw_profiles_folder, print_time from .utils import get_oss_binary_file def clang_run(tests: TestList) -> None: start_time = time.time() for test in tests: # raw_file raw_file = os.path.join(get_raw_profiles_folder(), test.name + ".profraw") # binary file binary_file = get_oss_binary_file(test.name, test.test_type) clang_coverage.run_target( binary_file, raw_file, test.test_type, TestPlatform.OSS ) print_time("running binaries takes time: ", start_time, summary_time=True) def gcc_run(tests: TestList) -> None: start_time = time.time() for test in tests: # binary file binary_file = get_oss_binary_file(test.name, test.test_type) gcc_coverage.run_target(binary_file, test.test_type) print_time("run binaries takes time: ", start_time, summary_time=True)