From eeb89700bd859635b79c8beee449960563eea16c Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Thu, 13 Apr 2017 10:10:43 +0000 Subject: BEP: for local transports optionally drop path conversion For transports that are purely local (like the ones writing to a local file), it sometimes can be useful to skip path conversion and use the local paths directly. Support this for the text and binary format file transports. Change-Id: I2ac2e187ebb11ff82c4e1ddf4881ea54f9d4205d PiperOrigin-RevId: 153044267 --- .../buildeventstream/transports/BuildEventTransportFactoryTest.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BuildEventTransportFactoryTest.java') diff --git a/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BuildEventTransportFactoryTest.java b/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BuildEventTransportFactoryTest.java index c6762a8b5f..f7f4b91555 100644 --- a/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BuildEventTransportFactoryTest.java +++ b/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BuildEventTransportFactoryTest.java @@ -83,6 +83,7 @@ public class BuildEventTransportFactoryTest { public void testCreatesTextFormatFileTransport() throws IOException { File textFile = tmp.newFile(); when(options.getBuildEventTextFile()).thenReturn(textFile.getAbsolutePath()); + when(options.getBuildEventTextFilePathConversion()).thenReturn(true); when(options.getBuildEventBinaryFile()).thenReturn(""); ImmutableSet transports = BuildEventTransportFactory.createFromOptions(options, pathConverter); @@ -97,6 +98,7 @@ public class BuildEventTransportFactoryTest { File binaryFile = tmp.newFile(); when(options.getBuildEventTextFile()).thenReturn(""); when(options.getBuildEventBinaryFile()).thenReturn(binaryFile.getAbsolutePath()); + when(options.getBuildEventBinaryFilePathConversion()).thenReturn(true); ImmutableSet transports = BuildEventTransportFactory.createFromOptions(options, pathConverter); assertThat(FluentIterable.from(transports).transform(GET_CLASS)) @@ -111,6 +113,8 @@ public class BuildEventTransportFactoryTest { File binaryFile = tmp.newFile(); when(options.getBuildEventTextFile()).thenReturn(textFile.getAbsolutePath()); when(options.getBuildEventBinaryFile()).thenReturn(binaryFile.getAbsolutePath()); + when(options.getBuildEventBinaryFilePathConversion()).thenReturn(true); + when(options.getBuildEventTextFilePathConversion()).thenReturn(true); ImmutableSet transports = BuildEventTransportFactory.createFromOptions(options, pathConverter); assertThat(FluentIterable.from(transports).transform(GET_CLASS)) -- cgit v1.2.3