3551N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3551N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
3551N/A<!--
3551N/A ! CDDL HEADER START
3551N/A !
3551N/A ! The contents of this file are subject to the terms of the
3551N/A ! Common Development and Distribution License, Version 1.0 only
3551N/A ! (the "License"). You may not use this file except in compliance
3551N/A ! with the License.
3551N/A !
6982N/A ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6982N/A ! or http://forgerock.org/license/CDDLv1.0.html.
3551N/A ! See the License for the specific language governing permissions
3551N/A ! and limitations under the License.
3551N/A !
6982N/A ! When distributing Covered Code, include this CDDL HEADER in each
6982N/A ! file and include the License file at legal-notices/CDDLv1_0.txt.
6982N/A ! If applicable, add the following below this CDDL HEADER, with the
6982N/A ! fields enclosed by brackets "[]" replaced with your own identifying
6982N/A ! information:
3551N/A ! Portions Copyright [yyyy] [name of copyright owner]
3551N/A !
3551N/A ! CDDL HEADER END
3551N/A !
3551N/A ! Copyright 2008 Sun Microsystems, Inc.
6035N/A ! Portions Copyright 2013 ForgeRock AS
6035N/A ! -->
3551N/A<stax>
3551N/A
3551N/A <defaultcall function="main_setup"/>
3551N/A
3551N/A <function name="main_setup">
3816N/A <function-list-args>
3816N/A <function-required-arg name="STAXParentID"/>
3816N/A </function-list-args>
3551N/A <sequence>
3551N/A
3551N/A <block name="'setup'">
3551N/A <sequence>
3816N/A <!--- Load the job environment for the test group execution -->
3816N/A <import machine="STAF_LOCAL_HOSTNAME"
3816N/A file="'%s/environment.xml' % TESTS_FUNCTIONS_DIR" />
3816N/A <call function="'loadJobEnvironment'">
3816N/A { 'parent' : STAXParentID }
3816N/A </call>
3551N/A <!--- Test Group information
3551N/A #@TestGroupName Setup tests
3551N/A #@TestGroupPurpose Test the tools commands.
3551N/A -->
3551N/A <script>
3551N/A CurrentTestPath['group'] = 'setup'
3690N/A OUT_GROUP = '%s/setup' % DIRECTORY_INSTANCE_DIR
3551N/A ODS_UNZIPPED = '%s/unzipped' % OUT_GROUP
3551N/A </script>
3551N/A
3551N/A <call function="'testGroup_Preamble'"/>
3551N/A
3551N/A <call function="'runSTAFCommand'">
3551N/A { 'name' : 'Create directory for this group',
3612N/A 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'service' : 'FS',
3551N/A 'request' : 'CREATE',
3551N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % OUT_GROUP
3551N/A }
3551N/A </call>
3551N/A
6035N/A <call function="'runSTAFCommand'">
6035N/A { 'name' : 'Create directory to contain unzipped OpenDS',
6035N/A 'location' : STAF_REMOTE_HOSTNAME,
6035N/A 'service' : 'FS',
6035N/A 'request' : 'CREATE',
6035N/A 'arguments' : 'DIRECTORY %s FAILIFEXISTS' % ODS_UNZIPPED
6035N/A }
6035N/A </call>
6401N/A
6401N/A <!-- Get the information about the server -->
6401N/A <call function="'GetVar'">
6401N/A { 'location' : STAF_REMOTE_HOSTNAME,
6401N/A 'type' : 'shared',
6401N/A 'variable' : 'Job%s_ServerInfo' % STAXParentID
6401N/A }
6401N/A </call>
6401N/A <if expr="RC != 0">
6401N/A <script>
6401N/A STAFResult='{}'
6401N/A </script>
6401N/A </if>
6401N/A <script>
6401N/A jobInfo=eval(STAFResult)
6401N/A instPath = '%s/%s' % (DIRECTORY_INSTANCE_BIN,OPENDSNAME)
6401N/A if jobInfo.has_key(instPath):
6401N/A serverInformation=jobInfo[instPath]
6401N/A dsVersion=serverInformation['server version']
6401N/A else:
6401N/A dsVersion='unknown'
6401N/A
6401N/A if dsVersion >= '2.5.0' and dsVersion != '2.5.0-Xpress1':
6401N/A licenseOption = '--acceptLicense'
6401N/A else:
6401N/A licenseOption = ''
6401N/A </script>
6035N/A
3551N/A <script>
3551N/A testList = []
3551N/A testList.append(['.','_pre'])
3551N/A testList.append(['.','general_options'])
3612N/A testList.append(['.','directory_manager'])
3612N/A testList.append(['.','import'])
3612N/A testList.append(['.','incompatible_options'])
3612N/A testList.append(['.','security'])
3612N/A testList.append(['.','ports'])
3612N/A testList.append(['.','misc'])
3551N/A testList.append(['.','_post'])
3551N/A </script>
3551N/A
3551N/A <iterate var="_test" in="testList">
3551N/A <sequence>
3551N/A
3551N/A <import machine="STAF_LOCAL_HOSTNAME"
3551N/A file="'%s/testcases/setup/%s/%s.xml' %
3551N/A (TESTS_DIR,_test[0],_test[1])"/>
3551N/A
3551N/A <call function="'%s' % _test[1]" />
3551N/A
3551N/A </sequence>
3551N/A
3551N/A </iterate>
3551N/A
3551N/A <call function="'testGroup_Postamble'"/>
3551N/A
3551N/A </sequence>
3551N/A
3551N/A </block>
3551N/A
3551N/A </sequence>
3551N/A
3551N/A </function>
3551N/A
3551N/A</stax>