# HG changeset patch # User root@hyperion.shrike # Node ID 6deef3328c02f103a6fa195304263202a032cd4a # Parent f99d9b081535eda9520901e895918d63e51a3a51 This is the beginning of the test suite. The provider intrinsics will be exercised with sblimtest suite. Signed-off-by: Luke Szymanski diff -r f99d9b081535 -r 6deef3328c02 testing/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testing/README Tue May 15 14:23:27 2007 -0400 @@ -0,0 +1,21 @@ +1. INTRODUCTION + +The purpose of this directory is to ensure the intrinsics and extrinsics of the CIM Providers are in working order. Currently only sblim-testsuit goes +through all of the enumerations, etc + +2. CONFIGURING +3. BUILDING + +You must have sblim-wbemcli and sblim-testsuite working properly in order +to run this test. + +4. INSTALLING + +Run the setup-test script at the beginning of your testing. +If at any point you wish to add or remove a provider for testing, simply +update the provider_list and it will automatically be included in the testing. + +5. RUNNING + +Run the run-test.sh script. The results are in the file called 'results' + diff -r f99d9b081535 -r 6deef3328c02 testing/provider_list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testing/provider_list Tue May 15 14:23:27 2007 -0400 @@ -0,0 +1,23 @@ +Xen_RegisteredSVProfile +Xen_VirtualizationCapabilities +Xen_Disk +Xen_VirtualSystemManagementService +Xen_ProcessorSettingData +Xen_Memory +Xen_Processor +Xen_MemoryCapabilitiesSettingData +Xen_RegisteredVSProfile +Xen_Console +Xen_ProcessorPool +Xen_DiskSettingData +Xen_OperatingSystem +Xen_ConsoleSettingData +Xen_ComputerSystem +Xen_MemorySettingData +Xen_NetworkPortSettingData +Xen_MemoryPool +Xen_VirtualSystemManagementCapabilities +Xen_NetworkPort +Xen_ComputerSystemSettingData +Xen_ComputerSystemCapabilities +Xen_ProcessorCapabilitiesSettingData diff -r f99d9b081535 -r 6deef3328c02 testing/provider_template --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testing/provider_template Tue May 15 14:23:27 2007 -0400 @@ -0,0 +1,13 @@ +******************************************************************************** +class : ASDF +objectPath : + +-------------------------------------------------------------------------------- +Instance enumInstanceNames + +-------------------------------------------------------------------------------- +Instance enumInstances + +-------------------------------------------------------------------------------- +Instance get + diff -r f99d9b081535 -r 6deef3328c02 testing/run-test.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testing/run-test.sh Tue May 15 14:23:27 2007 -0400 @@ -0,0 +1,22 @@ +#! /bin/bash +# Author: Luke Szymanski +# Contributors: +# Description: Run sblim-test suite with Xen CIM providers +# +# Copyright (C) 2007 Unisys Corporation + +cp provider_list sblim-test-suite/provider_list +CMPI_TEST_PATH=`pwd` +cd sblim-test-suite + +echo 'Starting provider test ...' + +cat provider_list | \ +while read line +do + ./run.sh $line >> $CMPI_TEST_PATH/results 2>/dev/null +done + +echo 'Done. Results are in file results.' + +rm provider_list diff -r f99d9b081535 -r 6deef3328c02 testing/setup-test.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testing/setup-test.sh Tue May 15 14:23:27 2007 -0400 @@ -0,0 +1,40 @@ +#! /bin/bash +# Author: Luke Szymanski +# Contributors: +# Description: Set up test to run sblim-testsuite for Xen CIM providers +# +# Copyright (C) 2007 Unisys Corporation + +# see if simlink to sblim-test suite directory exists +cd sblim-test-suite 2> /dev/null + +if [ $? == 0 ]; then + cd - 1> /dev/null +else + # find path to sblim-test directory if not there already and create simlink + echo 'Setting up test environment ...' + SBLIM_TEST_PATH=`find / -iname consistence.pl 2> /dev/null` + SBLIM_TEST_PATH=`dirname $SBLIM_TEST_PATH` + ln -s $SBLIM_TEST_PATH sblim-test-suite +fi + + +# Read provider list, make provider_name.cim file from template, +# and replace 'ASDF' with provider name + +cp provider_list sblim-test-suite/provider_list +cp provider_template sblim-test-suite/cim +cd sblim-test-suite/cim +cat ../provider_list | \ +while read line +do + text_file=$line.cim + cp provider_template $text_file + sed -e 's/ASDF/'$line'/g' $text_file > temp + mv -f temp $text_file +done + +rm ../provider_list +rm provider_template + +echo 'Done.'