283792 read properties for versioning tests
diff --git a/releng.control/cc_config.xml b/releng.control/cc_config.xml
index 8242eca..b2d77b0 100644
--- a/releng.control/cc_config.xml
+++ b/releng.control/cc_config.xml
@@ -731,9 +731,6 @@
                 <property
                     name="build.distribution"
                     value="wtp"/>
-                <property 
-                    name="countQualifierIncreaseOnlyAsError"
-                    value="true" />
             </ant>
         </schedule>
     </project>
@@ -970,10 +967,7 @@
                     value="HEAD"/>
                 <property
                     name="build.distribution"
-                    value="wtp"/>
-                <property 
-                    name="countQualifierIncreaseOnlyAsError"
-                    value="true" />                    
+                    value="wtp"/>                 
             </ant>
         </schedule>
     </project>
diff --git a/releng.wtpbuilder/distribution/wtp.tests/build.xml b/releng.wtpbuilder/distribution/wtp.tests/build.xml
index 3ae9c93..675ed77 100644
--- a/releng.wtpbuilder/distribution/wtp.tests/build.xml
+++ b/releng.wtpbuilder/distribution/wtp.tests/build.xml
@@ -266,8 +266,6 @@
                 value="-Dprojectname=${projectname}"/>
             <jvmarg
                 value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
-            <jvmarg
-                value="-DcountQualifierIncreaseOnlyAsError=${countQualifierIncreaseOnlyAsError}"/>
             <arg
                 value="-nosplash"/>
             <arg
diff --git a/tests/org.eclipse.wtp.releng.tests/relengTests.properties b/tests/org.eclipse.wtp.releng.tests/relengTests.properties
new file mode 100644
index 0000000..77b078a
--- /dev/null
+++ b/tests/org.eclipse.wtp.releng.tests/relengTests.properties
@@ -0,0 +1,8 @@
+
+
+#qualifierArgValue=-countQualifierIncreaseOnlyAsError
+qualifierArgValue=
+
+referenceIDArgValue = R-3.1-20090616035105
+referenceURLArgValue = http://archive.eclipse.org/webtools/downloads/drops/R3.1/R-3.1-20090616035105/versioningReference_R-3.1-20090616035105.xml
+
diff --git a/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/releng/tests/BuildTests.java b/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/releng/tests/BuildTests.java
index 2ac3339..ab3d568 100644
--- a/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/releng/tests/BuildTests.java
+++ b/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/releng/tests/BuildTests.java
@@ -11,8 +11,11 @@
 package org.eclipse.wtp.releng.tests;
 
 import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FilenameFilter;
 import java.io.IOException;
+import java.io.InputStream;
 import java.net.URL;
 import java.text.DecimalFormat;
 import java.util.ArrayList;
@@ -20,6 +23,7 @@
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Properties;
 import java.util.zip.ZipException;
 import java.util.zip.ZipFile;
 
@@ -33,6 +37,10 @@
 
 
 
+	private static final String LIST_TO_REFERENCE_FILE = "-listToReferenceFile";
+	private static final String TEST_TO_REFERENCE = "-testToReference";
+	private static final String COUNT_QUALIFIER_INCREASE_ONLY_AS_ERROR = "-countQualifierIncreaseOnlyAsError";
+
 	public class FileSuffixFilter implements FilenameFilter {
 
 		private String suffix;
@@ -456,25 +464,55 @@
 	 * @throws Exception
 	 */
 	public void testVersionCompare() throws Exception {
-		String [] runArgs = null;
-		String[] args = new String[]{"-testToReference", "R-3.1-20090616035105", "http://archive.eclipse.org/webtools/downloads/drops/R3.1/R-3.1-20090616035105/versioningReference_R-3.1-20090616035105.xml", "-listToReferenceFile"};
 		VersionLister versionLister = new VersionLister();
-		
-		String qualifierCheckString = System.getProperty("countQualifierIncreaseOnlyAsError");
-		if ("true".equals(qualifierCheckString)) {
-			runArgs = new String[args.length + 1];
-			System.arraycopy(args, 0, runArgs, 1, args.length);
-			runArgs[0]="-countQualifierIncreaseOnlyAsError";
-		}
-		else {
-			runArgs = args;
-		}
-		Object result = versionLister.run(runArgs);
+		String[] args = getArgs();
+
+		Object result = versionLister.run(args);
 		boolean testok = (IApplication.EXIT_OK.equals(result));
 		assertTrue("There is an error in versioning. See full listing for details.", testok);
 
 	}
 
+
+	private String[] getArgs() {
+		/* provide some defaults, in case property file not provided */
+		String qualifierArg = COUNT_QUALIFIER_INCREASE_ONLY_AS_ERROR;
+		String testToReferenceArg = TEST_TO_REFERENCE;
+		String referenceIDArg = "R-3.1-20090616035105";
+		String referenceURLArg = "http://archive.eclipse.org/webtools/downloads/drops/R3.1/R-3.1-20090616035105/versioningReference_R-3.1-20090616035105.xml";
+		String listToReferenceFileArg = LIST_TO_REFERENCE_FILE;
+
+		String propertyFileName = System.getProperty("relengTestsPropertiesFile", "relengTests.properties");
+		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.get("qualifierArgValue");
+			testToReferenceArg = (String) testProperties.get("testToReferenceArgValue");
+			referenceIDArg = (String) testProperties.get("referenceIDArgValue");
+			referenceURLArg = (String) testProperties.get("referenceURLArgValue");
+			listToReferenceFileArg = (String) testProperties.get("listToReferenceFileArgValue");
+		}
+		catch (FileNotFoundException e) {
+			// just use defaults
+			System.out.println(e.getMessage());
+		}
+		catch (IOException e) {
+			// just use defaults
+			System.out.println(e.getMessage());
+		}
+		
+		
+		
+		String[] args = new String[]{qualifierArg, testToReferenceArg, referenceIDArg, referenceURLArg, listToReferenceFileArg};
+
+		return args;
+	}
+
 	/**
 	 * This method does not really test anything, be itself (yet) it just uses
 	 * a URL connection to access the internet just to make sure it is logged.
@@ -492,7 +530,9 @@
 	}
 
 	/**
-	 * No assert here ... we just want a print out to log to double check memory settings.
+	 * No assert here ... we just want a print out to log to double check
+	 * memory settings.
+	 * 
 	 * @throws Exception
 	 */
 	public void testMemory() throws Exception {
@@ -503,7 +543,7 @@
 
 		// total amount of memory reserved
 		long totalMem = Runtime.getRuntime().totalMemory();
-		System.out.printf("%1$20s \t%2$7.2f MB%n", "Total Memory: ",(totalMem / 1000000F));
+		System.out.printf("%1$20s \t%2$7.2f MB%n", "Total Memory: ", (totalMem / 1000000F));
 
 		// free memory
 		long freeMem = Runtime.getRuntime().freeMemory();
diff --git a/tests/org.eclipse.wtp.releng.tests/test.xml b/tests/org.eclipse.wtp.releng.tests/test.xml
index f6888a1..f0c06c8 100644
--- a/tests/org.eclipse.wtp.releng.tests/test.xml
+++ b/tests/org.eclipse.wtp.releng.tests/test.xml
@@ -66,6 +66,8 @@
                       value="${classname}" />
             <property name="vmargs"
                       value="-DbuildDirectory='${buildDirectory}' -DbuildLabel='${buildLabel}'" />
+            <property name="extraVMargs" value="-DrelengTestsPropertiesFile=${keyCfgFile}"/>
+
         </ant>
 
         <copy failonerror="false"