Commit 945f8ff6 authored by Yun Liu's avatar Yun Liu Committed by Commit Bot

[code coverage] Set a default coverage output directory for junit tests

Currently only set default output directory for instrumentation tests https://cs.chromium.org/chromium/src/build/config/android/internal_rules.gni?type=cs&q=%22--coverage-dir%22&sq=package:chromium&g=0&l=763-772
Should do the same for junit tests as well.
Will use this default directory to collect coverage data on bot.


Bug: 970021
Change-Id: I346a8a1493622e61634eebd340b4a8c1c64e93e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1641379Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Commit-Queue: Yun Liu <yliuyliu@google.com>
Cr-Commit-Position: refs/heads/master@{#665949}
parent 8c402c02
...@@ -792,6 +792,16 @@ template("test_runner_script") { ...@@ -792,6 +792,16 @@ template("test_runner_script") {
"--robolectric-runtime-deps-dir", "--robolectric-runtime-deps-dir",
"@WrappedPath(${_rebased_robolectric_runtime_deps_dir})", "@WrappedPath(${_rebased_robolectric_runtime_deps_dir})",
] ]
if (jacoco_coverage) {
# Set a default coverage output directory (can be overridden by user
# passing the same flag).
_rebased_coverage_dir =
rebase_path("$root_out_dir/coverage", root_build_dir)
executable_args += [
"--coverage-dir",
"@WrappedPath(${_rebased_coverage_dir})",
]
}
} else if (_test_type == "linker") { } else if (_test_type == "linker") {
executable_args += [ executable_args += [
"--test-apk", "--test-apk",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment