Skip to content

Commit

Permalink
Fix the test failure when running from RunBuilderTests
Browse files Browse the repository at this point in the history
  • Loading branch information
testforstephen committed Jun 18, 2024
1 parent e1d937e commit 56874ab
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,13 @@ private File copyFiles(String path, boolean reimportIfExists) throws IOException
}

private File getSourceProjectDirectory() {
return new File("resources");
final String pluginId = "org.eclipse.jdt.core.tests.builder";
String cwd = new File("").getAbsolutePath();
if (cwd.endsWith(pluginId)) {
return new File("resources"); // run from current test plugin
} else {
return new File("../" + pluginId + "/resources"); // run from other test plugin
}
}

private File getWorkingProjectDirectory() throws IOException {
Expand Down

0 comments on commit 56874ab

Please sign in to comment.