add new releng tests
diff --git a/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/layout/tests/TestLayout.java b/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/layout/tests/TestLayout.java
index c978876..522e444 100644
--- a/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/layout/tests/TestLayout.java
+++ b/tests/org.eclipse.wtp.releng.tests/src/org/eclipse/wtp/layout/tests/TestLayout.java
@@ -73,6 +73,10 @@
String property = System.getProperty("org.eclipse.wtp.inputDir");
if (property == null) {
+ // TODO: dropins is not a good assumption
+ // hard to specify as property, since we have just one releng test
+ // (need to do for each
+ // type of 'build'?
property = System.getProperty("eclipse.home.location") + "dropins/eclipse/plugins/";
}
URL url = new URL(property);
@@ -96,13 +100,12 @@
if (errors.size() > 0) {
FileWriter outfileWriter = null;
File outfile = null;
- String testDirName = System.getProperty("junit-report-output");
+ String testOutputDirName = System.getProperty("junit-report-output");
try {
- outfile = new File(testDirName, "layoutErrors.html");
+ outfile = new File(testOutputDirName, "layoutErrors.html");
outfileWriter = new FileWriter(outfile);
- for (Iterator iter = errors.iterator(); iter.hasNext();) {
- outfileWriter.write("<p>" + (String) iter.next() + "</p>" + EOL);
- }
+ introduceLayoutErrors(outfileWriter);
+ listErrors(outfileWriter);
}
finally {
if (outfileWriter != null) {
@@ -113,6 +116,27 @@
}
}
+ private void listErrors(FileWriter outfileWriter) throws IOException {
+ outfileWriter.write("<ul>" + EOL);
+ for (Iterator iter = errors.iterator(); iter.hasNext();) {
+ outfileWriter.write("<li>" + (String) iter.next() + "</li>" + EOL);
+ }
+ outfileWriter.write("</ul>" + EOL);
+ }
+
+ private void introduceLayoutErrors(FileWriter outfileWriter) throws IOException {
+ outfileWriter.write("<p>" + EOL);
+ outfileWriter.write("The layout test looks for files which are required, " + EOL);
+ outfileWriter.write("or common. Missing about.html files are considered blocking " + EOL);
+ outfileWriter.write("defects (for a release). Missing properties files indicates " + EOL);
+ outfileWriter.write("that strings are not externalized. Or, either of these may indicate a mistake " + EOL);
+ outfileWriter.write("in the build.properties file. The test for class or jar files is meant as a " + EOL);
+ outfileWriter.write("sanity check that the build worked as expected. There are many cases, though, " + EOL);
+ outfileWriter.write("where it is expected to have no class or jar files, in which case the " + EOL);
+ outfileWriter.write("bundle needs to be added to an explicit list of exceptions" + EOL);
+ outfileWriter.write("</p>" + EOL);
+ }
+
/*
* Check the configuration file and return a set of regular expressions
* which match the list of files that are expected to be in the bundle.