From 77a01ef983a627d9df0d83e3328552c92ffd3453 Mon Sep 17 00:00:00 2001 From: ellen56 Date: Mon, 20 Sep 2010 09:33:34 +0000 Subject: [PATCH] fix malformat of xcattest pod file git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7515 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-test/pods/man1/xcattest.1.pod | 138 +++++++++++++++++------------ 1 file changed, 80 insertions(+), 58 deletions(-) diff --git a/xCAT-test/pods/man1/xcattest.1.pod b/xCAT-test/pods/man1/xcattest.1.pod index 71232d36a..3d588b34b 100644 --- a/xCAT-test/pods/man1/xcattest.1.pod +++ b/xCAT-test/pods/man1/xcattest.1.pod @@ -2,7 +2,7 @@ B - Run xcat test cases. -=head1 B +=head1 SYNOPSIS B [B<-?|-h>] @@ -12,32 +12,43 @@ B [B<-f> I] [B<-t> I] [B<--restore>] B [B<-f> I] [B<-c> I] [B<-l>] [B<--restore>] -=head1 B +=head1 DESCRIPTION This command is used to run xCAT automated test and output the result to /opt/xcat/share/xcat/tool/xcat/result. All test cases is in the directory /opt/xcat/share/xcat/tools/autotest. Now there are some cases for basic function of xCAT. Each case has a unique case name. The cases for I is place in directory /opt/xcat/share/xcat/tools/autotest/I. When xcattest is run with -c , it will run all cases in the specified directory. User can add custom cases in the corresponding directory or add new directory if there is no corresponding directory. =head1 OPTIONS -B<-?|-h> Display usage message. +=over 10 -B<-f> I +=item B<-?|-h> - Read configuration information from the configure file, default configure file is /opt/xcat/share/xcat/tools/autotest/default.conf. See /opt/xcat/share/xcat/tools/autotest/*.conf.template for example. +Display usage message. + +=item B<-f> I + +Read configuration information from the configure file, default configure file is /opt/xcat/share/xcat/tools/autotest/default.conf. See /opt/xcat/share/xcat/tools/autotest/*.conf.template for example. -B<-b> I - Comma separated list of file which contains cases which will be run. Default to run all cases. +=item B<-b> I + +Comma separated list of file which contains cases which will be run. Default to run all cases. -B<-t> I - Comma separated list of cases which will be run. Default to run all cases. +=item B<-t> I + +Comma separated list of cases which will be run. Default to run all cases. -B<-c> I - Comma separated list of commands which the related cases will be run. Default to run all cases. +=item B<-c> I -B<-l> - Display all available cases. +Comma separated list of commands which the related cases will be run. Default to run all cases. + +=item B<-l> + +Display all available cases. -B<--restore> - Restore test environment after test. +=item B<--restore> + +Restore test environment after test. + +=back =head1 RETURN VALUE @@ -48,61 +59,72 @@ B<--restore> =head1 TEST CASE The cases is specified as: - #required, case name - B:case name - #optional, precondition - B:AIX|Linux - #optional, precondition - B:ppc/x86 - #optional, precondition - B:hmc/mm/bmc/fsp - #required, command need to run - B:comand - #optional, check return code of last executed command - B == or != return code - #optional, check output of last executed command - B== or != or =~ or !~ I - end + + #required, case name + start:case name + #optional, precondition + os:AIX/Linux + #optional, precondition + arch:ppc/x86 + #optional, precondition + hcp:hmc/mm/bmc/fsp + #required, command need to run + cmd:comand + #optional, check return code of last executed command + check:rc == or != return code + #optional, check output of last executed command + check:output== or != or =~ or !~ output check string + end + The I can be regular expression. =head1 EXAMPLES -1. To run all test cases related command rpower: +=over 4 - B +=item 1. + +To run all test cases related command rpower: + + xcattest -c /tmp/config -c rpower -2. To run custom bundle: +=item 2. - B /tmp/custom.bundle> +To run custom bundle: + + xcattest -l > /tmp/custom.bundle + edit custom.bundle + xcattest -b custom.bundle - B - - B - -3. To run specified test cases, and restore test environment after test. +=item 3. - B +To run specified test cases, and restore test environment after test. -4. To add a new case to test chvm. In the example, we assume that the min_mem should not be equal to 16 in the lpar profile of computenode. The case name is chvm_custom. It create a test lpar named testnode firstly, that change the min_mem of the lpar to 16 using chvm, then check if min_mem have changed correctly. At last, the testnode be remove to ensure no garbage produced in the cases. + xcattest -t lsdef_t_o_l_z --restore - B +=item 4. - B - I - I - I /tmp/autotest.profile> - I - I - I - I - I - I - I - I - I - I - I - I +To add a new case to test chvm. In the example, we assume that the min_mem should not be equal to 16 in the lpar profile of computenode. The case name is chvm_custom. It create a test lpar named testnode firstly, that change the min_mem of the lpar to 16 using chvm, then check if min_mem have changed correctly. At last, the testnode be remove to ensure no garbage produced in the cases. + + add a new file filename in /opt/xcat/share/xcat/tools/autotest/chvm + edit filename + start:chvm_custom + hcp:hmc + cmd:lsvm $$CN > /tmp/autotest.profile + check:rc==0 + cmd:mkdef -t node -o testnode mgt=hmc groups=all + cmd:mkvm testnode -i $$MaxLparID -l $$CN + check:rc==0 + cmd:perl -pi -e 's/min_mem=\d+/min_mem=16/g' /tmp/autotest.profile + cmd:cat /tmp/autotest.profile|chvm testnode + check:rc==0 + cmd:lsvm testnode + check:output=~min_mem=16 + cmd:rmvm testnode + cmd:rm -f /tmp/autotest.profile + end + +=back =head1 INLINE FUNCTION