diff options
author | Greg Estren <gregce@google.com> | 2016-06-17 16:16:16 +0000 |
---|---|---|
committer | Philipp Wollermann <philwo@google.com> | 2016-06-20 09:34:37 +0000 |
commit | 01a78e7ea1d81ef1c59efbde6cb437c956155fc7 (patch) | |
tree | 75216efe1eff03a5b0c7f8f4daffcaf58550c29f /src/main/java/com/google/devtools/build/lib/analysis | |
parent | 4912f7fcdcd066c395787943c903eba9e4bad009 (diff) |
Trim configurations requested for a target in BuildViewTestCase.
--
MOS_MIGRATED_REVID=125171507
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/analysis')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/analysis/BuildView.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java index 3c1aaf918e..7b42b376b5 100644 --- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java +++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java @@ -753,6 +753,16 @@ public class BuildView { return result.build(); } + /** + * Trims a configuration to the fragments needed by the given target. + */ + @VisibleForTesting + public BuildConfiguration trimConfigurationForTesting(Target target, BuildConfiguration config, + EventHandler eventHandler) throws InterruptedException { + return Iterables.getOnlyElement(trimConfigurations( + ImmutableList.<TargetAndConfiguration>of(new TargetAndConfiguration(target, config)), + eventHandler)).getConfiguration(); + } /** * Sets the possible artifact roots in the artifact factory. This allows the factory to resolve |