move to unified archived repos
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 f399870..9031770 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
@@ -699,4 +699,9 @@
ComparatorLog comparatorLog = new ComparatorLog();
assertEquals("There were unexpected Comparator messages. See " + ComparatorLog.COMPARATOR_UNEXPECTED_MESSAGES_LOG_TXT, 0, comparatorLog.getNumberOfUnexpectedMessages());
}
+
+ public void testComparatorLogTests() throws IOException {
+ ComparatorLog comparatorLog = new ComparatorLog();
+ assertEquals("There were unexpected Comparator messages. See " + ComparatorLog.COMPARATOR_UNEXPECTED_MESSAGES_LOG_TXT, 0, comparatorLog.getNumberOfUnexpectedMessages());
+ }
}
diff --git a/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/releng/tests/ComparatorLog.java b/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/releng/tests/ComparatorLog.java
index 139e52b..f1a4f53 100644
--- a/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/releng/tests/ComparatorLog.java
+++ b/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/releng/tests/ComparatorLog.java
@@ -117,6 +117,7 @@
public String getComparatorLogFile() {
if (comparatorLogFile == null) {
comparatorLogFile = System.getProperty(COMPARATOR_LOG_PARAM);
+
if ((comparatorLogFile == null) || (comparatorLogFile.length() <= 0)) {
/*
* none provided, no good defaults for production, but we have
@@ -127,7 +128,10 @@
throw new IllegalArgumentException("Comparator: found no value for log location in " + COMPARATOR_LOG_PARAM);
}
else {
- System.out.println("Comparator log: " + COMPARATOR_LOG_PARAM + " specified " + comparatorLogFile);
+ if (!comparatorLogFile.endsWith("/")) {
+ comparatorLogFile = comparatorLogFile + "/";
+ }
+ System.out.println("Comparator log location: " + COMPARATOR_LOG_PARAM + " specified " + comparatorLogFile);
}
}
return comparatorLogFile;
@@ -186,14 +190,35 @@
private BufferedReader getLogFile() throws FileNotFoundException {
BufferedReader reader = null;
+ String logFileLocationAndName = null;
try {
- String logFileLocationAndName = getComparatorLogFile();
+ // assume (force) comparatorLogFile to end with slash
+ logFileLocationAndName = getComparatorLogFile() + "comparator.log";
File logFile = new File(logFileLocationAndName);
Reader log = new FileReader(logFile);
reader = new BufferedReader(log);
}
catch (FileNotFoundException e) {
- throw new FileNotFoundException("Comparator log not found where expected at " + getComparatorLogFile());
+ throw new FileNotFoundException("Comparator log not found where expected at " + logFileLocationAndName);
+ }
+ return reader;
+
+
+ }
+
+ private BufferedReader getLogFileTests() throws FileNotFoundException {
+
+ BufferedReader reader = null;
+ String logFileLocationAndName = null;
+ try {
+ // assume (force) comparatorLogFile to end with slash
+ logFileLocationAndName = getComparatorLogFile() + "comparator-unittest.log";
+ File logFile = new File(logFileLocationAndName);
+ Reader log = new FileReader(logFile);
+ reader = new BufferedReader(log);
+ }
+ catch (FileNotFoundException e) {
+ throw new FileNotFoundException("Comparator log not found where expected at " + logFileLocationAndName);
}
return reader;
@@ -201,10 +226,23 @@
}
private ArrayList<ComparatorLogMessage> getMessages() throws IOException {
- String line = null;
ArrayList<ComparatorLogMessage> loglist = new ArrayList<ComparatorLogMessage>();
- BufferedReader logFile = getLogFile();
+ // first get regular "code" messages
+ BufferedReader logFile = getLogFile();
+ getMessageObjects(loglist, logFile);
+ logFile.close();
+ // now get test bundle messages
+ BufferedReader logFileTests = getLogFileTests();
+ getMessageObjects(loglist, logFileTests);
+ logFileTests.close();
+
+
+ return loglist;
+ }
+
+ private void getMessageObjects(ArrayList<ComparatorLogMessage> loglist, BufferedReader logFile) throws IOException {
+ String line = null;
// set summary for this whole ComparatorLog
setSummary(logFile.readLine());
boolean nextstarted = false;
@@ -245,8 +283,6 @@
}
}
}
- logFile.close();
- return loglist;
}
public int getNumberOfUnexpectedMessages() throws IOException {
diff --git a/tests/org.eclipse.wtp.releng.tests/test.xml b/tests/org.eclipse.wtp.releng.tests/test.xml
index ccd10db..2ba5763 100644
--- a/tests/org.eclipse.wtp.releng.tests/test.xml
+++ b/tests/org.eclipse.wtp.releng.tests/test.xml
@@ -119,7 +119,7 @@
value="${classname}"/>
<property
name="extraVMargs"
- value="-DrelengTestsPropertiesFile=${keyCfgFile} -DrepoURLToTest=file://${buildDirectory}/${buildLabel}/repository/ -DcomparatorLogLocation=${buildDirectory}/${buildLabel}/comparator.log -DcomparatorTestSummaryLogDir=${buildDirectory}/${buildLabel}/testResults -DcomparatorFilterRules=${buildDirectory}/${buildLabel}/comparatorfilter.properties" />
+ value="-DrelengTestsPropertiesFile=${keyCfgFile} -DrepoURLToTest=file://${buildDirectory}/${buildLabel}/repository/ -DcomparatorLogLocation=${buildDirectory}/${buildLabel} -DcomparatorTestSummaryLogDir=${buildDirectory}/${buildLabel}/testResults -DcomparatorFilterRules=${buildDirectory}/${buildLabel}/comparatorfilter.properties" />
</ant>
<condition
property="dotlogavailable">