提交 c1920636 编写于 作者: K Kohsuke Kawaguchi

when recording a failure, we record the name of the build step, so for that to...

when recording a failure, we record the name of the build step, so for that to work we need TestBuilder to have some valid name.
上级 3488cf1e
......@@ -23,6 +23,8 @@
*/
package org.jvnet.hudson.test;
import hudson.model.AbstractProject;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
import hudson.model.Descriptor;
import hudson.model.AbstractBuild;
......@@ -45,7 +47,18 @@ public abstract class TestBuilder extends Builder {
public abstract boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException;
public Descriptor<Builder> getDescriptor() {
throw new UnsupportedOperationException();
// throw new UnsupportedOperationException();
return new BuildStepDescriptor<Builder>() {
@Override
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
return true;
}
@Override
public String getDisplayName() {
return "Bogus";
}
};
}
private Object writeReplace() { return new Object(); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册