[code coverage] Set up properties for coverage builders

Bug: 896751
Change-Id: Ic73a6f6f297864a4a197c30fffb0477b2d03c649
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1766761
Reviewed-by: John Budorick <jbudorick@chromium.org>
Reviewed-by: Yuke Liao <liaoyuke@chromium.org>
Commit-Queue: Yun Liu <yliuyliu@google.com>
Cr-Commit-Position: refs/heads/master@{#689766}
diff --git a/infra/config/cr-buildbucket.cfg b/infra/config/cr-buildbucket.cfg
index 7788b7a..9463ef2 100644
--- a/infra/config/cr-buildbucket.cfg
+++ b/infra/config/cr-buildbucket.cfg
@@ -451,6 +451,17 @@
 builder_mixins {
   name: "clang-coverage"
   recipe {
+    properties_j: <<END
+      $build/code_coverage: {
+        "use_clang_coverage": true
+      }
+    END
+  }
+}
+
+builder_mixins {
+  name: "clang-coverage-tot"
+  recipe {
     name: "chromium_clang_coverage_tot"
   }
 }
@@ -571,6 +582,17 @@
 }
 
 builder_mixins {
+  name: "java-coverage"
+  recipe {
+    properties_j: <<END
+      $build/code_coverage: {
+        "use_java_coverage": true
+      }
+    END
+  }
+}
+
+builder_mixins {
   name: "linux-trusty"
   dimensions: "os:Ubuntu-14.04"
 }
@@ -1149,6 +1171,7 @@
     builders {
       name: "android-code-coverage"
       mixins: "code-coverage"
+      mixins: "java-coverage"
       mixins: "linux-xenial"
       mixins: "builderless"
       dimensions: "cores:32"
@@ -1454,6 +1477,7 @@
     builders {
       name: "chromeos-vm-code-coverage"
       mixins: "code-coverage"
+      mixins: "clang-coverage"
       mixins: "fyi-ci"
       mixins: "linux-xenial"
       mixins: "builderless"
@@ -1477,6 +1501,7 @@
     builders {
       name: "linux-chromeos-code-coverage"
       mixins: "code-coverage"
+      mixins: "clang-coverage"
       mixins: "fyi-ci"
       mixins: "linux-xenial"
       mixins: "builderless"
@@ -2230,7 +2255,7 @@
     builders {
       name: "ToTLinuxCoverage"
       mixins: "clang-linux-ci"
-      mixins: "clang-coverage"
+      mixins: "clang-coverage-tot"
     }
     builders {
       name: "ToTLinuxMSan"
@@ -2263,7 +2288,7 @@
     builders {
       name: "ToTMacCoverage"
       mixins: "clang-mac-ci"
-      mixins: "clang-coverage"
+      mixins: "clang-coverage-tot"
     }
     builders {
       name: "ToTWin(dbg)"
@@ -2565,6 +2590,7 @@
     builders {
       name: "ios-simulator-code-coverage"
       mixins: "code-coverage"
+      mixins: "clang-coverage"
       mixins: "ios"
       dimensions: "cores:"
     }
@@ -2572,12 +2598,14 @@
     builders {
       name: "linux-code-coverage"
       mixins: "code-coverage"
+      mixins: "clang-coverage"
       dimensions: "cores:32"
     }
 
     builders {
       name: "mac-code-coverage-generation"
       mixins: "code-coverage"
+      mixins: "clang-coverage"
       dimensions: "cores:24"
     }
     builders {
@@ -3908,6 +3936,7 @@
     builders {
       name: "android-kitkat-arm-coverage-rel"
       mixins: "android-try"
+      mixins: "java-coverage"
       mixins: "goma-j150"
       mixins: "builderless"
       mixins: "linux-xenial"
@@ -4441,12 +4470,14 @@
       mixins: "linux-try"
       mixins: "goma-j150"
       name: "linux-coverage-rel"
+      mixins: "clang-coverage"
       mixins: "builderless"
     }
     builders {
       mixins: "linux-try"
       mixins: "goma-j150"
       mixins: "builderless"
+      mixins: "clang-coverage"
       name: "linux-rel"
     }
     builders {