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

Commit 45f64b6

Browse files
author
Nikhil Bhoski
committed
Updated tests
1 parent 19ea2e7 commit 45f64b6

File tree

8 files changed

+11
-9
lines changed

8 files changed

+11
-9
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public void verifyMATLABrunnerFileGenerated() throws Exception {
261261
scriptBuilder.setMatlabCommand("pwd");
262262
project.getBuildersList().add(scriptBuilder);
263263
FreeStyleBuild build = project.scheduleBuild2(0).get();
264-
jenkins.assertLogContains("MATLAB_ROOT", build);
264+
jenkins.assertLogContains("run_matlab_command", build);
265265
}
266266

267267
/*
@@ -285,12 +285,12 @@ public void verifyMatrixBuildFails() throws Exception {
285285
vals.put("VERSION", "R2018a");
286286
Combination c1 = new Combination(vals);
287287
MatrixRun build = matrixProject.scheduleBuild2(0).get().getRun(c1);
288-
jenkins.assertLogContains("MATLAB_ROOT", build);
288+
jenkins.assertLogContains("run_matlab_command", build);
289289
jenkins.assertBuildStatus(Result.FAILURE, build);
290290
vals.put("VERSION", "R2018b");
291291
Combination c2 = new Combination(vals);
292292
MatrixRun build2 = matrixProject.scheduleBuild2(0).get().getRun(c2);
293-
jenkins.assertLogContains("MATLAB_ROOT", build2);
293+
jenkins.assertLogContains("run_matlab_command", build2);
294294
jenkins.assertBuildStatus(Result.FAILURE, build2);
295295
}
296296

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ public void verifyMATLABrunnerFileGeneratedForAutomaticOption() throws Exception
343343
project.getBuildWrappersList().add(this.buildWrapper);
344344
project.getBuildersList().add(testBuilder);
345345
FreeStyleBuild build = project.scheduleBuild2(0).get();
346-
jenkins.assertLogContains("MATLAB_ROOT", build);
346+
jenkins.assertLogContains("run_matlab_command", build);
347347
}
348348

349349
/*
@@ -355,7 +355,7 @@ public void verifyMATLABrunnerFileGeneratedForAutomaticOption() throws Exception
355355
@Test
356356
public void verifyMatrixBuildFails() throws Exception {
357357
MatrixProject matrixProject = jenkins.createProject(MatrixProject.class);
358-
Axis axes = new Axis("VERSION", "R2018a", "R2018b");
358+
Axis axes = new Axis("VERSION", "R2018a", "R2015b");
359359
matrixProject.setAxes(new AxisList(axes));
360360
String matlabRoot = getMatlabroot("R2018b");
361361
this.buildWrapper.setMatlabRootFolder(matlabRoot.replace("R2018b", "$VERSION"));
@@ -370,15 +370,17 @@ public void verifyMatrixBuildFails() throws Exception {
370370
Combination c1 = new Combination(vals);
371371
MatrixRun build1 = matrixProject.scheduleBuild2(0).get().getRun(c1);
372372

373-
jenkins.assertLogContains("MATLAB_ROOT", build1);
373+
jenkins.assertLogContains("run_matlab_command", build1);
374374
jenkins.assertBuildStatus(Result.FAILURE, build1);
375375

376376
// Check for second Matrix combination
377-
378-
Combination c2 = new Combination(vals);
377+
378+
Map<String, String> val = new HashMap<String, String>();
379+
val.put("VERSION", "R2015b");
380+
Combination c2 = new Combination(val);
379381
MatrixRun build2 = matrixProject.scheduleBuild2(0).get().getRun(c2);
380382

381-
jenkins.assertLogContains("MATLAB_ROOT", build2);
383+
jenkins.assertLogContains("MatlabNotFoundError", build2);
382384
jenkins.assertBuildStatus(Result.FAILURE, build2);
383385
}
384386

src/test/resources/versioninfo/R2017a/bin/matlab

Whitespace-only changes.

src/test/resources/versioninfo/R2017a/bin/matlab.exe

Whitespace-only changes.

src/test/resources/versioninfo/R2018a/bin/matlab

Whitespace-only changes.

src/test/resources/versioninfo/R2018a/bin/matlab.exe

Whitespace-only changes.

src/test/resources/versioninfo/R2018b/bin/matlab

Whitespace-only changes.

src/test/resources/versioninfo/R2018b/bin/matlab.exe

Whitespace-only changes.

0 commit comments

Comments
 (0)