From 71d5c66fd384aaebfb83e0b24920df984eb9f09b Mon Sep 17 00:00:00 2001 From: Alpar Torok Date: Tue, 28 Aug 2018 10:00:11 +0300 Subject: [PATCH] Fix plugin build test on Windows (#33078) Fix plugin build test on Windows --- .../org/elasticsearch/gradle/BuildExamplePluginsIT.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java b/buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java index 9b63d6f45e0..3e18b0b80af 100644 --- a/buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java +++ b/buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java @@ -158,7 +158,12 @@ public class BuildExamplePluginsIT extends GradleIntegrationTestCase { Objects.requireNonNull(property, "test.local-test-repo-path not passed to tests"); File file = new File(property); assertTrue("Expected " + property + " to exist, but it did not!", file.exists()); - return file.getAbsolutePath(); + if (File.separator.equals("\\")) { + // Use / on Windows too, the build script is not happy with \ + return file.getAbsolutePath().replace(File.separator, "/"); + } else { + return file.getAbsolutePath(); + } } }