This commit is contained in:
boccioli_m
2015-08-17 14:21:17 +02:00
parent 6a31ee1838
commit 42347db171

View File

@@ -964,6 +964,7 @@ public class TestingList extends Panel {
String sTestName = jTable1.getValueAt(row, COL.TESTNAME.ordinal()).toString();
String sTestCaseName = jTable1.getValueAt(row, COL.TESTSUITE.ordinal()).toString();
String sTestPath = jTable1.getValueAt(row, COL.TESTPATH.ordinal()).toString();
// HashMap mParameters = buildParametersMap(String.valueOf(jTable1.getValueAt(row, COL.TESTPARAMS.ordinal())));
HashMap mParameters = buildParametersMap(String.valueOf(jTable1.getValueAt(row, COL.TESTPARAMS.ordinal())));
HashMap testArgs = new HashMap();
//args.put("ret", "");
@@ -972,12 +973,33 @@ public class TestingList extends Panel {
testArgs.put(testArgNames.DEVICE.toString(), sDeviceName);
testArgs.put(testArgNames.TEST_PATH.toString(), sTestPath);
testArgs.put(testArgNames.STATUS.toString(), false);
String testParams = getTestParameters(sTestPath);
System.out.println("sTestPath: " + sTestPath);
System.out.println("testParams: " + testParams);
return testArgs;
}
private String getTestParameters(String sTestPath){
Properties propTest = new Properties();
File fileTest = new File(sTestPath);
String testParams = "";
if (fileTest.isDirectory()) {
File configFile = new File(fileTest.getPath() + FilenameUtils.separatorsToSystem("/.config"));
if (configFile.exists() && !configFile.isDirectory()) {
try {
InputStream ist = new FileInputStream(configFile);
propTest.load(ist);
testParams = propTest.getProperty("parameters");
} catch (IOException ex) {
Logger.getLogger(TestingList.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
return testParams;
}
/**
* convert HashMap string separators to python dictionary string sepatators
* convert HashMap string separators to python dictionary string separators
*
* @param sParameters string coming from HashMap conaining the list of parameters to be passed to the test script.
* Example: