提交 c6c7d9ce 编写于 作者: M mindless

Add the.hpl in loadBundledPlugins if available, so a plugin can

find itself in the PluginManager when running its own tests.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@30361 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f672a29c
......@@ -31,6 +31,7 @@ import hudson.Util;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
......@@ -71,6 +72,14 @@ public class TestPluginManager extends PluginManager {
LOGGER.log(Level.SEVERE, "Failed to extract the bundled plugin "+child,e);
}
}
// If running tests for a plugin, include the plugin being tested
URL u = getClass().getClassLoader().getResource("the.hpl");
if (u!=null) try {
names.add("the.hpl");
copyBundledPlugin(u, "the.hpl");
} catch (IOException e) {
LOGGER.log(Level.SEVERE, "Failed to copy the.hpl",e);
}
return names;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册