Skip to content
Snippets Groups Projects
Commit d7617c05 authored by david_williams's avatar david_williams
Browse files

283792 read properties for versioning tests

parent 805fd5b3
No related branches found
No related tags found
No related merge requests found
......@@ -14,5 +14,6 @@ bin.includes = META-INF/,\
test.xml,\
transformReportToHTML.xml,\
about.html,\
plugin.properties
plugin.properties,\
relengTests.properties
source.. = src/
......@@ -483,31 +483,36 @@ public class BuildTests extends TestCase {
String listToReferenceFileArg = LIST_TO_REFERENCE_FILE;
String propertyFileName = System.getProperty("relengTestsPropertiesFile", "relengTests.properties");
System.out.println("relengTestsPropertiesFile: " + propertyFileName);
Properties testProperties = new Properties();
File propFile = new File(propertyFileName);
String fullPath = propFile.getAbsolutePath();
System.out.println(fullPath);
InputStream propertyStream;
try {
propertyStream = new FileInputStream(propFile);
testProperties.load(propertyStream);
qualifierArg = (String) testProperties.getProperty("qualifierArgValue", "");
testToReferenceArg = (String) testProperties.getProperty("testToReferenceArgValue", TEST_TO_REFERENCE);
referenceIDArg = (String) testProperties.getProperty("referenceIDArgValue", "");
referenceURLArg = (String) testProperties.getProperty("referenceURLArgValue", "");
listToReferenceFileArg = (String) testProperties.getProperty("listToReferenceFileArgValue", LIST_TO_REFERENCE_FILE);
}
catch (FileNotFoundException e) {
// just use defaults
System.out.println(e.getMessage());
System.out.println("fullPath: " + fullPath);
if (propFile.exists()) {
InputStream propertyStream;
try {
propertyStream = new FileInputStream(propFile);
testProperties.load(propertyStream);
qualifierArg = (String) testProperties.getProperty("qualifierArgValue", "");
testToReferenceArg = (String) testProperties.getProperty("testToReferenceArgValue", TEST_TO_REFERENCE);
referenceIDArg = (String) testProperties.getProperty("referenceIDArgValue", "");
referenceURLArg = (String) testProperties.getProperty("referenceURLArgValue", "");
listToReferenceFileArg = (String) testProperties.getProperty("listToReferenceFileArgValue", LIST_TO_REFERENCE_FILE);
}
catch (FileNotFoundException e) {
// just use defaults
System.out.println(e.getMessage());
}
catch (IOException e) {
// just use defaults
System.out.println(e.getMessage());
}
}
catch (IOException e) {
// just use defaults
System.out.println(e.getMessage());
else {
System.out.println("relengTestsPropertiesFile does not exist");
}
String[] args = new String[]{qualifierArg, testToReferenceArg, referenceIDArg, referenceURLArg, listToReferenceFileArg};
return args;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment