5767N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5767N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5767N/A<!--
5767N/A ! CDDL HEADER START
5767N/A !
5767N/A ! The contents of this file are subject to the terms of the
5767N/A ! Common Development and Distribution License, Version 1.0 only
5767N/A ! (the "License"). You may not use this file except in compliance
5767N/A ! with the License.
5767N/A !
5767N/A ! You can obtain a copy of the license at
5767N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt
5767N/A ! or http://forgerock.org/license/CDDLv1.0.html.
5767N/A ! See the License for the specific language governing permissions
5767N/A ! and limitations under the License.
5767N/A !
5767N/A ! When distributing Covered Code, include this CDDL HEADER in each
5767N/A ! file and include the License file at
5767N/A ! trunk/opends/resource/legal-notices/CDDLv1_0.txt. If applicable,
5767N/A ! add the following below this CDDL HEADER, with the fields enclosed
5767N/A ! by brackets "[]" replaced with your own identifying information:
5767N/A ! Portions Copyright [yyyy] [name of copyright owner]
5767N/A !
5767N/A ! CDDL HEADER END
5767N/A !
5767N/A ! Copyright 2012 ForgeRock AS.
5767N/A ! -->
5767N/A<stax>
5767N/A <defaultcall function="main_snmp" />
5767N/A <function name="main_snmp">
5767N/A <function-list-args>
5767N/A <function-required-arg name="STAXParentID"/>
5767N/A </function-list-args>
5767N/A
5767N/A <sequence>
5767N/A <try>
5767N/A <block name="'snmp'">
5767N/A <sequence>
5767N/A <!--- Load the job environment for the test group execution -->
5767N/A <import machine="STAF_LOCAL_HOSTNAME"
5767N/A file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
5767N/A <call function="'loadJobEnvironment'">
5767N/A { 'parent' : STAXParentID }
5767N/A </call>
5767N/A <script>
5767N/A CurrentTestPath['group']='snmp'
5767N/A _group=CurrentTestPath['group']
5767N/A
5767N/A </script>
5767N/A <call function="'testGroup_Preamble'" />
5767N/A
5767N/A <script>
5767N/A STOP_RUN = 'False'
5767N/A SNMP_PROPERTIES = {}
5767N/A
5767N/A suiteList = []
5767N/A suiteList.append('basic')
5767N/A suiteList.append('traps')
5767N/A suiteList.append('v1')
5767N/A suiteList.append('v2c')
5767N/A suiteList.append('v3')
5767N/A
5767N/A </script>
5767N/A
5767N/A <!-- SNMP Setup -->
5767N/A <import machine="STAF_LOCAL_HOSTNAME"
5767N/A file="'%s/testcases/%s/snmp_setup.xml' % (TESTS_DIR,_group)"/>
5767N/A <call function="'main_snmp_setup'" />
5767N/A
5767N/A <!-- Run the test suites -->
5767N/A <iterate var="_suite" in="suiteList">
5767N/A <sequence>
5767N/A <try>
5767N/A <sequence>
5767N/A
5767N/A <!-- SNMP Test Suites -->
5767N/A <import machine="STAF_LOCAL_HOSTNAME"
5767N/A file="'%s/testcases/%s/%s/%s_%s.xml' % (TESTS_DIR,_group,_suite,_group,_suite)"/>
5767N/A <call function="'main_%s_%s' % (_group,_suite)" />
5767N/A
5767N/A </sequence>
5767N/A <catch exception="'STAFException.TestSuite.SetupException'">
5767N/A <sequence>
5767N/A <message log="1" level="'fatal'">'Setup of test suite %s failed.' % _suite</message>
5767N/A </sequence>
5767N/A </catch>
5767N/A <catch exception="'STAFException.TestSuite.MainException'">
5767N/A <sequence>
5767N/A <message log="1" level="'fatal'">'Main part of test suite %s failed.' % _suite</message>
5767N/A </sequence>
5767N/A </catch>
5767N/A <catch exception="'STAFException.TestSuite.CleanupException'">
5767N/A <sequence>
5767N/A <message log="1" level="'fatal'">'Cleanup of test suite %s failed.' % _suite</message>
5767N/A </sequence>
5767N/A </catch>
5767N/A </try>
5767N/A </sequence>
5767N/A </iterate>
5767N/A
5767N/A </sequence>
5767N/A </block>
5767N/A <catch exception="'STAXException.TestGroupException'">
5767N/A <sequence>
5767N/A <message log="1" level="'fatal'">'Execution of Test Group Failed'</message>
5767N/A </sequence>
5767N/A </catch>
5767N/A <finally>
5767N/A <sequence>
5767N/A <!-- SNMP Cleanup -->
5767N/A <import machine="STAF_LOCAL_HOSTNAME"
5767N/A file="'%s/testcases/%s/snmp_cleanup.xml' % (TESTS_DIR,_group)"/>
5767N/A <call function="'main_snmp_cleanup'" />
5767N/A
5767N/A <!-- Test Group Postamble -->
5767N/A <call function="'testGroup_Postamble'"/>
5767N/A </sequence>
5767N/A </finally>
5767N/A </try>
5767N/A </sequence>
5767N/A </function>
5767N/A</stax>
5767N/A