diff options
author | Klaus Aehlig <aehlig@google.com> | 2017-04-13 10:10:43 +0000 |
---|---|---|
committer | Jakob Buchgraber <buchgr@google.com> | 2017-04-13 12:50:31 +0200 |
commit | eeb89700bd859635b79c8beee449960563eea16c (patch) | |
tree | 84ba433c8521cb75dff41188940999aba913d9f3 /src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BuildEventTransportFactoryTest.java | |
parent | f85290973eaafa10d031a092ed795a7fd8165533 (diff) |
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
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BuildEventTransportFactoryTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BuildEventTransportFactoryTest.java | 4 |
1 files changed, 4 insertions, 0 deletions
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<BuildEventTransport> 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<BuildEventTransport> 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<BuildEventTransport> transports = BuildEventTransportFactory.createFromOptions(options, pathConverter); assertThat(FluentIterable.from(transports).transform(GET_CLASS)) |