Fix the running of plugin acceptance tests in eclipse such as CookbookIT

Since the previous master commit 58cb4b4 introduced eclipse-out, running
plugin IT such as CookbookIT is broken. (Before that commit, only
buck-out was used.)

This is to fix PluginDaemonTest so it properly supports that new
eclipse-out alongside the other modes, buck tree and standalone.

Change-Id: I32591559ed00012d378bbac12c7391d5d8ffc490
This commit is contained in:
Marco Miller 2015-12-16 17:14:10 -05:00
parent 22083f26a7
commit eacd0419f7

View File

@ -41,6 +41,7 @@ public abstract class PluginDaemonTest extends AbstractDaemonTest {
private static final String BUCKLC = "buck";
private static final String BUCKOUT = "buck-out";
private static final String ECLIPSE = "eclipse-out";
private Path gen;
private Path pluginRoot;
@ -98,7 +99,7 @@ public abstract class PluginDaemonTest extends AbstractDaemonTest {
if (subPath.endsWith("plugins")) {
pluginsIdx = idx;
}
if (subPath.endsWith(BUCKOUT)) {
if (subPath.endsWith(BUCKOUT) || subPath.endsWith(ECLIPSE)) {
buckOutIdx = idx;
}
idx++;
@ -126,7 +127,8 @@ public abstract class PluginDaemonTest extends AbstractDaemonTest {
String gerritDirCandidate =
partialPath.subpath(count - 2, count - 1).toString();
if (pattern.matcher(gerritDirCandidate).matches()) {
if (partialPath.endsWith(gerritDirCandidate + "/" + BUCKOUT)) {
if (partialPath.endsWith(gerritDirCandidate + "/" + BUCKOUT) ||
partialPath.endsWith(gerritDirCandidate + "/" + ECLIPSE)) {
return false;
}
}