From 6e9b9e2a522a66edcf27e64a0de4d9ebb6b99f88 Mon Sep 17 00:00:00 2001
From: andrug <andrug@localhost>
Date: Thu, 12 Jun 2008 15:52:54 +0000
Subject: [PATCH] QA:System Test: add comments.txt file into the report

---
 opends/tests/system-tests/report/result.xsl  |   18 ++++++++++++++++--
 opends/tests/system-tests/phases/log/log.xml |   18 +++++++++++++++++-
 2 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/opends/tests/system-tests/phases/log/log.xml b/opends/tests/system-tests/phases/log/log.xml
index 171534a..ce4dc6d 100755
--- a/opends/tests/system-tests/phases/log/log.xml
+++ b/opends/tests/system-tests/phases/log/log.xml
@@ -144,7 +144,23 @@
         writeSummaryTag(PHASE_POST_CONFIGURATION)
         writeSummaryTag(PHASE_SCHEDULER)
         writeSummaryTag(PHASE_VERDICT)
-        
+      </script>
+      <!-- write link to comments.txt file -->
+      <script>
+        commentsFile  = 'comments.txt'
+        commentsFilePath = '%s/%s' % (LOG_DIR,commentsFile)
+        commentsFileFd = open(commentsFilePath,'w')
+        commentsFileFd.write('Additional comments...\n')
+        commentsFileFd.close()
+      </script>
+      <call function="'writeMessage'">
+      { 
+        'content' : 'Additional comments : %s' % commentsFile,
+        'xlink'   : commentsFile,
+        'fileFd'  : fileFd
+      }
+      </call>
+      <script>
         fileFd.write('&lt;/summary&gt;\n')
       </script>
     </sequence>
diff --git a/opends/tests/system-tests/report/result.xsl b/opends/tests/system-tests/report/result.xsl
index 8dd6ead..ca7efec 100755
--- a/opends/tests/system-tests/report/result.xsl
+++ b/opends/tests/system-tests/report/result.xsl
@@ -164,10 +164,24 @@
     
     <table id="summaryTable">
       <xsl:apply-templates select="phaseSummmary" />
+      <xsl:apply-templates select="message" />
     </table>
   </p>
- </xsl:template>
- 
+</xsl:template>
+
+<!-- ============= message node =============== -->
+<xsl:template match="message">
+  <xsl:choose>
+    <xsl:when test="@xlink:href">
+      <a href="{@xlink:href}"><xsl:value-of select="." /></a>
+    </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="." />
+      </xsl:otherwise>
+    </xsl:choose>
+   <br/>
+</xsl:template>
+
 <!-- ================= Display scenario informations ============ -->
 <xsl:template match="scenario">
   <b>Scenario name</b> : <xsl:value-of select="normalize-space(@name)"/> <br/>

--
Gitblit v1.10.0