@@ -38,8 +38,7 @@ public void testSetup() throws IOException {
3838 @ Test
3939 public void verifyMATLABPathNotSet () throws Exception {
4040 project .setDefinition (
41- new CpsFlowDefinition ("node { writeFile text: 'worksapce', file: 'test.txt'\n "
42- + "runMATLABCommand(command: 'pwd')}" , true ));
41+ new CpsFlowDefinition ("node { runMATLABCommand(command: 'pwd')}" , true ));
4342 WorkflowRun build = project .scheduleBuild2 (0 ).get ();
4443 j .assertLogContains ("MATLAB_ROOT" , build );
4544 }
@@ -52,8 +51,7 @@ public void verifyMATLABPathNotSet() throws Exception {
5251 @ Test
5352 public void verifyMATLABPathSet () throws Exception {
5453 project .setDefinition (
55- new CpsFlowDefinition ("node { writeFile text: 'worksapce', file: 'test.txt'\n "
56- + "testMATLABCommand(command: 'pwd')}" , true ));
54+ new CpsFlowDefinition ("node { testMATLABCommand(command: 'pwd')}" , true ));
5755 WorkflowRun build = project .scheduleBuild2 (0 ).get ();
5856 j .assertLogContains ("tester_started" , build );
5957 }
@@ -67,8 +65,7 @@ public void verifyMATLABPathSet() throws Exception {
6765 public void verifyPipelineOnSlave () throws Exception {
6866 DumbSlave s = j .createOnlineSlave ();
6967 project .setDefinition (new CpsFlowDefinition (
70- "node('!master') { writeFile text: 'worksapce', file: 'test.txt'\n "
71- + "testMATLABCommand(command: 'pwd')}" ,
68+ "node('!master') { testMATLABCommand(command: 'pwd')}" ,
7269 true ));
7370
7471 s .getWorkspaceFor (project );
@@ -85,8 +82,7 @@ public void verifyPipelineOnSlave() throws Exception {
8582 @ Test
8683 public void verifyCommandSameAsScript () throws Exception {
8784 project .setDefinition (
88- new CpsFlowDefinition ("node { writeFile text: 'worksapce', file: 'test.txt'\n "
89- + "runMATLABCommand(command: 'pwd')}" , true ));
85+ new CpsFlowDefinition ("node { runMATLABCommand(command: 'pwd')}" , true ));
9086
9187 WorkflowRun build = project .scheduleBuild2 (0 ).get ();
9288 j .assertLogContains ("pwd" , build );
@@ -99,11 +95,10 @@ public void verifyCommandSameAsScript() throws Exception {
9995
10096 @ Test
10197 public void verifyMatrixBuild () throws Exception {
102- project .setDefinition (
103- new CpsFlowDefinition ("node { writeFile text: 'worksapce', file: 'test.txt'\n "
104- + "matrix {\n " + "agent any\n " + "axes {\n " + "axis {\n " + "name: 'CMD'\n "
105- + "values: 'pwd','ver'\n }}\n "
106- + "runMATLABCommand(command: '${CMD}')}}" , true ));
98+ project .setDefinition (new CpsFlowDefinition (
99+ "node { matrix {\n " + "agent any\n " + "axes {\n " + "axis {\n " + "name: 'CMD'\n "
100+ + "values: 'pwd','ver'\n }}\n " + "runMATLABCommand(command: '${CMD}')}}" ,
101+ true ));
107102
108103 WorkflowRun build = project .scheduleBuild2 (0 ).get ();
109104 j .assertLogContains ("pwd" , build );
0 commit comments