forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow
python_test_runner.py
to get coverage for individual targets (p…
…antsbuild#8910) ### Problem For parity with V1 we need to generate coverage reports. ### Solution Have the run_python_test rule optionally run coverage. ### Result This is part one of several in getting coverage reports in V2. I've broken it up here to keep it reviewable. At this point if you run ``` ./pants --no-process-execution-cleanup-local-dirs --v2 --no-v1 test --test-run-coverage src/python/pants/base:tests ``` You'll see that it produces a `.coverage` file in `<chroot>/.coverage` This is accessable via TestResult. _python_sqlite_coverage_file` (see pantsbuild#8915 for ways we might improve on that. ) ### Upcoming changes: - A rule for merging coverage data, and its product `MergedCoverageData` - A rule for generating coverage reports, and its product `CoverageReport` - A subsystem for all the coverage options (include test sources, coverage report format (html or xml), and coverage output dir.) You can see the design doc for this at pantsbuild#8915
- Loading branch information
1 parent
670f898
commit 899aadc
Showing
2 changed files
with
78 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters