os-cmpi-xen
changeset 114:d4e408f44961
Added association stuff so associators, associatorNames, references, referenceNames
can now be tested
Signed-off-by: Luke Szymanski <Lukasz.Szymanski@Unisys.com>
can now be tested
Signed-off-by: Luke Szymanski <Lukasz.Szymanski@Unisys.com>
author | Jim Fehlig <jfehlig@novell.com> |
---|---|
date | Wed May 23 12:47:39 2007 -0600 (2007-05-23) |
parents | 060610260121 |
children | eed587b5cd47 |
files | ChangeLog test/README test/association_list test/association_template test/run-test.sh test/setup-test.sh |
line diff
1.1 --- a/ChangeLog Tue May 22 11:41:35 2007 -0600 1.2 +++ b/ChangeLog Wed May 23 12:47:39 2007 -0600 1.3 @@ -1,3 +1,9 @@ 1.4 +------------------------------------------------------------------- 1.5 +Wed May 23 12:46:16 MDT 2007 - jfehlig@novell.com 1.6 + 1.7 + - Added tests for association providers. Patch provided 1.8 + by Luke Szymanski. 1.9 + 1.10 ------------------------------------------------------------------- 1.11 Tue May 22 11:37:02 MDT 2007 - jfehlig@novell.com 1.12
2.1 --- a/test/README Tue May 22 11:41:35 2007 -0600 2.2 +++ b/test/README Wed May 23 12:47:39 2007 -0600 2.3 @@ -13,6 +13,10 @@ Currently only a subset of the instance 2.4 enumInstanceNames 2.5 enumInstances 2.6 getInstance 2.7 +associators 2.8 +associatorNames 2.9 +references 2.10 +referenceNames 2.11 2.12 2. CONFIGURING 2.13
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/test/association_list Wed May 23 12:47:39 2007 -0600 3.3 @@ -0,0 +1,36 @@ 3.4 +Xen_ProcessorSettingsDefineState 3.5 +Xen_HasVirtualizationCapabilities 3.6 +Xen_ComputerSystemConsole 3.7 +Xen_NetworkPortElementSettingData 3.8 +Xen_HostedComputerSystem 3.9 +Xen_ComputerSystemMemory 3.10 +Xen_DiskSettingsDefineState 3.11 +Xen_CSSettingDataComponent 3.12 +Xen_ElementConformsToSVProfile 3.13 +Xen_RunningOS 3.14 +Xen_ComputerSystemProcessor 3.15 +Xen_MemoryAllocatedFromPool 3.16 +Xen_MemorySettingsDefineState 3.17 +Xen_HostedVirtualSystemManagementService 3.18 +Xen_ComputerSystemDisk 3.19 +Xen_DiskElementSettingData 3.20 +Xen_ProcessorSettingAllocationFromPool 3.21 +Xen_NPSettingsDefineState 3.22 +Xen_CSElementSettingData 3.23 +Xen_HostedNetworkPort 3.24 +Xen_CSElementCapabilities 3.25 +Xen_HostedProcessor 3.26 +Xen_MemoryElementSettingData 3.27 +Xen_ElementConformsToVSProfile 3.28 +Xen_CSSettingsDefineState 3.29 +Xen_ComputerSystemNetworkPort 3.30 +Xen_HostedMemory 3.31 +Xen_MemorySettingAllocationFromPool 3.32 +Xen_ProcessorAllocatedFromPool 3.33 +Xen_MemoryPoolComponent 3.34 +Xen_HostedDisk 3.35 +Xen_ProcessorPoolComponent 3.36 +Xen_HostedMemoryPool 3.37 +Xen_ProcessorElementSettingData 3.38 +Xen_HostedProcessorPool 3.39 +Xen_VSMSElementCapabilities
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/test/association_template Wed May 23 12:47:39 2007 -0600 4.3 @@ -0,0 +1,19 @@ 4.4 +******************************************************************************** 4.5 +association : ASDF 4.6 +sourceRole : LHS_ROLE 4.7 +targetRole : RHS_ROLE 4.8 +sourceClass : LHS_CLASS 4.9 +targetClass : RHS_CLASS 4.10 + 4.11 +-------------------------------------------------------------------------------- 4.12 +Association associators 4.13 + 4.14 +-------------------------------------------------------------------------------- 4.15 +Association associatorNames 4.16 + 4.17 +-------------------------------------------------------------------------------- 4.18 +Association references 4.19 + 4.20 +-------------------------------------------------------------------------------- 4.21 +Association referenceNames 4.22 +
5.1 --- a/test/run-test.sh Tue May 22 11:41:35 2007 -0600 5.2 +++ b/test/run-test.sh Wed May 23 12:47:39 2007 -0600 5.3 @@ -24,14 +24,29 @@ cp provider_list sblim-test-suite/provid 5.4 CMPI_TEST_PATH=`pwd` 5.5 cd sblim-test-suite 5.6 5.7 -echo 'Starting provider test ...' 5.8 +echo 'Starting provider tests ...' 5.9 5.10 cat provider_list | \ 5.11 while read line 5.12 do 5.13 - ./run.sh $line >> $CMPI_TEST_PATH/results 2>/dev/null 5.14 + echo Starting $line test ... 5.15 + ./run.sh $line >> $CMPI_TEST_PATH/provider_results 2>/dev/null 5.16 done 5.17 5.18 -echo 'Done. Results are in file results.' 5.19 +echo 'Done provider tests. Results are in file provider_results.' 5.20 +echo '-----------------------------------------------------------' 5.21 +rm provider_list 5.22 +cd .. 5.23 5.24 -rm provider_list 5.25 +echo 'Starting association tests ...' 5.26 +cp association_list sblim-test-suite/association_list 5.27 +cd sblim-test-suite 5.28 +cat association_list | \ 5.29 +while read line 5.30 +do 5.31 + echo Starting $line test ... 5.32 + ./run.sh $line >> $CMPI_TEST_PATH/association_results 2>/dev/null 5.33 +done 5.34 + 5.35 +echo 'Done. Results are in file association_results.' 5.36 +rm association_list
6.1 --- a/test/setup-test.sh Tue May 22 11:41:35 2007 -0600 6.2 +++ b/test/setup-test.sh Wed May 23 12:47:39 2007 -0600 6.3 @@ -71,5 +71,46 @@ done 6.4 6.5 rm ../provider_list 6.6 rm provider_template 6.7 +cd ../.. 6.8 + 6.9 +# Read provider list, make association_name.cim file from template, 6.10 +# and replace 'ASDF' with association name. Also, harvest classes 6.11 +# and roles on both sides of the association from .mof files and 6.12 +# put them into the association_name.cim file. 6.13 + 6.14 +cp association_list sblim-test-suite/association_list 6.15 +cp association_template sblim-test-suite/cim 6.16 +cd sblim-test-suite/cim 6.17 +cat ../association_list | \ 6.18 +while read line 6.19 +do 6.20 + text_file=$line.cim 6.21 + cp association_template $text_file 6.22 + sed -e 's/ASDF/'$line'/g' $text_file > temp 6.23 + mv -f temp $text_file 6.24 + 6.25 + # grep info from schema files 6.26 + cd ../.. 6.27 + grep REF ../schema/$line.mof . | sed -e 's/^.*://g' -e 's/ *//g' -e 's/;//g' > qqq 6.28 + LHS_CL=`sed -e '2d' qqq -e 's/REF.*$//'` 6.29 + RHS_CL=`sed -e '1d' qqq -e 's/REF.*$//'` 6.30 + LHS_RL=`sed -e '2d' qqq -e 's/^.*REF//'` 6.31 + RHS_RL=`sed -e '1d' qqq -e 's/^.*REF//'` 6.32 + rm qqq 6.33 + 6.34 + # fill out .cim file 6.35 + cd sblim-test-suite/cim 6.36 + sed -e 's/LHS_CLASS/'$LHS_CL'/g' $text_file > temp 6.37 + mv -f temp $text_file 6.38 + sed -e 's/RHS_CLASS/'$RHS_CL'/g' $text_file > temp 6.39 + mv -f temp $text_file 6.40 + sed -e 's/LHS_ROLE/'$LHS_RL'/g' $text_file > temp 6.41 + mv -f temp $text_file 6.42 + sed -e 's/RHS_ROLE/'$RHS_RL'/g' $text_file > temp 6.43 + mv -f temp $text_file 6.44 +done 6.45 + 6.46 +rm ../association_list 6.47 +rm association_template 6.48 6.49 echo 'Done.'