Search in sources :

Example 1 with JavaIoFileSystem

use of com.google.devtools.build.lib.vfs.JavaIoFileSystem in project bazel by bazelbuild.

the class CompressedTarFunctionTest method setUpFs.

@Before
public void setUpFs() throws Exception {
    testFS = OS.getCurrent() == OS.WINDOWS ? new JavaIoFileSystem() : new UnixFileSystem();
    tarballPath = testFS.getPath(BlazeTestUtils.runfilesDir()).getRelative(TestConstants.JAVATESTS_ROOT + PATH_TO_TEST_ARCHIVE + ARCHIVE_NAME);
    workingDir = testFS.getPath(new File(TestUtils.tmpDir()).getCanonicalPath());
    outDir = workingDir.getRelative("out");
    descriptorBuilder = DecompressorDescriptor.builder().setDecompressor(TarGzFunction.INSTANCE).setRepositoryPath(outDir).setArchivePath(tarballPath);
}
Also used : JavaIoFileSystem(com.google.devtools.build.lib.vfs.JavaIoFileSystem) File(java.io.File) UnixFileSystem(com.google.devtools.build.lib.unix.UnixFileSystem) Before(org.junit.Before)

Aggregations

UnixFileSystem (com.google.devtools.build.lib.unix.UnixFileSystem)1 JavaIoFileSystem (com.google.devtools.build.lib.vfs.JavaIoFileSystem)1 File (java.io.File)1 Before (org.junit.Before)1