#!/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, 'time.time', 'time.time', False, 'import time\n'), (12, 'package.oss.init.initialization', 'initialization', False, 'from package.oss.init import initialization\n'), (14, 'package.oss.cov_json.get_json_report', 'get_json_report', False, 'from package.oss.cov_json import get_json_report\n'), (17, 'package.tool.summarize_jsons.summarize_jsons', 'summarize_jsons', False, 'from package.tool.summarize_jsons import summarize_jsons\n')]