Cert: Generate backing process code coverage report after test run
* Generate line-by-line coverage report after test run using llvm-profdata and llvm-cov in JSON format * Iteratively merge coverage report to the same file for the backing processes of both cert stack and stack under test even when they are using the same binary * Since we cannot run a method after all tests, we have to iteratively merge coverage report into a common file after each test run * llvm-cov and llvm-profdata tool is packaged together with the test ZIP as they have to be the same version when indexing .profraw data Outputs: * Two indexed data files per test run: - GdDevice_cert_stock_backing_process_coverage.profdata - GdDevice_stack_under_test_backing_process_coverage.profdata * Two reports per test run: - GdDevice_cert_stock_backing_process_coverage.json - GdDevice_stack_under_test_backing_process_coverage.json * Two summaries per test run: - GdDevice_cert_stock_backing_process_coverage_summary.txt - GdDevice_stack_under_test_backing_process_coverage_summary.txt * Two raw data files per test class - GdDevice_cert_stock_backing_process_coverage.profraw - GdDevice_stack_under_test_backing_process_coverage.profraw Performance Analysis: * File Sizes: - profraw: around 6MB, 2 generated per test class - profdata: around 400KB, 2 generated per test class - coverage report: around 40MB, 2 generated per test run * Each coverage report takes about 2 seconds and hence 4 seconds per test class. 11 test classes would result in 44 seconds for the whole test suite * Hence, additional 80MB storage and about 50 seconds run time per test run Bug: 153384476 Test: gd/cert/run --host Change-Id: If488f1d1816fb1f9379729ace9d2b0e1a0343233
Loading
Please register or sign in to comment