mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
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
This commit is contained in:
1 parent
f672a29cd5
commit
c6c7d9ce24
1 file changed
+9
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user