aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/testutil
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-02-27 17:14:12 +0000
committerGravatar Ulf Adams <ulfjack@google.com>2015-03-05 14:15:41 +0000
commit91876f004def4a7858bb614091a6cd2fbef681fc (patch)
treec4d4e1473f7c327f8014443998f129fb7563057d /src/test/java/com/google/devtools/build/lib/testutil
parent79f052118e94c418247c4ea0ba6fcd3a35ca7e0d (diff)
Make Rule know about the name of the workspace it is in.
This is needed for taking the runfiles prefix from the WORKSPACE file instead of hardcoding it. -- MOS_MIGRATED_REVID=87347883
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/testutil')
-rw-r--r--src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java b/src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java
index d519e421d6..11750fdf3a 100644
--- a/src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java
+++ b/src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java
@@ -75,6 +75,7 @@ public abstract class FoundationTestCase extends TestCase {
scratch = new Scratch(createFileSystem());
outputBase = scratchDir("/usr/local/google/_blaze_jrluser/FAKEMD5/");
rootDirectory = scratchDir("/" + TestConstants.TEST_WORKSPACE_DIRECTORY);
+ scratchFile(rootDirectory.getRelative("WORKSPACE").getPathString());
copySkylarkFilesIfExist();
actionOutputBase = scratchDir("/usr/local/google/_blaze_jrluser/FAKEMD5/action_out/");
eventCollector = new EventCollector(EventKind.ERRORS_AND_WARNINGS);