Use ExecutionRequirements.REQUIRES_DARWIN instead of hard-coding the string
MOS_MIGRATED_REVID=143933349
@@ -30,6 +30,7 @@ import com.google.devtools.build.lib.analysis.Runfiles;
import com.google.devtools.build.lib.analysis.RunfilesProvider;
import com.google.devtools.build.lib.analysis.RunfilesSupport;
import com.google.devtools.build.lib.analysis.TransitiveInfoCollection;
+import com.google.devtools.build.lib.analysis.actions.ExecutionRequirements;
import com.google.devtools.build.lib.analysis.actions.FileWriteAction;
import com.google.devtools.build.lib.analysis.actions.SpawnAction;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
@@ -374,7 +375,7 @@ public abstract class CcBinary implements RuleConfiguredTargetFactory {
if (Platform.isApplePlatform(cppConfiguration.getTargetCpu())
&& TargetUtils.isTestRule(ruleContext.getRule())) {
ruleBuilder.addNativeDeclaredProvider(
- new ExecutionInfoProvider(ImmutableMap.of("requires-darwin", "")));
+ new ExecutionInfoProvider(ImmutableMap.of(ExecutionRequirements.REQUIRES_DARWIN, "")));
}
return ruleBuilder
