aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2015-04-28 13:21:41 +0000
committerGravatar Kristina Chodorow <kchodorow@google.com>2015-04-28 15:15:31 +0000
commitcd687072a3f37dd730ac13bc827c5bb2eb4dc90a (patch)
tree8577870788ca09ceca826a321f010c238f28c1cd
parent21d9738b3f0a7e683cb48c08ea1024bbcfe9ee5b (diff)
Remove some unused code from FoundationTestCase.
-- MOS_MIGRATED_REVID=92241595
-rw-r--r--src/test/java/com/google/devtools/build/lib/testutil/FoundationTestCase.java34
1 files changed, 0 insertions, 34 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 b76d01961a..4ba93c8d62 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
@@ -13,7 +13,6 @@
// limitations under the License.
package com.google.devtools.build.lib.testutil;
-import com.google.common.io.Files;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.events.EventCollector;
import com.google.devtools.build.lib.events.EventHandler;
@@ -26,9 +25,6 @@ import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem;
import junit.framework.TestCase;
-import java.io.File;
-import java.io.IOException;
-import java.nio.charset.Charset;
import java.util.List;
import java.util.Set;
@@ -84,7 +80,6 @@ public abstract class FoundationTestCase extends TestCase {
" name = 'objc_proto_cpp_lib',",
" actual = '//objcproto:ProtocolBuffersCPP_lib',",
")");
- copySkylarkFilesIfExist();
actionOutputBase = scratch.dir("/usr/local/google/_blaze_jrluser/FAKEMD5/action_out/");
eventCollector = new EventCollector(EventKind.ERRORS_AND_WARNINGS);
reporter = new Reporter(eventCollector);
@@ -98,31 +93,6 @@ public abstract class FoundationTestCase extends TestCase {
return new InMemoryFileSystem(BlazeClock.instance());
}
- private void copySkylarkFilesIfExist() throws IOException {
- scratch.file(rootDirectory.getRelative("devtools/blaze/rules/BUILD").getPathString());
- scratch.file(rootDirectory.getRelative("rules/BUILD").getPathString());
- copySkylarkFilesIfExist("devtools/blaze/rules/staging", "devtools/blaze/rules/staging");
- copySkylarkFilesIfExist("third_party/bazel/tools/build_rules", "rules");
- }
-
- private void copySkylarkFilesIfExist(String from, String to) throws IOException {
- File rulesDir = new File(from);
- if (rulesDir.exists() && rulesDir.isDirectory()) {
- for (String fileName : rulesDir.list()) {
- File file = new File(from + "/" + fileName);
- if (file.isFile() && fileName.endsWith(".bzl")) {
- String context = loadFile(file);
- Path path = rootDirectory.getRelative(to + "/" + fileName);
- if (path.exists()) {
- scratch.overwriteFile(path.getPathString(), context);
- } else {
- scratch.file(path.getPathString(), context);
- }
- }
- }
- }
- }
-
@Override
protected void tearDown() throws Exception {
Thread.interrupted(); // Clear any interrupt pending against this thread,
@@ -184,8 +154,4 @@ public abstract class FoundationTestCase extends TestCase {
Iterable<T> expectedSubset) {
JunitTestUtils.assertContainsSubset(arguments, expectedSubset);
}
-
- protected String loadFile(File file) throws IOException {
- return Files.toString(file, Charset.defaultCharset());
- }
}