Search in sources :

Example 16 with FilesetTraversalParams

use of com.google.devtools.build.lib.actions.FilesetTraversalParams in project bazel by bazelbuild.

the class FilesetEntryFunctionTest method testFileTraversalForNonExistentFile.

@Test
public void testFileTraversalForNonExistentFile() throws Exception {
    Artifact path = getSourceArtifact("foo/non-existent");
    FilesetTraversalParams params = FilesetTraversalParamsFactory.fileTraversal(/*ownerLabel=*/
    label("//foo"), /*fileToTraverse=*/
    path, /*destPath=*/
    new PathFragment("output-name"), /*symlinkBehaviorMode=*/
    SymlinkBehavior.COPY, /*pkgBoundaryMode=*/
    DONT_CROSS);
    // expect empty results
    assertSymlinksInOrder(params);
}
Also used : FilesetTraversalParams(com.google.devtools.build.lib.actions.FilesetTraversalParams) PathFragment(com.google.devtools.build.lib.vfs.PathFragment) Artifact(com.google.devtools.build.lib.actions.Artifact) Test(org.junit.Test)

Aggregations

FilesetTraversalParams (com.google.devtools.build.lib.actions.FilesetTraversalParams)16 PathFragment (com.google.devtools.build.lib.vfs.PathFragment)16 Artifact (com.google.devtools.build.lib.actions.Artifact)14 Test (org.junit.Test)8 RootedPath (com.google.devtools.build.lib.vfs.RootedPath)7 FilesetOutputSymlink (com.google.devtools.build.lib.actions.FilesetOutputSymlink)4 SkyKey (com.google.devtools.build.skyframe.SkyKey)3 SkyValue (com.google.devtools.build.skyframe.SkyValue)3 ImmutableSet (com.google.common.collect.ImmutableSet)1 DirectTraversal (com.google.devtools.build.lib.actions.FilesetTraversalParams.DirectTraversal)1 DanglingSymlinkException (com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalFunction.DanglingSymlinkException)1 ResolvedFile (com.google.devtools.build.lib.skyframe.RecursiveFilesystemTraversalValue.ResolvedFile)1 LinkedHashMap (java.util.LinkedHashMap)1 Set (java.util.Set)1