| 671 | LCOV_HTML_DIR = os.path.join(ROOT_DIR, 'build', 'lcov') |
| 672 | |
| 673 | def lcov_generate(): |
| 674 | try: os.unlink(LCOV_OUTPUT_FILE) |
| 675 | except OSError: pass |
| 676 | try: shutil.rmtree(LCOV_HTML_DIR) |
| 677 | except OSError: pass |
| 678 | |
| 679 | print("Capturing lcov info...") |
| 680 | subprocess.call(['lcov', '-q', '-c', |
| 681 | '-d', os.path.join(ROOT_DIR, 'build'), |
| 682 | '-b', ROOT_DIR, |
| 683 | '--output-file', LCOV_OUTPUT_FILE]) |
| 684 | |
| 685 | print("Generating lcov HTML output...") |
| 686 | ret = subprocess.call(['genhtml', '-q', LCOV_OUTPUT_FILE, |
| 687 | '--output-directory', LCOV_HTML_DIR, |
| 688 | '--legend', '--highlight']) |
| 689 | if ret != 0: |
| 690 | print("genhtml failed!") |
| 691 | else: |
| 692 | print("HTML output generated under build/lcov/") |
| 693 | |
| 694 | def check_lint(lint_args): |
| 695 | """ |