use of com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem in project bazel by bazelbuild.
the class TestSummaryTest method createFileSystem.
@Before
public final void createFileSystem() throws Exception {
fs = new InMemoryFileSystem(BlazeClock.instance());
stubTarget = stubTarget();
basicBuilder = getTemplateBuilder();
}
use of com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem in project bazel by bazelbuild.
the class PathWindowsTest method initializeFileSystem.
@Before
public final void initializeFileSystem() throws Exception {
filesystem = new InMemoryFileSystem(BlazeClock.instance()) {
@Override
protected PathFactory getPathFactory() {
return WindowsFileSystem.getPathFactoryForTesting(shortPathResolver);
}
@Override
public boolean isFilePathCaseSensitive() {
return false;
}
};
root = (WindowsPath) filesystem.getRootDirectory().getRelative("C:/");
root.createDirectory();
}
use of com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem in project bazel by bazelbuild.
the class PathTest method initializeFileSystem.
@Before
public final void initializeFileSystem() throws Exception {
filesystem = new InMemoryFileSystem(BlazeClock.instance());
root = filesystem.getRootDirectory();
Path first = root.getChild("first");
first.createDirectory();
}
use of com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem in project bazel by bazelbuild.
the class RecursiveGlobTest method initializeFileSystem.
@Before
public final void initializeFileSystem() throws Exception {
fileSystem = new InMemoryFileSystem(BlazeClock.instance());
tmpPath = fileSystem.getPath("/rglobtmp");
for (String dir : ImmutableList.of("foo/bar/wiz", "foo/baz/wiz", "foo/baz/quip/wiz", "food/baz/wiz", "fool/baz/wiz")) {
FileSystemUtils.createDirectoryAndParents(tmpPath.getRelative(dir));
}
FileSystemUtils.createEmptyFile(tmpPath.getRelative("foo/bar/wiz/file"));
}
use of com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem in project bazel by bazelbuild.
the class GlobTest method initializeFileSystem.
@Before
public final void initializeFileSystem() throws Exception {
fs = new InMemoryFileSystem() {
@Override
public Collection<Dirent> readdir(Path path, boolean followSymlinks) throws IOException {
if (path.equals(throwOnReaddir)) {
throw new FileNotFoundException(path.getPathString());
}
return super.readdir(path, followSymlinks);
}
};
tmpPath = fs.getPath("/globtmp");
for (String dir : ImmutableList.of("foo/bar/wiz", "foo/barnacle/wiz", "food/barnacle/wiz", "fool/barnacle/wiz")) {
FileSystemUtils.createDirectoryAndParents(tmpPath.getRelative(dir));
}
FileSystemUtils.createEmptyFile(tmpPath.getRelative("foo/bar/wiz/file"));
}
Aggregations