# HG changeset patch # User root@1089 # Date 1179867807 14400 # Node ID ebdec84d60b86fcc7c8c12e983d27d19a0b7f3e6 # Parent 060610260121596434c9ba414144095c0f8bb638 Added association stuff so associators, associatorNames, references, referenceNames can now be tested diff -r 060610260121 -r ebdec84d60b8 test/README --- a/test/README Tue May 22 11:41:35 2007 -0600 +++ b/test/README Tue May 22 17:03:27 2007 -0400 @@ -13,6 +13,10 @@ enumInstanceNames enumInstanceNames enumInstances getInstance +associators +associatorNames +references +referenceNames 2. CONFIGURING diff -r 060610260121 -r ebdec84d60b8 test/association_list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/association_list Tue May 22 17:03:27 2007 -0400 @@ -0,0 +1,36 @@ +Xen_ProcessorSettingsDefineState +Xen_HasVirtualizationCapabilities +Xen_ComputerSystemConsole +Xen_NetworkPortElementSettingData +Xen_HostedComputerSystem +Xen_ComputerSystemMemory +Xen_DiskSettingsDefineState +Xen_CSSettingDataComponent +Xen_ElementConformsToSVProfile +Xen_RunningOS +Xen_ComputerSystemProcessor +Xen_MemoryAllocatedFromPool +Xen_MemorySettingsDefineState +Xen_HostedVirtualSystemManagementService +Xen_ComputerSystemDisk +Xen_DiskElementSettingData +Xen_ProcessorSettingAllocationFromPool +Xen_NPSettingsDefineState +Xen_CSElementSettingData +Xen_HostedNetworkPort +Xen_CSElementCapabilities +Xen_HostedProcessor +Xen_MemoryElementSettingData +Xen_ElementConformsToVSProfile +Xen_CSSettingsDefineState +Xen_ComputerSystemNetworkPort +Xen_HostedMemory +Xen_MemorySettingAllocationFromPool +Xen_ProcessorAllocatedFromPool +Xen_MemoryPoolComponent +Xen_HostedDisk +Xen_ProcessorPoolComponent +Xen_HostedMemoryPool +Xen_ProcessorElementSettingData +Xen_HostedProcessorPool +Xen_VSMSElementCapabilities diff -r 060610260121 -r ebdec84d60b8 test/association_template --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/association_template Tue May 22 17:03:27 2007 -0400 @@ -0,0 +1,19 @@ +******************************************************************************** +association : ASDF +sourceRole : LHS_ROLE +targetRole : RHS_ROLE +sourceClass : LHS_CLASS +targetClass : RHS_CLASS + +-------------------------------------------------------------------------------- +Association associators + +-------------------------------------------------------------------------------- +Association associatorNames + +-------------------------------------------------------------------------------- +Association references + +-------------------------------------------------------------------------------- +Association referenceNames + diff -r 060610260121 -r ebdec84d60b8 test/run-test.sh --- a/test/run-test.sh Tue May 22 11:41:35 2007 -0600 +++ b/test/run-test.sh Tue May 22 17:03:27 2007 -0400 @@ -24,14 +24,29 @@ CMPI_TEST_PATH=`pwd` CMPI_TEST_PATH=`pwd` cd sblim-test-suite -echo 'Starting provider test ...' +echo 'Starting provider tests ...' cat provider_list | \ while read line do - ./run.sh $line >> $CMPI_TEST_PATH/results 2>/dev/null + echo Starting $line test ... + ./run.sh $line >> $CMPI_TEST_PATH/provider_results 2>/dev/null done -echo 'Done. Results are in file results.' +echo 'Done provider tests. Results are in file provider_results.' +echo '-----------------------------------------------------------' +rm provider_list +cd .. -rm provider_list +echo 'Starting association tests ...' +cp association_list sblim-test-suite/association_list +cd sblim-test-suite +cat association_list | \ +while read line +do + echo Starting $line test ... + ./run.sh $line >> $CMPI_TEST_PATH/association_results 2>/dev/null +done + +echo 'Done. Results are in file association_results.' +rm association_list diff -r 060610260121 -r ebdec84d60b8 test/setup-test.sh --- a/test/setup-test.sh Tue May 22 11:41:35 2007 -0600 +++ b/test/setup-test.sh Tue May 22 17:03:27 2007 -0400 @@ -71,5 +71,46 @@ done rm ../provider_list rm provider_template +cd ../.. + +# Read provider list, make association_name.cim file from template, +# and replace 'ASDF' with association name. Also, harvest classes +# and roles on both sides of the association from .mof files and +# put them into the association_name.cim file. + +cp association_list sblim-test-suite/association_list +cp association_template sblim-test-suite/cim +cd sblim-test-suite/cim +cat ../association_list | \ +while read line +do + text_file=$line.cim + cp association_template $text_file + sed -e 's/ASDF/'$line'/g' $text_file > temp + mv -f temp $text_file + + # grep info from schema files + cd ../.. + grep REF ../schema/$line.mof . | sed -e 's/^.*://g' -e 's/ *//g' -e 's/;//g' > qqq + LHS_CL=`sed -e '2d' qqq -e 's/REF.*$//'` + RHS_CL=`sed -e '1d' qqq -e 's/REF.*$//'` + LHS_RL=`sed -e '2d' qqq -e 's/^.*REF//'` + RHS_RL=`sed -e '1d' qqq -e 's/^.*REF//'` + rm qqq + + # fill out .cim file + cd sblim-test-suite/cim + sed -e 's/LHS_CLASS/'$LHS_CL'/g' $text_file > temp + mv -f temp $text_file + sed -e 's/RHS_CLASS/'$RHS_CL'/g' $text_file > temp + mv -f temp $text_file + sed -e 's/LHS_ROLE/'$LHS_RL'/g' $text_file > temp + mv -f temp $text_file + sed -e 's/RHS_ROLE/'$RHS_RL'/g' $text_file > temp + mv -f temp $text_file +done + +rm ../association_list +rm association_template echo 'Done.'