0

[code coverage] Only instrument Java class files related to affected source files for per-CL

Right now Java per-CL coverage instrument everything as full code base coverage.
To only instrument class files related to affected files in a CL, we can:
1. Extract class files only related to affected source files in a jar.
2. Instrument these extracted class files.
3. Extract unaffected members from original jar.
4. Zip everything out to output path.

Bug: 1001387
Change-Id: Iaf6a75c7f8005b5d64eee22bc604f25d0c2fcd8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1797109
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Commit-Queue: Yun Liu <yliuyliu@google.com>
Cr-Commit-Position: refs/heads/master@{#697661}
This commit is contained in:
Yun Liu
2019-09-18 17:06:31 +00:00
committed by Commit Bot
parent fc65955816
commit c0f2f73bc7
7 changed files with 171 additions and 74 deletions

@ -17,7 +17,7 @@ class files and runtime **.exec** files. Then we need to process them using the
```gn
target_os = "android"
jacoco_coverage = true
use_jacoco_coverage = true
```
Now when building, pre-instrumented files will be created in the build directory.