Search in sources :

Example 1 with EvaluationResult

use of com.google.devtools.build.skyframe.EvaluationResult in project bazel by bazelbuild.

the class ConfigurationsForTargetsTest method getConfiguredDeps.

/**
   * Returns the configured deps for a given target, assuming the target uses the target
   * configuration.
   */
private Multimap<Attribute, ConfiguredTarget> getConfiguredDeps(String targetLabel) throws Exception {
    update(targetLabel);
    SkyKey key = ComputeDependenciesFunction.key(getTarget(targetLabel), getTargetConfiguration());
    // Must re-enable analysis for Skyframe functions that create configured targets.
    skyframeExecutor.getSkyframeBuildView().enableAnalysis(true);
    Object evalResult = SkyframeExecutorTestUtils.evaluate(skyframeExecutor, key, /*keepGoing=*/
    false, reporter);
    skyframeExecutor.getSkyframeBuildView().enableAnalysis(false);
    SkyValue value = ((EvaluationResult<ComputeDependenciesFunction.Value>) evalResult).get(key);
    return ((ComputeDependenciesFunction.Value) value).depMap;
}
Also used : SkyKey(com.google.devtools.build.skyframe.SkyKey) SkyValue(com.google.devtools.build.skyframe.SkyValue) SkyValue(com.google.devtools.build.skyframe.SkyValue) EvaluationResult(com.google.devtools.build.skyframe.EvaluationResult)

Aggregations

EvaluationResult (com.google.devtools.build.skyframe.EvaluationResult)1 SkyKey (com.google.devtools.build.skyframe.SkyKey)1 SkyValue (com.google.devtools.build.skyframe.SkyValue)1