From ccb383c5308f88916e6946ef9479cedef8d98481 Mon Sep 17 00:00:00 2001
From: gary_williams <gary_williams@localhost>
Date: Tue, 04 Aug 2009 10:14:21 +0000
Subject: [PATCH] refactoring to use different backend types
---
opends/tests/staf-tests/functional-tests/testcases/logging/logging.xml | 96 ++++++++++++++++++++++++++++++++++--------------
1 files changed, 68 insertions(+), 28 deletions(-)
diff --git a/opends/tests/staf-tests/functional-tests/testcases/logging/logging.xml b/opends/tests/staf-tests/functional-tests/testcases/logging/logging.xml
index 47da17c..3328971 100755
--- a/opends/tests/staf-tests/functional-tests/testcases/logging/logging.xml
+++ b/opends/tests/staf-tests/functional-tests/testcases/logging/logging.xml
@@ -23,7 +23,7 @@
!
! CDDL HEADER END
!
- ! Copyright 2007-2008 Sun Microsystems, Inc.
+ ! Copyright 2007-2009 Sun Microsystems, Inc.
! -->
<!--
@@ -31,38 +31,78 @@
#@TestGroupName Logging
#@TestGroupPurpose Test the ability of the server to log information in the appropriated log files
-->
-
-
<stax>
- <defaultcall function="main_logging"/>
+ <defaultcall function="main_logging" />
<function name="main_logging">
<function-list-args>
<function-required-arg name="STAXParentID"/>
</function-list-args>
+
<sequence>
- <block name="'logging'">
- <sequence>
- <!--- Load the job environment for the test group execution -->
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
- <call function="'loadJobEnvironment'">
- { 'parent' : STAXParentID }
- </call>
- <script>
- CurrentTestPath['group']='logging'
- </script>
- <call function="'testGroup_Preamble'" />
- <!-- 'setup','rotation','retention','writer','properties','retention_properties','rotation_properties','cleanup'-->
- <iterate var="_test" in="['setup','rotation','retention','writer','properties','retention_properties','rotation_properties','cleanup']" >
- <sequence>
- <import machine="STAF_LOCAL_HOSTNAME"
- file="'%s/testcases/logging/logging_%s.xml' % (TESTS_DIR,_test)"/>
- <call function="'logging_%s' % _test" />
- </sequence>
- </iterate>
- <call function="'testGroup_Postamble'" />
- </sequence>
- </block>
+ <try>
+ <block name="'logging'">
+ <sequence>
+ <!--- Load the job environment for the test group execution -->
+ <import machine="STAF_LOCAL_HOSTNAME"
+ file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
+ <call function="'loadJobEnvironment'">
+ { 'parent' : STAXParentID }
+ </call>
+ <script>
+ CurrentTestPath['group']='logging'
+ _group=CurrentTestPath['group']
+ </script>
+ <call function="'testGroup_Preamble'" />
+ <script>
+ suiteList = []
+ suiteList.append('rotation')
+ suiteList.append('retention')
+ suiteList.append('writer')
+ suiteList.append('properties')
+ suiteList.append('retention_properties')
+ suiteList.append('rotation_properties')
+ </script>
+
+ <!-- Run the test suites -->
+ <iterate var="_suite" in="suiteList">
+ <sequence>
+ <try>
+ <sequence>
+ <import machine="STAF_LOCAL_HOSTNAME"
+ file="'%s/testcases/%s/%s_%s.xml' % (TESTS_DIR,_group,_group,_suite)"/>
+ <call function="'%s_%s' % (_group,_suite)" />
+ </sequence>
+ <catch exception="'STAFException.TestSuite.SetupException'">
+ <sequence>
+ <message log="1" level="'fatal'">'Setup of test suite %s failed.' % _suite</message>
+ </sequence>
+ </catch>
+ <catch exception="'STAFException.TestSuite.MainException'">
+ <sequence>
+ <message log="1" level="'fatal'">'Main part of test suite %s failed.' % _suite</message>
+ </sequence>
+ </catch>
+ <catch exception="'STAFException.TestSuite.CleanupException'">
+ <sequence>
+ <message log="1" level="'fatal'">'Cleanup of test suite %s failed.' % _suite</message>
+ </sequence>
+ </catch>
+ </try>
+ </sequence>
+ </iterate>
+
+ </sequence>
+ </block>
+ <catch exception="'STAXException.TestGroupException'">
+ <sequence>
+ <message log="1" level="'fatal'">'Execution of Test Group Failed'</message>
+ </sequence>
+ </catch>
+ <finally>
+ <!-- Test Group postamble -->
+ <call function="'testGroup_Postamble'"/>
+ </finally>
+ </try>
</sequence>
</function>
-</stax>
+</stax>
\ No newline at end of file
--
Gitblit v1.10.0