mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

gary_williams
04.14.2009 ccb383c5308f88916e6946ef9479cedef8d98481
opends/tests/staf-tests/functional-tests/testcases/groups/groups.xml
@@ -23,61 +23,78 @@
 !
 ! CDDL HEADER END
 !
 !      Copyright 2007-2008 Sun Microsystems, Inc.
 !      Copyright 2007-2009 Sun Microsystems, Inc.
 ! -->
<stax>
  <defaultcall function="main_groups"/>
  <defaultcall function="main_groups" />
  <function name="main_groups">
    <function-list-args>
      <function-required-arg name="STAXParentID"/>
    </function-list-args>
    <sequence>
      <block name="'groups'">
        <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']='groups'
          </script>
          <call function="'testGroup_Preamble'"/>
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/groups/group_static_uniquemember.xml' % (TESTS_DIR)"/>
          <call function="'main_staticgroup_uniquemember'" />
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/groups/group_static_member.xml' % (TESTS_DIR)"/>
          <call function="'main_staticgroup_member'" />
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/groups/group_dynamic.xml' % (TESTS_DIR)"/>
          <call function="'main_dynamicgroup'" />
          <import machine="STAF_LOCAL_HOSTNAME"
            file="'%s/testcases/groups/group_virtual_static.xml' % (TESTS_DIR)"/>
          <call function="'main_virtualStaticGroup'" />
      <try>
        <block name="'groups'">
          <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']='groups'
              _group=CurrentTestPath['group']
            </script>
            <call function="'testGroup_Preamble'" />
            <script>
              suiteList = []
              suiteList.append('static_uniquemember')
              suiteList.append('static_member')
              suiteList.append('dynamic')
              suiteList.append('virtual_static')
            </script>
            <!-- Run the test suites -->
            <iterate  var="_suite" in="suiteList">
              <sequence>
                <try>
                  <sequence>
                    <import machine="STAF_LOCAL_HOSTNAME"
                      file="'%s/testcases/%s/group_%s.xml' % (TESTS_DIR,_group,_suite)"/>
                    <call function="'%s' % _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'"/>
        </sequence>
      </block>
        </finally>
      </try>
    </sequence>
  </function>
</stax>
</stax>