From cddf7c47847bd8c2ef0d00700b616abcae431de0 Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Fri, 23 Feb 2007 10:28:22 +0000
Subject: [PATCH] Issue 1076 store test logs per testcase

---
 opends/tests/functional-tests/testcases/runFuncTests.xml |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/opends/tests/functional-tests/testcases/runFuncTests.xml b/opends/tests/functional-tests/testcases/runFuncTests.xml
index 27aed7a..822401e 100755
--- a/opends/tests/functional-tests/testcases/runFuncTests.xml
+++ b/opends/tests/functional-tests/testcases/runFuncTests.xml
@@ -33,9 +33,7 @@
 
     <sequence>
 
-      <!--- Import all the shared libraries
-        may be we should have a loadlibs.xml to
-        load all the libs -->
+      <!--- Import all the shared xml libraries -->
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/utils.xml' % (TESTS_FUNCTIONS_DIR)" />
 
@@ -51,13 +49,27 @@
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/security.xml' % (TESTS_FUNCTIONS_DIR)" />
 
+      <!-- Load in any standard python libraries -->
+      <script>
+        import re
+        import posixpath
+        import sys
+      </script>
+
+      <!-- Load in any standard python functions -->
+      <script>
+        from time import localtime,strftime
+      </script> 
+
+      <!-- Resolve any OS related variables -->           
       <call function="'setOSvariables'">
         { 'hostname' : STAF_REMOTE_HOSTNAME }
       </call>
 
+      <!-- XXXX this needs some cleanup XXXX -->
       <script>
-        import re
         STAXLogMessage = 1 
+        LogDir='%s' % TMPDIR
         SRCFILE = '%s/%s' % (ZIPPATH,ZIPNAME) 
         DSTFILE = '%s/%s' % (TMPDIR,ZIPNAME) 
         OPENDS_BINPATH = '%s/%s/bin' % (DIRECTORY_INSTANCE_DIR,OPENDSNAME) 
@@ -69,7 +81,18 @@
         else:
           fileExt=''
       </script>
+      
+      <!-- Load in the local shared python objects from libraries -->
+      <script>
+        sys.path.append("%s/python" % TESTS_SHARED_DIR )
+        from common import *
+      </script>     
 
+      <!-- Initialize any global variables -->
+      <script>
+        CurrentTestPath={}
+      </script>
+        
       <!--- The Functional Tests -->
       <import machine="'%s' % (STAF_LOCAL_HOSTNAME)"
         file="'%s/testcases/setup/setup.xml' % (TESTS_DIR)" />

--
Gitblit v1.10.0