use of com.google.devtools.build.lib.actions.Artifact.SpecialArtifact in project bazel by bazelbuild.
the class TreeArtifactMetadataTest method createTreeArtifact.
private Artifact createTreeArtifact(String path) throws IOException {
PathFragment execPath = new PathFragment("out").getRelative(path);
Path fullPath = root.getRelative(execPath);
Artifact output = new SpecialArtifact(fullPath, Root.asDerivedRoot(root, root.getRelative("out")), execPath, ALL_OWNER, SpecialArtifactType.TREE);
actions.add(new DummyAction(ImmutableList.<Artifact>of(), output));
FileSystemUtils.createDirectoryAndParents(fullPath);
return output;
}
use of com.google.devtools.build.lib.actions.Artifact.SpecialArtifact in project bazel by bazelbuild.
the class FilesystemValueCheckerTest method createTreeArtifact.
private Artifact createTreeArtifact(String relPath) throws IOException {
Path outputDir = fs.getPath("/bin");
Path outputPath = outputDir.getRelative(relPath);
outputDir.createDirectory();
Root derivedRoot = Root.asDerivedRoot(fs.getPath("/"), outputDir);
return new SpecialArtifact(outputPath, derivedRoot, derivedRoot.getExecPath().getRelative(outputPath.relativeTo(derivedRoot.getPath())), ArtifactOwner.NULL_OWNER, SpecialArtifactType.TREE);
}
use of com.google.devtools.build.lib.actions.Artifact.SpecialArtifact in project bazel by bazelbuild.
the class TreeArtifactBuildTest method createTreeArtifact.
private Artifact createTreeArtifact(String name) {
FileSystem fs = scratch.getFileSystem();
Path execRoot = fs.getPath(TestUtils.tmpDir());
PathFragment execPath = new PathFragment("out").getRelative(name);
Path path = execRoot.getRelative(execPath);
return new SpecialArtifact(path, Root.asDerivedRoot(execRoot, execRoot.getRelative("out")), execPath, ALL_OWNER, SpecialArtifactType.TREE);
}
use of com.google.devtools.build.lib.actions.Artifact.SpecialArtifact in project bazel by bazelbuild.
the class ActionTemplateExpansionFunctionTest method createTreeArtifact.
private Artifact createTreeArtifact(String path) {
PathFragment execPath = new PathFragment("out").getRelative(path);
Path fullPath = rootDirectory.getRelative(execPath);
return new SpecialArtifact(fullPath, Root.asDerivedRoot(rootDirectory, rootDirectory.getRelative("out")), execPath, ArtifactOwner.NULL_OWNER, SpecialArtifactType.TREE);
}
use of com.google.devtools.build.lib.actions.Artifact.SpecialArtifact in project bazel by bazelbuild.
the class ArtifactFunctionTest method createDerivedTreeArtifactOnly.
private Artifact createDerivedTreeArtifactOnly(String path) {
PathFragment execPath = new PathFragment("out").getRelative(path);
Path fullPath = root.getRelative(execPath);
return new SpecialArtifact(fullPath, Root.asDerivedRoot(root, root.getRelative("out")), execPath, ALL_OWNER, SpecialArtifactType.TREE);
}
Aggregations