Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit b95686d

Browse files
authored
Merge pull request #259 from mathworks/2.10.1-SNAPSHOT-Qualification
2.10.1 snapshot qualification changes
2 parents 21b63af + e74875c commit b95686d

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

src/main/java/com/mathworks/ci/MatlabBuild.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import hudson.FilePath;
1515
import hudson.Launcher;
1616
import hudson.Launcher.ProcStarter;
17+
import hudson.util.ArgumentListBuilder;
1718
import hudson.model.TaskListener;
1819

1920
public interface MatlabBuild {
@@ -35,6 +36,7 @@ default ProcStarter getProcessToRunMatlabCommand(FilePath workspace,
3536
// Get node specific temp .matlab directory to copy matlab runner script
3637
FilePath targetWorkspace;
3738
ProcStarter matlabLauncher;
39+
ArgumentListBuilder args = new ArgumentListBuilder();
3840
if (launcher.isUnix()) {
3941
targetWorkspace = new FilePath(launcher.getChannel(),
4042
workspace.getRemote() + "/" + MatlabBuilderConstants.TEMP_MATLAB_FOLDER_NAME);
@@ -55,8 +57,11 @@ default ProcStarter getProcessToRunMatlabCommand(FilePath workspace,
5557
binaryName = "maci64/run-matlab-command";
5658
}
5759

58-
matlabLauncher = launcher.launch().envs(envVars);
59-
matlabLauncher.cmds(MatlabBuilderConstants.TEMP_MATLAB_FOLDER_NAME + "/" + runnerName, matlabCommand, startupOpts).stdout(listener);
60+
args.add(MatlabBuilderConstants.TEMP_MATLAB_FOLDER_NAME + "/" + runnerName);
61+
args.add(matlabCommand);
62+
args.add(startupOpts.split(" "));
63+
64+
matlabLauncher = launcher.launch().envs(envVars).cmds(args).stdout(listener);
6065

6166
// Copy runner for linux platform in workspace.
6267
copyFileInWorkspace(binaryName, runnerName, targetWorkspace);
@@ -65,9 +70,11 @@ default ProcStarter getProcessToRunMatlabCommand(FilePath workspace,
6570
workspace.getRemote() + "\\" + MatlabBuilderConstants.TEMP_MATLAB_FOLDER_NAME);
6671

6772
final String runnerName = uniqueName + "\\run-matlab-command.exe";
68-
matlabLauncher = launcher.launch().envs(envVars);
69-
matlabLauncher.cmds(targetWorkspace.toString() + "\\" + runnerName, "\"" + matlabCommand + "\"", startupOpts)
70-
.stdout(listener);
73+
74+
args.add(targetWorkspace.toString() + "\\" + runnerName, "\"" + matlabCommand + "\"");
75+
args.add(startupOpts.split(" "));
76+
77+
matlabLauncher = launcher.launch().envs(envVars).cmds(args).stdout(listener);
7178

7279
// Copy runner for Windows platform in workspace.
7380
copyFileInWorkspace("win64/run-matlab-command.exe", runnerName,
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
A space-separated list of MATLAB startup options.
3+
</div>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div>
2+
A space-separated list of MATLAB startup options.
3+
</div>

0 commit comments

Comments
 (0)