aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules
diff options
context:
space:
mode:
authorGravatar Peter Schmitt <schmitt@google.com>2015-09-21 15:53:53 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-09-21 15:57:00 +0000
commitbb155b010efd75ea97530fdd0946afae80633be3 (patch)
treeaff462a92613dd8b337791d8338997d61ee4d4d3 /src/main/java/com/google/devtools/build/lib/rules
parent2cffe03b6b19285c249f6321a07bb9c2e92fd468 (diff)
Use OS X compatible gcov with experimental_ios_test.
-- MOS_MIGRATED_REVID=103549584
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ExperimentalIosTestRule.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java12
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ExperimentalIosTestRule.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ExperimentalIosTestRule.java
index b3e2ff8176..129870e2f2 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ExperimentalIosTestRule.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ExperimentalIosTestRule.java
@@ -95,7 +95,7 @@ public final class ExperimentalIosTestRule implements RuleDefinition {
return ImmutableList.of();
}
return ImmutableList.of(
- configuration.getFragment(ObjcConfiguration.class).getGcovLabel());
+ configuration.getFragment(ObjcConfiguration.class).getExperimentalGcovLabel());
}
}))
.build();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
index e6846e39bd..24bd94a4f3 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcConfiguration.java
@@ -69,13 +69,14 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
private final ConfigurationDistinguisher configurationDistinguisher;
@Nullable private final Path clientWorkspaceRoot;
- // We only load these labels if the mode which uses them is enabled. That is know as part of the
+ // We only load these labels if the mode which uses them is enabled. That is known as part of the
// BuildConfiguration. This label needs to be part of a configuration because only configurations
// can conditionally cause loading.
// They are referenced from late bound attributes, and if loading wasn't forced in a
// configuration, the late bound attribute will fail to be initialized because it hasn't been
// loaded.
@Nullable private final Label gcovLabel;
+ @Nullable private final Label experimentalGcovLabel;
@Nullable private final Label dumpSymsLabel;
@Nullable private final Label defaultProvisioningProfileLabel;
@@ -96,6 +97,7 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
this.copts = ImmutableList.copyOf(objcOptions.copts);
this.compilationMode = Preconditions.checkNotNull(options.compilationMode, "compilationMode");
this.gcovLabel = options.objcGcovBinary;
+ this.experimentalGcovLabel = options.experimentalObjcGcovBinary;
this.dumpSymsLabel = objcOptions.dumpSyms;
this.defaultProvisioningProfileLabel = objcOptions.defaultProvisioningProfile;
this.iosMultiCpus = Preconditions.checkNotNull(objcOptions.iosMultiCpus, "iosMultiCpus");
@@ -217,6 +219,14 @@ public class ObjcConfiguration extends BuildConfiguration.Fragment {
}
/**
+ * Returns the label of the experimental gcov binary, used to get test coverage data for {@code
+ * experimental_ios_test}. Null iff not in coverage mode.
+ */
+ @Nullable public Label getExperimentalGcovLabel() {
+ return experimentalGcovLabel;
+ }
+
+ /**
* Returns the label of the dump_syms binary, used to get debug symbols from a binary. Null iff
* !{@link #generateDebugSymbols}.
*/