|
21 | 21 | import org.kohsuke.stapler.DataBoundSetter; |
22 | 22 | import org.kohsuke.stapler.QueryParameter; |
23 | 23 | import org.kohsuke.stapler.StaplerRequest; |
24 | | -import com.mathworks.ci.AddMatlabToPathBuildWrapper.MatlabBuildWrapperDescriptor; |
| 24 | +import com.mathworks.ci.AddMatlabToPathBuildWrapper.AddMatlabToPathDescriptor; |
25 | 25 | import hudson.EnvVars; |
26 | 26 | import hudson.Extension; |
27 | 27 | import hudson.FilePath; |
@@ -124,7 +124,7 @@ private EnvVars getEnv() { |
124 | 124 |
|
125 | 125 | @Symbol("RunMatlabTests") |
126 | 126 | @Extension |
127 | | - public static class MatlabTestDescriptor extends BuildStepDescriptor<Builder> { |
| 127 | + public static class RunMatlabTestsDescriptor extends BuildStepDescriptor<Builder> { |
128 | 128 |
|
129 | 129 | MatlabReleaseInfo rel; |
130 | 130 |
|
@@ -247,7 +247,7 @@ public FormValidation getFirstErrorOrWarning( |
247 | 247 | return FormValidation.ok(); |
248 | 248 | try { |
249 | 249 | final String matlabRoot = Jenkins.getInstance() |
250 | | - .getDescriptorByType(MatlabBuildWrapperDescriptor.class).getMatlabRootFolder(); |
| 250 | + .getDescriptorByType(AddMatlabToPathDescriptor.class).getMatlabRootFolder(); |
251 | 251 | for (Function<String, FormValidation> val : validations) { |
252 | 252 | FormValidation validationResult = val.apply(matlabRoot); |
253 | 253 | if (validationResult.kind.compareTo(Kind.ERROR) == 0 |
@@ -284,8 +284,6 @@ private synchronized int execMatlabCommand(FilePath workspace, Launcher launcher |
284 | 284 | TaskListener listener, EnvVars envVars) throws IOException, InterruptedException { |
285 | 285 | ProcStarter matlabLauncher; |
286 | 286 | try { |
287 | | - // Get matlabroot set in wrapper class. |
288 | | - String matlabRoot = envVars.get("matlabroot"); |
289 | 287 | matlabLauncher = launcher.launch().pwd(workspace).envs(envVars); |
290 | 288 | FilePath targetWorkspace = new FilePath(launcher.getChannel(), workspace.getRemote()); |
291 | 289 | if (launcher.isUnix()) { |
|
0 commit comments