aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2017-01-11 11:00:24 +0000
committerGravatar Marcel Hlopko <hlopko@google.com>2017-01-11 11:50:45 +0000
commit11e52b4b2752976d18c258a8a48953d7d28c9e61 (patch)
tree514001ced07e58d0f48dcc602b1aa474cdce2755 /src/main/java
parent34de5d7d4a0678b3a4097cb7531fedb3ddb45983 (diff)
Add a small helper method to ActionInputHelper
This is part of a series of changes to clean up the test strategies; this specific change is a Google-internal refactoring. I'm planning to also update the external test strategies subsequently. -- PiperOrigin-RevId: 144184752 MOS_MIGRATED_REVID=144184752
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/ActionInputHelper.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ActionInputHelper.java b/src/main/java/com/google/devtools/build/lib/actions/ActionInputHelper.java
index 26bbb6d1af..4ca4a1b162 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/ActionInputHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/ActionInputHelper.java
@@ -24,7 +24,6 @@ import com.google.devtools.build.lib.actions.Artifact.ArtifactExpander;
import com.google.devtools.build.lib.actions.Artifact.TreeFileArtifact;
import com.google.devtools.build.lib.util.Preconditions;
import com.google.devtools.build.lib.vfs.PathFragment;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -114,6 +113,16 @@ public final class ActionInputHelper {
return new BasicActionInput(path);
}
+ /**
+ * Creates an ActionInput with just the given relative path and no digest.
+ *
+ * @param path the relative path of the input.
+ * @return a ActionInput.
+ */
+ public static ActionInput fromPath(PathFragment path) {
+ return fromPath(path.getPathString());
+ }
+
private static final Function<String, ActionInput> FROM_PATH =
new Function<String, ActionInput>() {
@Override