mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/43778 Move code_coverage_tool from experimental folder to caffe2/tools folder. Delete `TODO` and fb-related code. Test Plan: Test locally Reviewed By: malfet Differential Revision: D23399983 fbshipit-source-id: 92316fd3cc88409d087d2dc6ed0be674155b3762
21 lines
571 B
Python
21 lines
571 B
Python
#!/usr/bin/env python
|
|
import time
|
|
|
|
from package.oss.cov_json import get_json_report
|
|
from package.oss.init import initialization
|
|
from package.tool.summarize_jsons import summarize_jsons
|
|
|
|
|
|
def report_coverage() -> None:
|
|
start_time = time.time()
|
|
(options, test_list, interested_folders) = initialization()
|
|
# run cpp tests
|
|
get_json_report(test_list, options)
|
|
# collect coverage data from json profiles
|
|
if options.need_summary:
|
|
summarize_jsons(test_list, interested_folders, [""], start_time)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
report_coverage()
|