diff options
author | felly <felly@google.com> | 2018-06-08 10:02:39 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-08 10:03:51 -0700 |
commit | cd751ca2bb3677a15e0187f764415a6659417624 (patch) | |
tree | 9acfc0b57e1c9e937169dc9b7a148f7ae6a530ea /src/main/java/com/google/devtools/build/lib/exec | |
parent | dc3a91aec0a840baa0b897cde81ac2e8f7bb5eff (diff) |
Support basic test functionality in ActionFS.
ActionFS now allows output files to be created that do not correspond to known Artifacts.
Note that tests exercise a greater gamut of filesystem functionality (deleting files, deleting directory trees, moving files, etc.)
RELNOTES: None
PiperOrigin-RevId: 199809069
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/exec')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java | 5 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java index 7b347c46e4..5f714bd281 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/exec/StandaloneTestStrategy.java @@ -161,7 +161,8 @@ public class StandaloneTestStrategy extends TestStrategy { workingDirectory); } processLastTestAttempt(attempt, dataBuilder, standaloneTestResult.testResultData()); - ImmutableList<Pair<String, Path>> testOutputs = action.getTestOutputsMapping(execRoot); + ImmutableList<Pair<String, Path>> testOutputs = + action.getTestOutputsMapping(actionExecutionContext, execRoot); actionExecutionContext .getEventHandler() .post( @@ -210,7 +211,7 @@ public class StandaloneTestStrategy extends TestStrategy { // Get the normal test output paths, and then update them to use "attempt_N" names, and // attemptDir, before adding them to the outputs. ImmutableList<Pair<String, Path>> testOutputs = - action.getTestOutputsMapping(actionExecutionContext.getExecRoot()); + action.getTestOutputsMapping(actionExecutionContext, actionExecutionContext.getExecRoot()); for (Pair<String, Path> testOutput : testOutputs) { // e.g. /testRoot/test.dir/file, an example we follow throughout this loop's comments. Path testOutputPath = testOutput.getSecond(); diff --git a/src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java b/src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java index fcd21ea316..26a24b1e85 100644 --- a/src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java +++ b/src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java @@ -246,7 +246,7 @@ public abstract class TestStrategy implements TestActionContext { */ protected void postTestResult(ActionExecutionContext actionExecutionContext, TestResult result) throws IOException { - result.getTestAction().saveCacheStatus(result.getData()); + result.getTestAction().saveCacheStatus(actionExecutionContext, result.getData()); actionExecutionContext.getEventBus().post(result); } |