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

Commit f0e1316

Browse files
authored
Merge pull request #124 from mathworks/revert-122-temp_path_issue
Revert "Fix Java Temp Path discrepancy for Window"
2 parents cb5e71f + 96e3b85 commit f0e1316

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,16 @@ default FilePath getFilePathForUniqueFolder(Launcher launcher, String uniqueName
7676
* https://javadoc.jenkins-ci.org/jenkins/tasks/SimpleBuildStep.html */
7777

7878
String tmpDir = getNodeSpecificTmpFolderPath(workspace);
79-
80-
return new FilePath(launcher.getChannel(), tmpDir + "/" + uniqueName);
79+
return new FilePath(launcher.getChannel(), tmpDir+"/"+uniqueName);
8180
}
8281

8382
default String getNodeSpecificTmpFolderPath(FilePath workspace) throws IOException, InterruptedException {
8483
Computer cmp = workspace.toComputer();
8584
if (cmp == null) {
8685
throw new IOException(Message.getValue("build.workspace.computer.not.found"));
8786
}
88-
89-
String tmpDirPath = (String) cmp.getSystemProperties().get("java.io.tmpdir");
90-
91-
// Invoke FilePath.normalize for clean file path on any channel.
92-
FilePath tmpDir = new FilePath(cmp.getChannel(), tmpDirPath);
93-
return tmpDir.getRemote();
87+
String tmpDir = (String) cmp.getSystemProperties().get("java.io.tmpdir");
88+
return tmpDir;
9489
}
9590

9691
default String getUniqueNameForRunnerFile() {

src/test/java/com/mathworks/ci/RunMatlabCommandBuilderTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,6 @@ public void verifyCommandSupportsEnvVar() throws Exception {
249249

250250
/*
251251
* Test to verify if appropriate MATALB runner file is copied in workspace.
252-
*
253-
* NOTE: This test assumes there is no MATLAB installed and is not on System Path.
254-
*
255252
*/
256253
@Test
257254
public void verifyMATLABrunnerFileGenerated() throws Exception {
@@ -265,9 +262,6 @@ public void verifyMATLABrunnerFileGenerated() throws Exception {
265262

266263
/*
267264
* Test to verify if Matrix build fails when MATLAB is not available.
268-
*
269-
* NOTE: This test assumes there is no MATLAB installed and is not on System Path.
270-
*
271265
*/
272266
@Test
273267
public void verifyMatrixBuildFails() throws Exception {

src/test/java/com/mathworks/ci/RunMatlabTestsBuilderTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,6 @@ public void veriyEmptyParameters() throws Exception {
334334

335335
/*
336336
* Test to verify if appropriate MATALB runner file is copied in workspace.
337-
*
338-
* NOTE: This test assumes there is no MATLAB installed and is not on System Path.
339-
*
340337
*/
341338
@Test
342339
public void verifyMATLABrunnerFileGeneratedForAutomaticOption() throws Exception {
@@ -349,9 +346,6 @@ public void verifyMATLABrunnerFileGeneratedForAutomaticOption() throws Exception
349346

350347
/*
351348
* Test to verify if Matrix build fails when MATLAB is not available.
352-
*
353-
* NOTE: This test assumes there is no MATLAB installed and is not on System Path.
354-
*
355349
*/
356350
@Test
357351
public void verifyMatrixBuildFails() throws Exception {

0 commit comments

Comments
 (0)