diff options
author | Googler <noreply@google.com> | 2015-09-11 23:12:59 +0000 |
---|---|---|
committer | Kristina Chodorow <kchodorow@google.com> | 2015-09-14 15:39:15 +0000 |
commit | 2ad1c81755063b72a599844e730e0344344f61e8 (patch) | |
tree | b704f77454ac2a32a2f907daabf5e5c08736ac00 /src/main/java/com/google | |
parent | 96be0c17f0f5576b6c16aa954590c0ecbadb2c8b (diff) |
Make StdRedirect.dylib as a dependency of all ios_test and experimental_ios_test, and pass in its path instead of using the one wrapped in the _deploy.jar file.
Now we're still using iossim to launch the app when we invoke "blaze run", will change it in another CL.
--
MOS_MIGRATED_REVID=102886514
Diffstat (limited to 'src/main/java/com/google')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java | 2 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/objc/TestSupport.java | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java index 0706d21043..d753115812 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java @@ -987,6 +987,8 @@ public class ObjcRuleClasses { // Needed to run the binary in the simulator. .add(attr("$iossim", LABEL).cfg(HOST).exec() .value(env.getLabel("//third_party/iossim:iossim"))) + .add(attr("$std_redirect_dylib", LABEL).cfg(HOST).exec() + .value(env.getLabel("//tools/objc:StdRedirect.dylib"))) .build(); } @Override diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/TestSupport.java b/src/main/java/com/google/devtools/build/lib/rules/objc/TestSupport.java index cf00943c8f..4a5cb16d59 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/TestSupport.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/TestSupport.java @@ -113,6 +113,8 @@ public class TestSupport { private ImmutableList<Substitution> substitutionsForSimulator() { ImmutableList.Builder<Substitution> substitutions = new ImmutableList.Builder<Substitution>() .add(Substitution.of("%(iossim_path)s", iossim().getRootRelativePath().getPathString())) + .add(Substitution.of("%(std_redirect_dylib_path)s", + stdRedirectDylib().getRootRelativePath().getPathString())) .addAll(deviceSubstitutions().getSubstitutionsForTestRunnerScript()); Optional<Artifact> testRunner = testRunner(); @@ -153,6 +155,10 @@ public class TestSupport { return ruleContext.getPrerequisiteArtifact("$iossim", Mode.HOST); } + private Artifact stdRedirectDylib() { + return ruleContext.getPrerequisiteArtifact("$std_redirect_dylib", Mode.HOST); + } + /** * Gets the binary of the testrunner attribute, if there is one. */ @@ -202,6 +208,7 @@ public class TestSupport { if (!runWithLabDevice()) { runfilesBuilder .addArtifact(iossim()) + .addArtifact(stdRedirectDylib()) .addTransitiveArtifacts(deviceRunfiles()) .addArtifacts(testRunner().asSet()); } else { |