diff options
author | mschaller <mschaller@google.com> | 2017-08-05 01:40:57 +0200 |
---|---|---|
committer | Jakob Buchgraber <buchgr@google.com> | 2017-08-07 11:22:23 +0200 |
commit | cfe25a6e1f2a92f29b6455782c6d1cdbaf7e15c6 (patch) | |
tree | 81bcb774dfa4ea6ed7b97ba39cc6c803b40b4787 /src/test | |
parent | e8d4366cd374fba92f1425de0d475411c8defda4 (diff) |
Introduce AbstractParallelEvaluator
This change enables alternate evaluation strategies.
Drive-by fix to GraphTester, making TestFunction static because it has
no dependencies on its outer class, and adding #unsetConstantValue.
RELNOTES: None.
PiperOrigin-RevId: 164327055
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/google/devtools/build/skyframe/GraphTester.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/test/java/com/google/devtools/build/skyframe/GraphTester.java b/src/test/java/com/google/devtools/build/skyframe/GraphTester.java index 75ebadf4c9..384a87928c 100644 --- a/src/test/java/com/google/devtools/build/skyframe/GraphTester.java +++ b/src/test/java/com/google/devtools/build/skyframe/GraphTester.java @@ -164,10 +164,8 @@ public class GraphTester { return LegacySkyKey.create(NODE_TYPE, key); } - /** - * A value in the testing graph that is constructed in the tester. - */ - public class TestFunction { + /** A value in the testing graph that is constructed in the tester. */ + public static class TestFunction { // TODO(bazel-team): We could use a multiset here to simulate multi-pass dependency discovery. private final Set<Pair<SkyKey, SkyValue>> deps = new LinkedHashSet<>(); private SkyValue value; @@ -216,6 +214,11 @@ public class GraphTester { return this; } + public TestFunction unsetConstantValue() { + this.value = null; + return this; + } + public TestFunction setComputedValue(ValueComputer computer) { Preconditions.checkState(this.value == null); this.computer = computer; |