Fix plugin build test on Windows (#33078)

Fix plugin build test on Windows
This commit is contained in:
Alpar Torok 2018-08-28 10:00:11 +03:00 committed by GitHub
parent daee8bd133
commit 71d5c66fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -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();
}
}
}