Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSravan Kumar Lakkimsetti2020-02-04 11:15:23 +0000
committerSravan Kumar Lakkimsetti2020-02-04 11:15:23 +0000
commite56d85e7eeec0fe885929c52f8a3da9bf47f4fd6 (patch)
tree6560083ecd4781ac7073b937bad8eafda73a9ee9 /cje-production/scripts
parented66ec5edb06b21ef4623234f4c1a361277e4d9e (diff)
downloadeclipse.platform.releng.aggregator-e56d85e7eeec0fe885929c52f8a3da9bf47f4fd6.tar.gz
eclipse.platform.releng.aggregator-e56d85e7eeec0fe885929c52f8a3da9bf47f4fd6.tar.xz
eclipse.platform.releng.aggregator-e56d85e7eeec0fe885929c52f8a3da9bf47f4fd6.zip
Bug 553757 - Migrate I-builds to new infra
- generate test results pages Change-Id: Icac2b4eb724343a9419a89b771e7a9912d1edede Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
Diffstat (limited to 'cje-production/scripts')
-rw-r--r--cje-production/scripts/genTestIndexes.xml142
1 files changed, 142 insertions, 0 deletions
diff --git a/cje-production/scripts/genTestIndexes.xml b/cje-production/scripts/genTestIndexes.xml
new file mode 100644
index 000000000..a3308367f
--- /dev/null
+++ b/cje-production/scripts/genTestIndexes.xml
@@ -0,0 +1,142 @@
+<project
+ name="Helper targets"
+ default="generateEclipseIndex"
+ basedir=".">
+
+ <target
+ name="init"
+ depends="initStreamVariables"
+ unless="genTestIndexesInitialized">
+ <fail unless="buildId" />
+ <fail unless="eclipseStream" />
+ <fail unless="job" />
+
+ <property
+ name="isBuildTested"
+ value="true" />
+
+ <script language="javascript">
+ <![CDATA[
+ var buildId = project.getProperty("buildId");
+ var pattern = new RegExp(/^([IMXYPNSRU])(\d{8})-(\d{4})$/);
+
+ var sArray = pattern.exec(buildId);
+ // sArray 0 is "whole match"
+ project.setProperty("buildType", sArray[1]);
+ ]]>
+ </script>
+ <property
+ name="dropsDirSegment"
+ value="drops4"/>
+ <!-- publish.xml expects buildLabel in places, instead of buildId,
+ though we use them interchangebly -->
+ <property
+ name="buildLabel"
+ value="${buildId}" />
+
+ <property
+ name="buildRoot"
+ value="/home/data/httpd/download.eclipse.org/eclipse/downloads" />
+
+ <property
+ name="postingDirectory"
+ value="${buildRoot}/${dropsDirSegment}" />
+
+ <property
+ name="publishingContent"
+ value="${workspace}/publishingFiles" />
+
+ <echo message="= = Properties in genTestIndexes.xml, init = = " />
+ <echo message=" job: ${job}" />
+ <echo message=" postingDirectory: ${postingDirectory}" />
+ <echo message=" isBuildTested: ${isBuildTested}" />
+
+ <!-- This is our new, "safe for every test" location -->
+ <property
+ name="base.builder"
+ value="${basebuilder}" />
+
+ <property
+ name="buildDirectory"
+ value="${postingDirectory}/${buildId}" />
+
+ <property
+ name="genTestIndexesInitialized"
+ value="true" />
+
+ </target>
+
+ <target
+ name="generateEclipseIndex"
+ depends="init">
+
+ <property
+ name="generatorClass"
+ value="org.eclipse.releng.generators.TestResultsGenerator" />
+
+ <echo message=" DEBUG: generatorClass: ${generatorClass}" />
+ <available
+ classname="${generatorClass}"
+ property="class"
+ value="${generatorClass}" />
+
+ <!-- These variables used to be defined here, but now are defined in
+ publish.xml generateIndex target based on $job
+ indexFileName
+ dropTemplateFileName
+ testManifestFileName
+ -->
+
+ <antcall target="publishEclipseIndex" />
+
+ </target>
+
+ <target
+ name="publishEclipseIndex"
+ depends="init">
+
+
+ <fail
+ unless="buildType"
+ message="buildType should have been defined by now" />
+
+ <!--regenerate the index page with links to test results -->
+ <ant
+ antfile="${workspace}/publish.xml"
+ dir="${publishingContent}"
+ target="generateIndex">
+
+ </ant>
+
+ </target>
+
+ <target name="initStreamVariables">
+
+ <fail
+ unless="eclipseStream"
+ message="eclipseStream must be provided by caller" />
+ <condition property="streamOK">
+ <matches
+ pattern="\d+\.\d+\.\d+"
+ string="${eclipseStream}" />
+ </condition>
+ <fail
+ message="eclipseStream variable had unexpected format. Should be digit.digit.digit, but was ${eclipseStream}"
+ unless="streamOK" />
+ <script language="javascript">
+ <![CDATA[
+ var eclipseStream = project.getProperty("eclipseStream");
+ var pattern = new
+ RegExp(/(\d+)\.(\d+)\.(\d+)/);
+
+ var sArray = pattern.exec(eclipseStream);
+ // sArray[0] is "whole match"
+ project.setProperty("eclipseStreamMajor", sArray[1]);
+ project.setProperty("eclipseStreamMinor", sArray[2]);
+ project.setProperty("eclipseStreamService", sArray[3]);
+ ]]>
+ </script>
+
+ </target>
+
+</project>

Back to the top