diff --git a/plugins/TestingList.java b/plugins/TestingList.java index a553ea0..f5fa81d 100644 --- a/plugins/TestingList.java +++ b/plugins/TestingList.java @@ -1524,7 +1524,7 @@ public class TestingList extends Panel { HashMap args2 = new HashMap(); //this is the global map that will contain one map per test. HashMap testArgs; //this is the map for a test. RunTest runTest; - String sTestName = "", sDeviceName = "", sTestPath = ""; + String sTestName = "", sDeviceName = "", sTestPath = "", sTestID = ""; //sTestID is the compination of device name + test path for (int row : rowsToExecute) { //System.out.println(String.valueOf(row) + "\t" + sDeviceName + "\t" + sTestName + "\t" + sTestCaseName + "\t" + String.valueOf(rowsToExecute.length)); try { @@ -1533,6 +1533,7 @@ public class TestingList extends Panel { sTestPath = (String) testArgs.get(testArgNames.TEST_PATH.toString()); sDeviceName = (String) testArgs.get(testArgNames.DEVICE.toString()); mParameters = (HashMap) testArgs.get(testArgNames.PARAMETERS.toString()); + sTestID = sDeviceName+"|"+sTestPath; File f = new File(sTestPath); if (!f.exists() || f.isDirectory()) { logger.log(Level.SEVERE, "Cannot find test script: " + sTestPath); @@ -1552,7 +1553,7 @@ public class TestingList extends Panel { logger.log(Level.INFO, "Running Test '" + sTestName + "'. No parameters found."); System.out.println("Running test '" + sTestName + "'. No parameters found."); } - args2.put(sTestPath, testArgs); + args2.put(sTestID, testArgs); hTests = args2; iRet = 0; } catch (Exception ex) { @@ -1576,7 +1577,7 @@ public class TestingList extends Panel { System.out.println("hTests: "+hTests.entrySet().toString()); if(hTests.isEmpty()) return iRet; for (Map.Entry hTest : hTests.entrySet()) { - sTestPath = hTest.getKey().toString(); + sTestPath = (String) hTest.getValue().get(testArgNames.TEST_PATH.toString()); sTestPath = sTestPath.replace("\\", "\\\\"); sParallelizeCommand = sParallelizeCommand + "(run,(str('" + sTestPath; sParallelizeArguments = "None, {'parameters':" + convertParametersMapToPythonMap(hTest.getValue().get("parameters").toString()) @@ -1591,9 +1592,9 @@ public class TestingList extends Panel { sParallelizeCommand = sParallelizeCommand + ")))"; //very last part of command "parallelize" } } - //System.out.println(sParallelizeCommand); + System.out.println(sParallelizeCommand); Object ret = eval(sParallelizeCommand); - //System.out.println(ret); + System.out.println(ret); String sTestResult, sTestStatus; if(ret == null){ SwingUtils.showMessage(TestingList.this, "executeParallelTestsGroup()", "The test script(s) did not return any feedback."); @@ -1604,12 +1605,13 @@ public class TestingList extends Panel { //check if the mapping of the selected test has all expected return values if (((List) oTestRet).size() >= 4) { //extract return data of the current test - sTestPath = String.valueOf(((List) oTestRet).get(0)); + sTestPath = String.valueOf(((List) oTestRet).get(0)); sDeviceName = String.valueOf(((List) oTestRet).get(1)); sTestResult = String.valueOf(((List) oTestRet).get(2)); sTestStatus = String.valueOf(((List) oTestRet).get(3)); + sTestID = sDeviceName+"|"+sTestPath; //from the map of executed tests, get the test name (key is test path) - HashMap hTest = hTests.get(sTestPath); + HashMap hTest = hTests.get(sTestID); sTestName = String.valueOf(hTest.get(testArgNames.TEST.toString())); } else { //problem, the test script does not return all the expected return values String sErrorText = "Test " + sTestPath + " did not return all required return values"; @@ -1617,10 +1619,10 @@ public class TestingList extends Panel { SwingUtils.showMessage(TestingList.this, "executeParallelTestsGroup()", sErrorText); System.out.println(String.valueOf(sErrorText)); //try to fetch at least first element of returned map. If fails, it will go to catch - sTestPath = String.valueOf(((List) oTestRet).get(0)); + sTestID = String.valueOf(((List) oTestRet).get(0)); sTestStatus = sErrorText; sTestResult = "false"; - HashMap hTest = hTests.get(sTestPath); + HashMap hTest = hTests.get(sTestID); sDeviceName = String.valueOf(hTest.get(testArgNames.DEVICE.toString())); sTestName = String.valueOf(hTest.get(testArgNames.TEST.toString())); } diff --git a/script/tests/tests/PS Tests/test without ioc/.config b/script/tests/tests/PS Tests/test without ioc/.config index 091a952..4ab9730 100644 --- a/script/tests/tests/PS Tests/test without ioc/.config +++ b/script/tests/tests/PS Tests/test without ioc/.config @@ -1,4 +1,4 @@ -#Mon Sep 07 10:48:01 CEST 2015 +#Wed Sep 16 16:17:06 CEST 2015 name=test without ioc description=test that does not use any connection to IOC. It is useful to test pure pshell graphical features. -parameters=repeatTimes\:3\:how many times the test is repeated;howManySamples\:300\:How many samples are plotted;delayBetweenSampleS\:0.05\:delay [s] between two samples; +parameters=repeatTimes\:3\:how many times the test is repeated;howManySamples\:50\:How many samples are plotted;delayBetweenSampleS\:0.05\:delay [s] between two samples;