aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java b/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java
index 02ce8cc405..77dc6b4899 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/engine/TestsFunction.java
@@ -19,7 +19,6 @@ import com.google.devtools.build.lib.query2.engine.QueryEnvironment.Argument;
import com.google.devtools.build.lib.query2.engine.QueryEnvironment.ArgumentType;
import com.google.devtools.build.lib.query2.engine.QueryEnvironment.QueryFunction;
import com.google.devtools.build.lib.query2.engine.QueryEnvironment.Setting;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
@@ -161,12 +160,12 @@ class TestsFunction implements QueryFunction {
}
/**
- * Computes and returns the set of test rules in a particular suite. Uses
- * dynamic programming---a memoized version of {@link #computeTestsInSuite}.
+ * Computes and returns the set of test rules in a particular suite. Uses dynamic
+ * programming---a memoized version of {@link #computeTestsInSuite}.
*
* @precondition env.getAccessor().isTestSuite(testSuite)
*/
- private Set<T> getTestsInSuite(T testSuite) throws QueryException {
+ private Set<T> getTestsInSuite(T testSuite) throws QueryException, InterruptedException {
Set<T> tests = testsInSuite.get(testSuite);
if (tests == null) {
tests = Sets.newHashSet();
@@ -177,14 +176,15 @@ class TestsFunction implements QueryFunction {
}
/**
- * Populates 'result' with all the tests associated with the specified
- * 'testSuite'. Throws an exception if any target is missing.
+ * Populates 'result' with all the tests associated with the specified 'testSuite'. Throws an
+ * exception if any target is missing.
*
- * <p>CAUTION! Keep this logic consistent with {@code TestsSuiteConfiguredTarget}!
+ * <p>CAUTION! Keep this logic consistent with {@code TestsSuiteConfiguredTarget}!
*
* @precondition env.getAccessor().isTestSuite(testSuite)
*/
- private void computeTestsInSuite(T testSuite, Set<T> result) throws QueryException {
+ private void computeTestsInSuite(T testSuite, Set<T> result)
+ throws QueryException, InterruptedException {
List<T> testsAndSuites = new ArrayList<>();
// Note that testsAndSuites can contain input file targets; the test_suite rule does not
// restrict the set of targets that can appear in tests or suites.
@@ -231,7 +231,8 @@ class TestsFunction implements QueryFunction {
*
* @precondition env.getAccessor().isTestSuite(testSuite)
*/
- private List<T> getPrerequisites(T testSuite, String attrName) throws QueryException {
+ private List<T> getPrerequisites(T testSuite, String attrName)
+ throws QueryException, InterruptedException {
return env.getAccessor().getLabelListAttr(expression, testSuite, attrName,
"couldn't expand '" + attrName
+ "' attribute of test_suite " + env.getAccessor().getLabel(testSuite) + ": ");