From b4d58a27680d84097a5d1d66ab15fdd2efb8eda6 Mon Sep 17 00:00:00 2001 From: Ulf Adams Date: Mon, 31 Aug 2015 15:15:48 +0000 Subject: Remove the OFFLINE coverage file constant. All the code paths to the baseline coverage action now go through the InstrumentedFilesCollector, which only passes the local sources for baseline coverage, which are only those files matching the instrumentation spec, which in turn are only files that are valid for offline coverage (in combination with the withBaselineCoverage flag). -- MOS_MIGRATED_REVID=101935566 --- src/main/java/com/google/devtools/build/lib/Constants.java | 6 ------ .../devtools/build/lib/rules/test/BaselineCoverageAction.java | 10 +--------- 2 files changed, 1 insertion(+), 15 deletions(-) (limited to 'src/main/java/com/google/devtools') diff --git a/src/main/java/com/google/devtools/build/lib/Constants.java b/src/main/java/com/google/devtools/build/lib/Constants.java index 9f9d2f96c8..9c0bce686f 100644 --- a/src/main/java/com/google/devtools/build/lib/Constants.java +++ b/src/main/java/com/google/devtools/build/lib/Constants.java @@ -37,12 +37,6 @@ public class Constants { public static final String PRELUDE_FILE_DEPOT_RELATIVE_PATH = "tools/build_rules/prelude_bazel"; - /** - * List of file extensions of which baseline coverage generation is supported. - */ - public static final ImmutableList BASELINE_COVERAGE_OFFLINE_INSTRUMENTATION_SUFFIXES = - ImmutableList.of(); - public static final String ANDROID_DEFAULT_SDK = "//external:android/sdk".toString(); public static final String ANDROID_DEFAULT_CROSSTOOL = "//external:android/crosstool".toString(); public static final ImmutableList ANDROID_DEFAULT_FAT_APK_CPUS = diff --git a/src/main/java/com/google/devtools/build/lib/rules/test/BaselineCoverageAction.java b/src/main/java/com/google/devtools/build/lib/rules/test/BaselineCoverageAction.java index fc281d8f10..a93585758d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/test/BaselineCoverageAction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/test/BaselineCoverageAction.java @@ -18,7 +18,6 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import com.google.common.eventbus.EventBus; -import com.google.devtools.build.lib.Constants; import com.google.devtools.build.lib.actions.ActionOwner; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.actions.Executor; @@ -69,15 +68,8 @@ public final class BaselineCoverageAction extends AbstractFileWriteAction private Iterable getInstrumentedFilePathStrings() { List result = new ArrayList<>(); for (Artifact instrumentedFile : instrumentedFiles) { - String pathString = instrumentedFile.getExecPathString(); - for (String suffix : Constants.BASELINE_COVERAGE_OFFLINE_INSTRUMENTATION_SUFFIXES) { - if (pathString.endsWith(suffix)) { - result.add(pathString); - break; - } - } + result.add(instrumentedFile.getExecPathString()); } - return result; } -- cgit v1.2.3