db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1616112 - in /db/derby/code/trunk: build.xml tools/ant/xsl/sysinfo_junitreport.xsl
Date Wed, 06 Aug 2014 06:52:45 GMT
Author: kahatlen
Date: Wed Aug  6 06:52:45 2014
New Revision: 1616112

URL: http://svn.apache.org/r1616112
Log:
DERBY-2234: ant junitreport gives fatal error during transformation

Use Ant's replace functionality to insert the sysinfo link into
overview-frame.html, instead of using an XSLT script. The XSLT script
only works if overview-frame.html is a valid XML document, which is
not the case without some massaging.

Removed:
    db/derby/code/trunk/tools/ant/xsl/sysinfo_junitreport.xsl
Modified:
    db/derby/code/trunk/build.xml

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=1616112&r1=1616111&r2=1616112&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Wed Aug  6 06:52:45 2014
@@ -2740,19 +2740,20 @@
       <report format="frames" todir="junit_${derby.junit.timestamp}"/>
     </junitreport>
 
-    <!-- fix up unterminated elements in overview-frame.html -->
-    <replace token="href=&quot;stylesheet.css&quot;&gt;"
-             value="href=&quot;stylesheet.css&quot;/&gt;&lt;/META&gt;"
-             file="junit_${derby.junit.timestamp}/overview-frame.html"/>
     <replace token="Unit Test Results"
              value="Apache Derby Test Results - ${derby.junit.standardtime}&lt;br&gt;JVM:
${java.vm.vendor} ${java.vm.version}"
              file="junit_${derby.junit.timestamp}/overview-summary.html"/>
 
-    <xslt style="${basedir}/tools/ant/xsl/sysinfo_junitreport.xsl"
-          in="junit_${derby.junit.timestamp}/overview-frame.html"
-          out="junit_${derby.junit.timestamp}/overview-frame2.html"/>
-    <move file="junit_${derby.junit.timestamp}/overview-frame2.html"
-          tofile="junit_${derby.junit.timestamp}/overview-frame.html"/>
+    <!--
+        Insert a link to sysinfo.txt after the first h2 element in
+        overview-frame.html. (We use the replaceregexp task instead of
+        the replace task since we want to replace the first occurrence
+        only. The replace task replaces all occurrences.)
+    -->
+    <replaceregexp
+        match="&lt;/h2&gt;"
+        replace="&lt;/h2&gt;&lt;h2&gt;&lt;a href=&quot;sysinfo.txt&quot;
target=&quot;classFrame&quot;&gt;sysinfo&lt;/a&gt;&lt;/h2&gt;"
+        file="junit_${derby.junit.timestamp}/overview-frame.html"/>
   	
   	<fail if="tests.failed">Tests Failed!</fail>
   </target>



Mime
View raw message