Bug 290883 - Add links to XML test results
diff --git a/bundles/org.eclipse.build.tools/src/org/eclipse/releng/generators/EclipseTestResultsGeneratorNoMail.java b/bundles/org.eclipse.build.tools/src/org/eclipse/releng/generators/EclipseTestResultsGeneratorNoMail.java
index f4b0e2b..0cf9468 100644
--- a/bundles/org.eclipse.build.tools/src/org/eclipse/releng/generators/EclipseTestResultsGeneratorNoMail.java
+++ b/bundles/org.eclipse.build.tools/src/org/eclipse/releng/generators/EclipseTestResultsGeneratorNoMail.java
@@ -17,22 +17,22 @@
public static void main(final String[] args) {
final String publishingContent = "/home/davidw/gitdavidw2/eclipse.platform.releng.aggregator/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles";
+ String localTestBuildId = "I20141120-1922";
+ String localTestDropDir="/shared/eclipse/buildsdavidw/4I/siteDir/eclipse/downloads/drops4/" + localTestBuildId;
final EclipseTestResultsGeneratorNoMail test = new EclipseTestResultsGeneratorNoMail();
test.buildType = "I";
test.setIsBuildTested(true);
test.setDropTokenList("%sdk%,%tests%,%example%,%rcpruntime%,%rcpsdk%,%deltapack%,%runtime%,%jdt%,%jdtsdk%,%jdtc%,%pde%,%pdesdk%,%cvs%,%cvssdk%,%swt%,%relengtools%");
test.getDropTokensFromList(test.getDropTokenList());
- test.setXmlDirectoryName("/data/shared/eclipse/builds/4I/siteDir/eclipse/downloads/drops4/I20140923-0105/testresults/xml");
- test.setHtmlDirectoryName("/data/shared/eclipse/builds/4I/siteDir/eclipse/downloads/drops4/I20140923-0105/testresults/html");
- test.setDropDirectoryName("/data/shared/eclipse/builds/4I/siteDir/eclipse/downloads/drops4/I20140923-0105");
+ test.setXmlDirectoryName(localTestDropDir + "/testresults/xml");
+ test.setDropDirectoryName(localTestDropDir);
test.setTestResultsTemplateFileName(publishingContent + "/templateFiles/testResults.php.template");
test.setDropTemplateFileName(publishingContent + "/templateFiles/index.php.template");
test.setTestResultsHtmlFileName("testResults.php");
test.setDropHtmlFileName("index.php");
- // test.setDropHtmlFileName("index.html");
- test.setHrefTestResultsTargetPath("/shared/eclipse/builds/4I/siteDir/eclipse/downloads/drops4/I20140923-0105/testresults");
- test.setCompileLogsDirectoryName("/shared/eclipse/builds/4I/siteDir/eclipse/downloads/drops4/I20140923-0105/compilelogs");
+ test.setHrefTestResultsTargetPath("testresults");
+ test.setCompileLogsDirectoryName(localTestDropDir + "/compilelogs");
test.setHrefCompileLogsTargetPath("compilelogs");
test.setTestManifestFileName("/home/davidw/gitdavidw2/eclipse.platform.releng.aggregator/eclipse.platform.releng.tychoeclipsebuilder/eclipse/publishingFiles/testManifest.xml");
test.execute();
diff --git a/bundles/org.eclipse.build.tools/src/org/eclipse/releng/generators/TestResultsGenerator.java b/bundles/org.eclipse.build.tools/src/org/eclipse/releng/generators/TestResultsGenerator.java
index ca021c9..58a6e83 100644
--- a/bundles/org.eclipse.build.tools/src/org/eclipse/releng/generators/TestResultsGenerator.java
+++ b/bundles/org.eclipse.build.tools/src/org/eclipse/releng/generators/TestResultsGenerator.java
@@ -235,7 +235,7 @@
// Arbitrary path used in the index.php page to href the
// generated .html files.
public String hrefTestResultsTargetPath;
- // Aritrary path used in the index.php page to reference the compileLogs
+ // Arbitrary path used in the index.php page to reference the compileLogs
public String hrefCompileLogsTargetPath;
// Location of compile logs base directory
public String compileLogsDirectoryName;
@@ -552,8 +552,12 @@
if (errorCount == -1) {
aString = aString.concat(displayName);
} else {
- aString = aString + "<a href=" + "\"" + hrefTestResultsTargetPath + "/"
- + fileName.substring(begin + 1, fileName.length() - 4) + ".html" + "\">" + displayName + "</a>";
+ // rawfilename is file name with no extension.
+ String rawfilename=fileName.substring(begin + 1, fileName.length() - 4);
+ aString = aString + "<a href=" + "\"" + hrefTestResultsTargetPath + "/html/"
+ + rawfilename + ".html" + "\">" + displayName + "</a>";
+ aString = aString + " <a style=\"color:#AAAAAA\" title=\"XML Test Result (e.g. for importing into the Eclipse JUnit view)\" href=\"" + hrefTestResultsTargetPath + "/xml/"
+ + rawfilename + ".xml" + "\">(XML)</a>";
}
if (errorCount == -1) {