diff options
author | 2016-12-20 09:46:39 +0000 | |
---|---|---|
committer | 2016-12-20 11:06:52 +0000 | |
commit | 87532156cf3ed7b66c6db5cb1e57dff7424031ab (patch) | |
tree | 1f503682598ac7101f3c612dbcebefe03f2cdde0 /src/main | |
parent | d6297fb8b924dda41111356c0c32d4a5a297a11b (diff) |
Gives detailed error message when fail to re-create directories during testing. Also
fixes bazel_test_test. Fixes #2228.
--
PiperOrigin-RevId: 142532524
MOS_MIGRATED_REVID=142532524
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/exec/TestStrategy.java | 12 |
1 files changed, 10 insertions, 2 deletions
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 96d8798c68..32ddf9da9b 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 @@ -75,9 +75,17 @@ public abstract class TestStrategy implements TestActionContext { TestRunnerAction testAction, Path tmpDir, Path coverageDir, Path workingDirectory) throws IOException { if (isCoverageMode(testAction)) { - recreateDirectory(coverageDir); + try { + recreateDirectory(coverageDir); + } catch (IOException e) { + throw new IOException("Failed to recreate coverage directory " + coverageDir, e); + } + } + try { + recreateDirectory(tmpDir); + } catch (IOException e) { + throw new IOException("Failed to recreate temporary directory " + tmpDir, e); } - recreateDirectory(tmpDir); FileSystemUtils.createDirectoryAndParents(workingDirectory); } |