From 5861e9b0985ca78c29e82e0875aaf7a466fee1d9 Mon Sep 17 00:00:00 2001
From: Christophe Sovant <christophe.sovant@forgerock.com>
Date: Tue, 17 Mar 2009 15:45:42 +0000
Subject: [PATCH] Move xsl files to "shared/xsl" folder

---
 opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl                |   37 ++++++
 opendj-sdk/opends/tests/staf-tests/shared/xsl/functestspec-stylesheet.xml          |    0 
 opendj-sdk/opends/tests/staf-tests/shared/xsl/testspec-index-stylesheet.xsl        |    0 
 opendj-sdk/opends/tests/staf-tests/shared/python/common.py                         |    4 
 opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl              |   34 ++++++
 opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml                     |   20 ++--
 opendj-sdk/opends/tests/staf-tests/shared/tests/runTests.xml                       |    6 
 opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl                |   38 ++++++
 opendj-sdk/opends/tests/staf-tests/shared/xsl/testspec-stylesheet.xsl              |    0 
 opendj-sdk/opends/tests/staf-tests/shared/ant/tests.xml                            |    2 
 opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml                      |    2 
 opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-text-summary.xsl                 |   22 +++
 opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml                |    2 
 opendj-sdk/opends/tests/staf-tests/shared/xsl/functestspec-stylesheet_security.xml |    0 
 opendj-sdk/opends/tests/staf-tests/shared/xsl/id.xsl                               |   35 ++++++
 opendj-sdk/opends/tests/staf-tests/shared/xsl/my-report.xsl                        |    0 
 opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs                    |    4 
 opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl                 |   37 ++++++
 opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-logs.xsl                         |    0 
 19 files changed, 204 insertions(+), 39 deletions(-)

diff --git a/opendj-sdk/opends/tests/staf-tests/shared/ant/tests.xml b/opendj-sdk/opends/tests/staf-tests/shared/ant/tests.xml
index 0577379..901da8d 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/ant/tests.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/ant/tests.xml
@@ -67,7 +67,7 @@
          separator by a forward slash. Staf otherwise fails to find the files. -->
     <replace file="${tests.run.dir}/${tests.run.time}/config/${tests.config.file}" token="\" value="/"/>
 
-    <property name="tests.request" value="EXECUTE FILE ${tests.xml} JOBNAME OpenDS_Functional_Tests SCRIPTFILE ${tests.run.dir}/${tests.run.time}/config/${tests.config.file} WAIT CLEARLOGS"/>
+    <property name="tests.request" value="EXECUTE FILE ${tests.xml} JOBNAME OpenDS_${tests.type} SCRIPTFILE ${tests.run.dir}/${tests.run.time}/config/${tests.config.file} WAIT CLEARLOGS"/>
 
     <echo>While the tests are running you may tail the job logs at</echo>
     <echo>${staf.install.dir}/logs/MACHINE/${host.name}</echo>
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml b/opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml
index 197e16e..a7a08b3 100755
--- a/opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/functions/environment.xml
@@ -312,7 +312,7 @@
     
       <script>
         logs   = test_env.logs(localDir)
-        source = test_env.source(sourceDir)
+        source = test_env.source(sourceDir,TESTS_TYPE)
         local  = test_env.data(localDir)
         remote = test_env.data(remoteDir)                
       </script>
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
index 7188643..b7253ff 100755
--- a/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/functions/utils.xml
@@ -1275,7 +1275,7 @@
       <script>
         xmlFile   = '%s-log.xml' % logFile
         htmlFile  = '%s-log.html' % logFile
-        xslFile   = '%s/xsl/gen-logs.xsl' % TESTS_SHARED_DIR
+        xslFile   = '%s/gen-logs.xsl' % TESTS_XSL_DIR
       </script>
         
       <!-- Query STAF to obtain the logs for the test case -->
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/python/common.py b/opendj-sdk/opends/tests/staf-tests/shared/python/common.py
index 5fd0ff0..84ed7a1 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/python/common.py
+++ b/opendj-sdk/opends/tests/staf-tests/shared/python/common.py
@@ -476,9 +476,9 @@
 
   class source:
     'Container to hold source data instance objects'
-    def __init__(self,dir):
+    def __init__(self,dir,tests_type):
       self.directory=dir
-      self.data='%s/functional-tests/shared/data' % dir
+      self.data='%s/%s/shared/data' % (dir,tests_type)
       self.common='%s/shared' % dir
       self.java='%s/java' % self.common
 
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs b/opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs
index cacee53..7995b3f 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs
+++ b/opendj-sdk/opends/tests/staf-tests/shared/tests/config.py.stubs
@@ -33,12 +33,14 @@
 OPENDSNAME                  = '${product.name}'
 ZIPNAME                     = '${product.name}.zip'
 ZIPPATH                     = '${opends.dir}'
+TESTS_TYPE                  = '${tests.type}'
 TESTS_ROOT                  = '%s/tests/staf-tests' % OPENDSDIR
-TESTS_DIR                   = '%s/functional-tests' % TESTS_ROOT
+TESTS_DIR                   = '%s/%s' % (TESTS_ROOT, TESTS_TYPE)
 TESTS_SHARED_DIR            = '%s/shared' % TESTS_DIR
 TESTS_FUNCTIONS_DIR         = '%s/shared/functions' % TESTS_ROOT
 TESTS_JAVA_DIR              = '%s/shared/java' % TESTS_ROOT
 TESTS_TOPOLOGY_DIR          = '%s/shared/topology' % TESTS_ROOT
+TESTS_XSL_DIR               = '%s/shared/xsl' % TESTS_ROOT
 DIRECTORY_INSTANCE_DN       = '${opends.admin.dn}'
 DIRECTORY_INSTANCE_PSWD     = '${opends.admin.pwd}'
 DIRECTORY_INSTANCE_BIN      = '%s' % TMPDIR
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml b/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
index eda5364..3aa9856 100644
--- a/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/tests/runTestJob.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE stax SYSTEM "../stax.dtd">
+<!DOCTYPE stax SYSTEM "../../shared/stax.dtd">
 <!--
  ! CDDL HEADER START
  !
@@ -484,7 +484,7 @@
         doc.appendChild(qa)
         
         # Create the functional-tests element
-        ft = doc.createElement("functional-tests")
+        ft = doc.createElement("%s" % TESTS_TYPE)
         qa.appendChild(ft)
         
         # Create the identification element
@@ -712,7 +712,7 @@
       <!-- Generate the standard test report showing all testcases -->
       <script>
         _message='Generated standard test report.'
-        xslfile= '%s/xsl/gen-alltests-report.xsl' % TESTS_SHARED_DIR
+        xslfile= '%s/gen-alltests-report.xsl' % TESTS_XSL_DIR
         htmlfile= '%s/results.html' % logsReportDir
 
         standardReport=report_generation()
@@ -733,7 +733,7 @@
       <!-- Generate the test report by test groups-->
       <script>
         _message='Generated groups test report.'
-        xslfile= '%s/xsl/gen-groups-report.xsl' % TESTS_SHARED_DIR
+        xslfile= '%s/gen-groups-report.xsl' % TESTS_XSL_DIR
         htmlfile= '%s/groups.html' % logsReportDir
         testslog= '%s/tests-log.xml' % logsTestsDir
         groupsReport=report_generation()
@@ -763,7 +763,7 @@
 
             xmlfile='%s/results.xml' % logsReportDir
             htmlfile='%s/%s.html' % (groupDir,testGroupName)
-            xslfile= '%s/xsl/gen-suites-report.xsl' % TESTS_SHARED_DIR
+            xslfile= '%s/gen-suites-report.xsl' % TESTS_XSL_DIR
 
             suitesReport=report_generation()
             stringParamsDict={ 'group' : testGroupName }
@@ -796,7 +796,7 @@
             testSuiteFilesList=glob.glob('%s/*.xml' % groupDir)
 
             xmlfile='%s/results.xml' % logsReportDir
-            xslfile= '%s/xsl/gen-tests-report.xsl' % TESTS_SHARED_DIR
+            xslfile= '%s/gen-tests-report.xsl' % TESTS_XSL_DIR
 
             for testSuiteFile in testSuiteFilesList:
 
@@ -826,11 +826,11 @@
                   _message='Unable to generate test case report %s !!!' % groupDir
       </script>
       <message>_message</message>
-
+      
       <!-- Generate the product identification report -->
        <script>
-        _message='Generated product identification test report.'
-        xslfile= '%s/xsl/id.xsl' % TESTS_SHARED_DIR
+        _message='Generated product identification test report.' 
+        xslfile= '%s/id.xsl' % TESTS_XSL_DIR
         htmlfile= '%s/id.html' % logsReportDir
 
         idReport=report_generation()
@@ -851,7 +851,7 @@
       <!-- Generate the summary text file -->
       <script>
         _message='Generated the summary text report'
-        mysummaryxsl='%s/xsl/gen-text-summary.xsl' % TESTS_SHARED_DIR
+        mysummaryxsl='%s/gen-text-summary.xsl' % TESTS_XSL_DIR
         mysummarytext='%s/summary.txt' % logsReportDir
         mysummaryxml=xmlfile
 
diff --git a/opendj-sdk/opends/tests/staf-tests/shared/tests/runTests.xml b/opendj-sdk/opends/tests/staf-tests/shared/tests/runTests.xml
index 5c355e5..22ae990 100755
--- a/opendj-sdk/opends/tests/staf-tests/shared/tests/runTests.xml
+++ b/opendj-sdk/opends/tests/staf-tests/shared/tests/runTests.xml
@@ -23,7 +23,7 @@
  !
  ! CDDL HEADER END
  !
- !      Copyright 2006-2008 Sun Microsystems, Inc.
+ !      Copyright 2006-2009 Sun Microsystems, Inc.
  ! -->
 <stax>
   <defaultcall function="main" />
@@ -48,7 +48,7 @@
 
         testlog=open('%s/tests-log.xml' % logs.tests,'w')
         testlog.write('&lt;qa&gt;\n')
-        testlog.write('  &lt;functional-tests&gt;\n')
+        testlog.write('  &lt;%s&gt;\n' % TESTS_TYPE)
         testlog.write('    &lt;results&gt;\n')
         testlog.close()
 
@@ -311,7 +311,7 @@
         testlog.write('        %s\n' % logs.directory)
         testlog.write('      &lt;/tests-dir&gt;\n')
         testlog.write('    &lt;/identification&gt;\n')
-        testlog.write('  &lt;/functional-tests&gt;\n')
+        testlog.write('  &lt;/%s&gt;\n' % TESTS_TYPE)
         testlog.write('&lt;/qa&gt;\n')
         testlog.close()
       </script>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/functestspec-stylesheet.xml b/opendj-sdk/opends/tests/staf-tests/shared/xsl/functestspec-stylesheet.xml
similarity index 100%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/functestspec-stylesheet.xml
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/functestspec-stylesheet.xml
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/functestspec-stylesheet_security.xml b/opendj-sdk/opends/tests/staf-tests/shared/xsl/functestspec-stylesheet_security.xml
similarity index 100%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/functestspec-stylesheet_security.xml
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/functestspec-stylesheet_security.xml
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-alltests-report.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl
similarity index 92%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-alltests-report.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl
index 076e1cb..531d6b0 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-alltests-report.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-alltests-report.xsl
@@ -28,14 +28,36 @@
  ! -->
 
 <xsl:template match="/">
+  <xsl:apply-templates select="qa"/>
+</xsl:template>
 
+<xsl:template match="qa">
+  <xsl:apply-templates select="stress-tests"/>
+  <xsl:apply-templates select="functional-tests"/>
+</xsl:template>
+
+<xsl:template match="stress-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Stress Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="functional-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Functional Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="main">
+  <xsl:param name="tests-type"/>
+  
   <!--- Test Report Header Variables -->
-  <xsl:variable name="id"           select="qa/functional-tests/identification"/>
+  <xsl:variable name="id"           select="identification"/>
   <xsl:variable name="sut"          select="$id/sut"/>
   <xsl:variable name="version"      select="$sut/version"/>
   <xsl:variable name="buildid"      select="$sut/buildid"/>
   <xsl:variable name="revision"     select="$sut/revision"/>
-  <xsl:variable name="testcase"     select="qa/functional-tests/results/testgroup/testsuite/testcase"/>
+  <xsl:variable name="testcase"     select="results/testgroup/testsuite/testcase"/>
   <xsl:variable name="total-tests"  select="count($testcase)"/>
   <xsl:variable name="pass-tests"   select="count($testcase[@result='pass'])"/>
   <xsl:variable name="fail-tests"   select="count($testcase[@result='fail'])"/>
@@ -60,6 +82,14 @@
     </xsl:element>
   
   </xsl:element>
+
+  <table class="tertmasttable" width="100%" cellspacing="0">
+    <tbody>
+      <tr>
+        <td align="center"><div class="collectionheader"><xsl:value-of select="$tests-type"/></div></td>
+      </tr>
+    </tbody>
+  </table>
   
   <table class="tertmasttable" width="100%" cellspacing="0">
     <tbody>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-groups-report.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl
similarity index 95%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-groups-report.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl
index 0f944d5..93017fd 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-groups-report.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-groups-report.xsl
@@ -30,10 +30,31 @@
 <xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
 
 <xsl:template match="/">
+  <xsl:apply-templates select="qa"/>
+</xsl:template>
+
+<xsl:template match="qa">
+  <xsl:apply-templates select="stress-tests"/>
+  <xsl:apply-templates select="functional-tests"/>
+</xsl:template>
+
+<xsl:template match="stress-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Stress Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="functional-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Functional Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="main">
+  <xsl:param name="tests-type"/>
   
   <!-- Test Groups Report Header Variables -->
-  <xsl:variable name="ft"             select="qa/functional-tests"/>
-  <xsl:variable name="id"             select="$ft/identification"/>
+  <xsl:variable name="id"             select="identification"/>
   <xsl:variable name="sut"            select="$id/sut"/>
   <xsl:variable name="testware"       select="$id/testware"/>
   <xsl:variable name="mailto"         select="normalize-space($id/mailto)"/>
@@ -45,7 +66,7 @@
   <xsl:variable name="revision"       select="normalize-space($sut/revision)"/>
   <xsl:variable name="os"             select="normalize-space($sut/os-label)"/>
   <xsl:variable name="jvm"            select="normalize-space($sut/jvm-label)"/>
-  <xsl:variable name="testgroup"      select="$ft/results/testgroup"/>
+  <xsl:variable name="testgroup"      select="results/testgroup"/>
   <xsl:variable name="testsuite"      select="$testgroup/testsuite"/>
   <xsl:variable name="testcase"       select="$testsuite/testcase"/>
   <xsl:variable name="total-tests"    select="count($testcase)"/>
@@ -73,7 +94,15 @@
     </xsl:element>
   
   </xsl:element>
-  
+
+  <table class="tertmasttable" width="100%" cellspacing="0">
+    <tbody>
+      <tr>
+        <td align="center"><div class="collectionheader"><xsl:value-of select="$tests-type"/></div></td>
+      </tr>
+    </tbody>
+  </table>
+
   <table class="tertmasttable" width="100%" cellspacing="0">
     <tbody>
       <tr>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-logs.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-logs.xsl
similarity index 100%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-logs.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-logs.xsl
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-suites-report.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl
similarity index 94%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-suites-report.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl
index d0f393b..a4453bc 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-suites-report.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-suites-report.xsl
@@ -34,10 +34,32 @@
 <xsl:variable name="groupdir" select="translate($group, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
 
 <xsl:template match="/">
-    
+  <xsl:apply-templates select="qa"/>
+</xsl:template>
+
+<xsl:template match="qa">
+  <xsl:apply-templates select="stress-tests"/>
+  <xsl:apply-templates select="functional-tests"/>
+</xsl:template>
+
+<xsl:template match="stress-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Stress Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="functional-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Functional Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="main">
+  <xsl:param name="tests-type"/>
+
   <!--- Test Suites Report Header Variables -->
-  <xsl:variable name="ft"             select="qa/functional-tests"/>
-  <xsl:variable name="id"             select="$ft/identification"/>
+  <xsl:variable name="ft"             select="qa/$tests-type"/>
+  <xsl:variable name="id"             select="identification"/>
   <xsl:variable name="sut"            select="$id/sut"/>
   <xsl:variable name="mailto"         select="normalize-space($id/mailto)"/>
   <xsl:variable name="tests-dir"      select="normalize-space($id/tests-dir)"/>
@@ -48,7 +70,7 @@
   <xsl:variable name="revision"       select="normalize-space($sut/revision)"/>
   <xsl:variable name="os"             select="normalize-space($sut/os-label)"/>
   <xsl:variable name="jvm"            select="normalize-space($sut/jvm-label)"/>
-  <xsl:variable name="testgroup"      select="$ft/results/testgroup[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = $groupdir]"/>
+  <xsl:variable name="testgroup"      select="results/testgroup[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = $groupdir]"/>
   <xsl:variable name="testsuite"      select="$testgroup/testsuite"/>
   <xsl:variable name="testcase"       select="$testsuite/testcase"/>
   <xsl:variable name="total-tests"    select="count($testcase)"/>
@@ -76,6 +98,14 @@
     </xsl:element>
   
   </xsl:element>
+
+  <table class="tertmasttable" width="100%" cellspacing="0">
+    <tbody>
+      <tr>
+        <td align="center"><div class="collectionheader"><xsl:value-of select="$tests-type"/></div></td>
+      </tr>
+    </tbody>
+  </table>
   
   <table class="tertmasttable" width="100%" cellspacing="0">
     <tbody>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-tests-report.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
similarity index 94%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-tests-report.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
index ff73760..4c06769 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-tests-report.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-tests-report.xsl
@@ -35,10 +35,31 @@
 <xsl:variable name="groupdir" select="translate($group, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
 
 <xsl:template match="/">
-    
+  <xsl:apply-templates select="qa"/>
+</xsl:template>
+
+<xsl:template match="qa">
+  <xsl:apply-templates select="stress-tests"/>
+  <xsl:apply-templates select="functional-tests"/>
+</xsl:template>
+
+<xsl:template match="stress-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Stress Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="functional-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Functional Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="main">
+  <xsl:param name="tests-type"/>
+  
   <!--- Test Report Header Variables -->
-  <xsl:variable name="ft"             select="qa/functional-tests"/>
-  <xsl:variable name="id"             select="$ft/identification"/>
+  <xsl:variable name="id"             select="identification"/>
   <xsl:variable name="sut"            select="$id/sut"/>
   <xsl:variable name="mailto"         select="normalize-space($id/mailto)"/>
   <xsl:variable name="tests-dir"      select="normalize-space($id/tests-dir)"/>
@@ -49,7 +70,7 @@
   <xsl:variable name="revision"       select="normalize-space($sut/revision)"/>
   <xsl:variable name="os"             select="normalize-space($sut/os-label)"/>
   <xsl:variable name="jvm"            select="normalize-space($sut/jvm-label)"/>
-  <xsl:variable name="testgroup"      select="$ft/results/testgroup[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = $groupdir]"/>
+  <xsl:variable name="testgroup"      select="results/testgroup[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz') = $groupdir]"/>
   <xsl:variable name="testsuite"      select="$testgroup/testsuite"/>
   <xsl:variable name="testcase"       select="$testsuite/testcase"/>
   <xsl:variable name="count-tests"    select="count($testcase)"/>
@@ -113,6 +134,14 @@
   <table class="tertmasttable" width="100%" cellspacing="0">
     <tbody>
       <tr>
+        <td align="center"><div class="collectionheader"><xsl:value-of select="$tests-type"/></div></td>
+      </tr>
+    </tbody>
+  </table>
+
+  <table class="tertmasttable" width="100%" cellspacing="0">
+    <tbody>
+      <tr>
         <td><div class="collectionheader"><xsl:value-of select="concat('Test Case Report for OpenDS ',$version)"/></div></td>
         <td width="10%"><a href="https://opends.dev.java.net/"><img src="https://opends.dev.java.net/public/images/opends_logo_sm.png" alt="OpenDS Logo" width="104" height="33" border="0" align="middle" /></a> </td>
       </tr>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-text-summary.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-text-summary.xsl
similarity index 85%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-text-summary.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-text-summary.xsl
index 95b2f5c..1d1d20f 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/gen-text-summary.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/shared/xsl/gen-text-summary.xsl
@@ -30,15 +30,31 @@
 <xsl:output method="text"/>
 
 <xsl:template match="/">
+  <xsl:apply-templates select="qa"/>
+</xsl:template>
+
+<xsl:template match="qa">
+  <xsl:apply-templates select="stress-tests"/>
+  <xsl:apply-templates select="functional-tests"/>
+</xsl:template>
+
+<xsl:template match="stress-tests">
+  <xsl:call-template name="main"/>
+</xsl:template>
+
+<xsl:template match="functional-tests">
+  <xsl:call-template name="main"/>
+</xsl:template>
+
+<xsl:template name="main">
 
   <!-- Test Report Header -->
-  <xsl:variable name="ft"               select="qa/functional-tests"/>
-  <xsl:variable name="id"               select="$ft/identification"/>
+  <xsl:variable name="id"               select="identification"/>
   <xsl:variable name="sut"              select="$id/sut"/>
   <xsl:value-of select="concat('tests-dir: ', normalize-space($id/tests-dir),'&#xa;')"/>
 
   <!-- Test Case Totals -->
-  <xsl:variable name="testcase"     select="$ft/results/testgroup/testsuite/testcase"/>
+  <xsl:variable name="testcase"     select="results/testgroup/testsuite/testcase"/>
   <xsl:variable name="total"  select="count($testcase)"/>
   <xsl:variable name="pass"   select="count($testcase[@result='pass'])"/>
   <xsl:variable name="fail"   select="count($testcase[@result='fail'])"/>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/id.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/id.xsl
similarity index 96%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/id.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/id.xsl
index cdf3791..16f610f 100644
--- a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/id.xsl
+++ b/opendj-sdk/opends/tests/staf-tests/shared/xsl/id.xsl
@@ -30,10 +30,31 @@
 <xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
 
 <xsl:template match="/">
+  <xsl:apply-templates select="qa"/>
+</xsl:template>
 
+<xsl:template match="qa">
+  <xsl:apply-templates select="stress-tests"/>
+  <xsl:apply-templates select="functional-tests"/>
+</xsl:template>
+
+<xsl:template match="stress-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Stress Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="functional-tests">
+  <xsl:call-template name="main">
+    <xsl:with-param name="tests-type" select="normalize-space('Functional Tests')"/>
+  </xsl:call-template>
+</xsl:template>
+
+<xsl:template name="main">
+  <xsl:param name="tests-type"/>
+  
   <!-- Test Report Header Variables -->
-  <xsl:variable name="ft"             select="qa/functional-tests"/>
-  <xsl:variable name="id"             select="$ft/identification"/>
+  <xsl:variable name="id"             select="identification"/>
   <xsl:variable name="sut"            select="$id/sut"/>
   <xsl:variable name="testware"       select="$id/testware"/>
   <xsl:variable name="url"            select="normalize-space($id/tests-url)"/>
@@ -60,7 +81,15 @@
     </xsl:element>
   
   </xsl:element>
-  
+
+  <table class="tertmasttable" width="100%" cellspacing="0">
+    <tbody>
+      <tr>
+        <td align="center"><div class="collectionheader"><xsl:value-of select="$tests-type"/></div></td>
+      </tr>
+    </tbody>
+  </table>
+
   <table class="tertmasttable" width="100%" cellspacing="0">
     <tbody>
       <tr>
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/my-report.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/my-report.xsl
similarity index 100%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/my-report.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/my-report.xsl
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/testspec-index-stylesheet.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/testspec-index-stylesheet.xsl
similarity index 100%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/testspec-index-stylesheet.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/testspec-index-stylesheet.xsl
diff --git a/opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/testspec-stylesheet.xsl b/opendj-sdk/opends/tests/staf-tests/shared/xsl/testspec-stylesheet.xsl
similarity index 100%
rename from opendj-sdk/opends/tests/staf-tests/functional-tests/shared/xsl/testspec-stylesheet.xsl
rename to opendj-sdk/opends/tests/staf-tests/shared/xsl/testspec-stylesheet.xsl

--
Gitblit v1.10.0