use of com.google.devtools.build.lib.vfs.FileSystem in project bazel by bazelbuild.
the class MapBasedActionGraphTest method testSmoke.
@Test
public void testSmoke() throws Exception {
MutableActionGraph actionGraph = new MapBasedActionGraph();
FileSystem fileSystem = new InMemoryFileSystem(BlazeClock.instance());
Path path = fileSystem.getPath("/root/foo");
Artifact output = new Artifact(path, Root.asDerivedRoot(path));
Action action = new TestAction(TestAction.NO_EFFECT, ImmutableSet.<Artifact>of(), ImmutableSet.of(output));
actionGraph.registerAction(action);
actionGraph.unregisterAction(action);
path = fileSystem.getPath("/root/bar");
output = new Artifact(path, Root.asDerivedRoot(path));
Action action2 = new TestAction(TestAction.NO_EFFECT, ImmutableSet.<Artifact>of(), ImmutableSet.of(output));
actionGraph.registerAction(action);
actionGraph.registerAction(action2);
actionGraph.unregisterAction(action);
}
use of com.google.devtools.build.lib.vfs.FileSystem in project bazel by bazelbuild.
the class MapBasedActionGraphTest method testNoActionConflictWhenUnregisteringSharedAction.
@Test
public void testNoActionConflictWhenUnregisteringSharedAction() throws Exception {
MutableActionGraph actionGraph = new MapBasedActionGraph();
FileSystem fileSystem = new InMemoryFileSystem(BlazeClock.instance());
Path path = fileSystem.getPath("/root/foo");
Artifact output = new Artifact(path, Root.asDerivedRoot(path));
Action action = new TestAction(TestAction.NO_EFFECT, ImmutableSet.<Artifact>of(), ImmutableSet.of(output));
actionGraph.registerAction(action);
Action otherAction = new TestAction(TestAction.NO_EFFECT, ImmutableSet.<Artifact>of(), ImmutableSet.of(output));
actionGraph.registerAction(otherAction);
actionGraph.unregisterAction(action);
}
Aggregations