It works for parallel/serial tests. But problem with passing parameters.
After this commit, I will start trying with multithread
This commit is contained in:
@@ -246,7 +246,7 @@ public class TestingList extends Panel {
|
||||
status = "After previous";
|
||||
break;
|
||||
case START_SEQ_TOGETHER:
|
||||
status = "Together with previous";
|
||||
status = "With previous";
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
@@ -818,12 +818,13 @@ public class TestingList extends Panel {
|
||||
//alternatively, the test must be: selected, first of the list.
|
||||
System.out.println(String.valueOf(row) +"\t"+ String.valueOf(bSelected) +"\t"+ String.valueOf(selectedTestsRows.length) +"\t"+ sStartSequence +"\t"+ sStatus);
|
||||
|
||||
if( bSelected &&
|
||||
(selectedTestsRows.length == 0 || //the test must be: selected, first of the list.
|
||||
(sStartSequence.equals(StartSequence.START_SEQ_TOGETHER.toString()) && //or the test must be: selected, set as start with previous, pending.
|
||||
sStatus.equals(TestStatus.PENDING.toString()) ))){
|
||||
if( bSelected &&
|
||||
sStatus.equals(TestStatus.PENDING.toString()) &&
|
||||
(selectedTestsRows.length == 0 || //the test must be: selected, pending, first of the list.
|
||||
sStartSequence.equals(StartSequence.START_SEQ_TOGETHER.toString()) )){ //or the test must be: selected, pending, set as start with previous
|
||||
selectedTestsRows = append(selectedTestsRows, row);
|
||||
} else if (bSelected && //if this test must be executed...
|
||||
} else if (bSelected &&
|
||||
sStatus.equals(TestStatus.PENDING.toString()) &&//if this test must be executed...
|
||||
selectedTestsRows.length > 0 && //but there are already tests to be executed in parallel....
|
||||
(sStartSequence.equals(StartSequence.START_SEQ_AFTER.toString()))){ //...and this test must be executed in series, then stop searching
|
||||
break;
|
||||
@@ -832,7 +833,7 @@ public class TestingList extends Panel {
|
||||
if (selectedTestsRows.length > 0) { //at least one test is selected: launch it (or them)
|
||||
if (executeParallelTestsGroup(selectedTestsRows) < 0){ //last execution did not find a test file. Continue with next execution
|
||||
executeTest(position+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!bSelected){ //No test to play. Stop
|
||||
@@ -862,16 +863,24 @@ public class TestingList extends Panel {
|
||||
}
|
||||
showResult(sDeviceName, sTestPath, "Test running", TestStatus.RUNNING.toString());
|
||||
//launch the test
|
||||
args.put("DEVICE", sDeviceName);
|
||||
args.put("ret", "");
|
||||
args.put("status", false);
|
||||
if(!mParameters.isEmpty()){
|
||||
args.put("parameters", mParameters);
|
||||
logger.log(Level.INFO, "Running test '"+sTestName+"' with the following parameters: " + mParameters.toString());
|
||||
System.out.println("Running test '"+sTestName+"' with the following parameters: " + mParameters.toString());
|
||||
} else {
|
||||
logger.log(Level.INFO, "Running Test '" + sTestName + "'. No parameters found.");
|
||||
System.out.println("Running test '"+sTestName + "'. No parameters found.");
|
||||
}
|
||||
args.put("parameters", mParameters);
|
||||
args.put("device", sDeviceName);
|
||||
args.put("ret", "");
|
||||
args.put("status", false);
|
||||
System.out.println("Parameters passed: "+ String.valueOf(mParameters));
|
||||
runAsync(sTestPath, args);
|
||||
try {
|
||||
Thread.sleep(100); //1000 milliseconds is one second.
|
||||
} catch(InterruptedException ex) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
iRet = 0;
|
||||
} catch (Exception ex) {
|
||||
SwingUtils.showMessage(this, "executeTest()", ex.toString());
|
||||
|
||||
Reference in New Issue
Block a user