From 9260a93cd531d57f86942eb5193e690b9695feec Mon Sep 17 00:00:00 2001
From: al_xipe <al_xipe@localhost>
Date: Fri, 13 Jul 2007 12:49:00 +0000
Subject: [PATCH] Added the facility to pick up interactively selected test suites

---
 opends/tests/functional-tests/testcases/runFuncTests.xml |   48 +++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/opends/tests/functional-tests/testcases/runFuncTests.xml b/opends/tests/functional-tests/testcases/runFuncTests.xml
index 4b2c81f..ac7ddb8 100755
--- a/opends/tests/functional-tests/testcases/runFuncTests.xml
+++ b/opends/tests/functional-tests/testcases/runFuncTests.xml
@@ -41,42 +41,84 @@
       <!-- The Functional Tests -->
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/security/security.xml' % (TESTS_DIR)" />
+      <!--
       <call function="'main_security'" />
+      -->
 
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/aci/aci.xml' % (TESTS_DIR)" />
+      <!--
       <call function="'main_aci'" />
+      -->
 
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/privileges/privileges.xml' % (TESTS_DIR)" />
+      <!--
       <call function="'main_privileges'" />
+      -->
 
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/backends/backends.xml' % (TESTS_DIR)" />
+      <!--
       <call function="'main_backends'" />
+      -->
 
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/core/core.xml' % (TESTS_DIR)" />
+      <!--
       <call function="'main_core'" />
+      -->
 
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/schema/schema.xml' % (TESTS_DIR)" />
+      <!--
       <call function="'main_schema'" />
+      -->
 
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/replication/replication.xml' % (TESTS_DIR)" />
+      <!--
       <call function="'main_replication'" />					
+      -->
 
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/indexes/indexes.xml' % (TESTS_DIR)" />
+      <!--
       <call function="'indexes'" />
+      -->
 
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/groups/groups.xml' % (TESTS_DIR)" />
-      <call function="'main_groups'" />					
+      <!--
+      <call function="'main_groups'" />
+      -->
+      <script>
+        class functionToRun:
+          def __init__(self, name):
+            self.name = name
+          
+          def getName(self):
+            return self.name
+          
+          
+        suitesFileName='%s/testcases/run-custom-suites.dat' % TESTS_DIR
+        
+        if not os.path.exists(suitesFileName):
+          suitesFileName='%s/testcases/run-default-suites.dat' % TESTS_DIR
+          
+        f = open(suitesFileName, 'r')
+        functionsToRun = []
+        for line in f.readlines():
+          functionsToRun.append(functionToRun(line.rstrip()))
+        f.close()
+      </script>
+      <iterate var="function" in="functionsToRun">
+        <sequence>
+          <message>'calling function [%s]' % function.getName()</message>
+          <call function="'%s' % function.getName()" />
+        </sequence>
+      </iterate>
 
-  
-      
     </sequence>
   </function>
 </stax>

--
Gitblit v1.10.0