#!/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
from package.util.setting import TestPlatform


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, [""], TestPlatform.OSS, start_time
        )


if __name__ == "__main__":
    report_coverage()

[((11, 17, 11, 28), 'time.time', 'time.time', ({}, {}), '()', False, 'import time\n'), ((12, 47, 12, 63), 'package.oss.init.initialization', 'initialization', ({}, {}), '()', False, 'from package.oss.init import initialization\n'), ((14, 4, 14, 39), 'package.oss.cov_json.get_json_report', 'get_json_report', ({(14, 20, 14, 29): 'test_list', (14, 31, 14, 38): 'options'}, {}), '(test_list, options)', False, 'from package.oss.cov_json import get_json_report\n'), ((17, 8, 19, 9), 'package.tool.summarize_jsons.summarize_jsons', 'summarize_jsons', ({(18, 12, 18, 21): 'test_list', (18, 23, 18, 41): 'interested_folders', (18, 43, 18, 47): "['']", (18, 49, 18, 65): 'TestPlatform.OSS', (18, 67, 18, 77): 'start_time'}, {}), "(test_list, interested_folders, [''], TestPlatform.OSS,\n    start_time)", False, 'from package.tool.summarize_jsons import summarize_jsons\n')]