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 !
3551N/A ! You can obtain a copy of the license at
3551N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
3551N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
3551N/A ! See the License for the specific language governing permissions
3551N/A ! and limitations under the License.
3551N/A !
3551N/A ! When distributing Covered Code, exclude this CDDL HEADER in each
3551N/A ! file and exclude the License file at
3551N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
3551N/A ! add the following below this CDDL HEADER, with the fields enclosed
3551N/A ! by brackets "[]" replaced with your own identifying information:
3551N/A ! Portions Copyright [yyyy] [name of copyright owner]
3551N/A !
3551N/A ! CDDL HEADER END
3551N/A !
4716N/A ! Copyright 2008-2009 Sun Microsystems, Inc.
3551N/A ! -->
3551N/A<stax>
3551N/A
3551N/A <defaultcall function="general_options"/>
3551N/A
3551N/A <function name="general_options">
3551N/A
3551N/A <sequence>
3551N/A
3551N/A <!--- Test Suite information
3551N/A #@TestSuiteName Setup-Uninstall general_options Tests
3551N/A #@TestSuitePurpose Test the general options of both setup and
3551N/A uninstall commands. General options include
3551N/A 'help', 'version', ...
3551N/A #@TestSuiteGroup general_options
3551N/A #@TestSuiteID general_options Tests
3551N/A #@TestGroup Setup-Uninstall
3551N/A #@TestScript general_options.xml
3551N/A #@TestHTMLLink http://opends.dev.java.net/
3551N/A -->
3551N/A
3551N/A <script>
3551N/A if not CurrentTestPath.has_key('group'):
3551N/A CurrentTestPath['group'] = 'setup'
3551N/A CurrentTestPath['suite'] = 'general_options'
3551N/A </script>
3551N/A
3551N/A <call function="'testSuite_Preamble'"/>
3551N/A
3551N/A <!--- Test Case information
3553N/A #@TestMarker Setup-Uninstall general_options Tests
3551N/A #@TestName Setup-Uninstall: general_options:
3551N/A setup_uninstall_version
3551N/A #@TestID setup_uninstall_version
3551N/A #@TestPurpose Test the 'version' option of the commands
3551N/A #@TestPreamble
3551N/A #@TestStep Test 'version' option of setup command
3551N/A Test 'version' option of uninstall command
3551N/A #@TestPostamble
3551N/A #@TestResult PASS if all steps ran without errors
3551N/A -->
3551N/A <testcase name="getTestCaseName('setup_uninstall_version')">
3551N/A
3551N/A <sequence>
3551N/A
3551N/A <call function="'testCase_Preamble'"/>
3551N/A <message>'Setup Uninstall: Version option'</message>
3551N/A
3551N/A <script>
3551N/A setupCmd = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
3551N/A setupParams = '--version'
3551N/A </script>
3551N/A
3551N/A <message>'%s %s' % (setupCmd, setupParams)</message>
3551N/A <call function="'runCommand'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'name' : 'Launch setup command to get DS version',
3551N/A 'command' : setupCmd,
3551N/A 'arguments' : setupParams,
3551N/A 'path' : ODS_UNZIPPED,
3612N/A 'expectedRC': 0,
3612N/A 'outputFile': '%s/go-setup-version.txt' % OUT_GROUP,
3551N/A }
3551N/A </call>
3551N/A
3551N/A <script>
3551N/A grepFile = '%s/go-setup-version.txt' % OUT_GROUP
3551N/A </script>
3551N/A
3551N/A <call function="'grep'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'filename' : grepFile,
4716N/A 'testString': PRODUCTNAME
3551N/A }
3551N/A </call>
3551N/A
3551N/A <script>
3551N/A uninstallCmd = '%s/%s/uninstall%s' % (ODS_UNZIPPED, \
3551N/A OPENDSNAME, fileExt)
3551N/A uninstallParams = '--version'
3551N/A </script>
3551N/A
3551N/A <message>'%s %s' % (uninstallCmd, uninstallParams)</message>
3551N/A <call function="'runCommand'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'name' : 'Launch uninstall command to get DS version',
3551N/A 'command' : uninstallCmd,
3551N/A 'arguments' : uninstallParams,
3551N/A 'path' : ODS_UNZIPPED,
3612N/A 'expectedRC': 0,
3612N/A 'outputFile': '%s/go-uninstall-version.txt' % OUT_GROUP,
3551N/A }
3551N/A </call>
3551N/A
3551N/A <script>
3551N/A grepFile = '%s/go-uninstall-version.txt' % OUT_GROUP
3551N/A </script>
3551N/A
3551N/A <call function="'grep'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'filename' : grepFile,
4716N/A 'testString': PRODUCTNAME
3551N/A }
3551N/A </call>
3551N/A
3551N/A <call function="'testCase_Postamble'"/>
3551N/A
3551N/A </sequence>
3551N/A
3551N/A </testcase>
3551N/A
3551N/A <!--- Test Case information
3553N/A #@TestMarker Setup-Uninstall general_options Tests
3551N/A #@TestName Setup-Uninstall: general_options:
3551N/A setup_uninstall_help
3551N/A #@TestID setup_uninstall_help
3551N/A #@TestPurpose Test the 'help' option of the commands
3551N/A #@TestPreamble
3551N/A #@TestStep Test 'help' option of setup command
3551N/A Test 'help' option of uninstall command
3551N/A #@TestPostamble
3551N/A #@TestResult PASS if all steps ran without errors
3551N/A -->
3551N/A <testcase name="getTestCaseName('setup_uninstall_help')">
3551N/A
3551N/A <sequence>
3551N/A
3551N/A <call function="'testCase_Preamble'"/>
3551N/A <message>'Setup Uninstall: Help option'</message>
3551N/A <script>
3551N/A setupCmd = '%s/%s/setup%s' % (ODS_UNZIPPED, OPENDSNAME, fileExt)
3551N/A setupParams = '--help'
3551N/A </script>
3551N/A
3551N/A <message>'%s %s' % (setupCmd, setupParams)</message>
3551N/A <call function="'runCommand'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'name' : 'Launch setup command to get its help',
3551N/A 'command' : setupCmd,
3551N/A 'arguments' : setupParams,
3551N/A 'path' : ODS_UNZIPPED,
3612N/A 'expectedRC': 0,
3612N/A 'outputFile': '%s/go-setup-help.txt' % OUT_GROUP,
3551N/A }
3551N/A </call>
3551N/A
3551N/A <script>
3551N/A grepFile = '%s/go-setup-help.txt' % OUT_GROUP
3551N/A </script>
3551N/A
3551N/A <call function="'grep'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'filename' : grepFile,
3600N/A 'testString': 'Usage'
3551N/A }
3551N/A </call>
3551N/A
3551N/A <script>
3551N/A uninstallCmd = '%s/%s/uninstall%s' % (ODS_UNZIPPED, \
3551N/A OPENDSNAME, fileExt)
3551N/A uninstallParams = '--help'
3551N/A </script>
3551N/A
3551N/A <message>'%s %s' % (uninstallCmd, uninstallParams)</message>
3551N/A <call function="'runCommand'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'name' : 'Launch uninstall command to get its help',
3551N/A 'command' : uninstallCmd,
3551N/A 'arguments' : uninstallParams,
3551N/A 'path' : ODS_UNZIPPED,
3612N/A 'expectedRC': 0,
3612N/A 'outputFile': '%s/go-uninstall-help.txt' % OUT_GROUP,
3551N/A }
3551N/A </call>
3551N/A
3551N/A <script>
3551N/A grepFile = '%s/go-uninstall-help.txt' % OUT_GROUP
3551N/A </script>
3551N/A
3551N/A <call function="'grep'">
3612N/A { 'location' : STAF_REMOTE_HOSTNAME,
3551N/A 'filename' : grepFile,
3600N/A 'testString': 'Usage'
3551N/A }
3551N/A </call>
3551N/A
3551N/A <call function="'testCase_Postamble'"/>
3551N/A
3551N/A </sequence>
3551N/A
3551N/A </testcase>
3551N/A <call function="'testSuite_Postamble'"/>
3551N/A
3551N/A </sequence>
3551N/A
3551N/A </function>
3551N/A
3551N/A</stax>