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/,\ ...@@ -14,5 +14,6 @@ bin.includes = META-INF/,\
test.xml,\ test.xml,\
transformReportToHTML.xml,\ transformReportToHTML.xml,\
about.html,\ about.html,\
plugin.properties plugin.properties,\
relengTests.properties
source.. = src/ source.. = src/
...@@ -483,31 +483,36 @@ public class BuildTests extends TestCase { ...@@ -483,31 +483,36 @@ public class BuildTests extends TestCase {
String listToReferenceFileArg = LIST_TO_REFERENCE_FILE; String listToReferenceFileArg = LIST_TO_REFERENCE_FILE;
String propertyFileName = System.getProperty("relengTestsPropertiesFile", "relengTests.properties"); String propertyFileName = System.getProperty("relengTestsPropertiesFile", "relengTests.properties");
System.out.println("relengTestsPropertiesFile: " + propertyFileName);
Properties testProperties = new Properties(); Properties testProperties = new Properties();
File propFile = new File(propertyFileName); File propFile = new File(propertyFileName);
String fullPath = propFile.getAbsolutePath(); String fullPath = propFile.getAbsolutePath();
System.out.println(fullPath); System.out.println("fullPath: " + fullPath);
InputStream propertyStream; if (propFile.exists()) {
try { InputStream propertyStream;
propertyStream = new FileInputStream(propFile); try {
testProperties.load(propertyStream); propertyStream = new FileInputStream(propFile);
qualifierArg = (String) testProperties.getProperty("qualifierArgValue", ""); testProperties.load(propertyStream);
testToReferenceArg = (String) testProperties.getProperty("testToReferenceArgValue", TEST_TO_REFERENCE); qualifierArg = (String) testProperties.getProperty("qualifierArgValue", "");
referenceIDArg = (String) testProperties.getProperty("referenceIDArgValue", ""); testToReferenceArg = (String) testProperties.getProperty("testToReferenceArgValue", TEST_TO_REFERENCE);
referenceURLArg = (String) testProperties.getProperty("referenceURLArgValue", ""); referenceIDArg = (String) testProperties.getProperty("referenceIDArgValue", "");
listToReferenceFileArg = (String) testProperties.getProperty("listToReferenceFileArgValue", LIST_TO_REFERENCE_FILE); referenceURLArg = (String) testProperties.getProperty("referenceURLArgValue", "");
} listToReferenceFileArg = (String) testProperties.getProperty("listToReferenceFileArgValue", LIST_TO_REFERENCE_FILE);
catch (FileNotFoundException e) { }
// just use defaults catch (FileNotFoundException e) {
System.out.println(e.getMessage()); // just use defaults
System.out.println(e.getMessage());
}
catch (IOException e) {
// just use defaults
System.out.println(e.getMessage());
}
} }
catch (IOException e) { else {
// just use defaults System.out.println("relengTestsPropertiesFile does not exist");
System.out.println(e.getMessage());
} }
String[] args = new String[]{qualifierArg, testToReferenceArg, referenceIDArg, referenceURLArg, listToReferenceFileArg}; String[] args = new String[]{qualifierArg, testToReferenceArg, referenceIDArg, referenceURLArg, listToReferenceFileArg};
return args; 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