summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordave.sudlik <dave.sudlik>2006-10-20 14:40:39 +0000
committerdave.sudlik <dave.sudlik>2006-10-20 14:40:39 +0000
commit891c0ccf25b8250cdbdfa871d575c61d79d8d580 (patch)
treefcd96b61b85deec3844d50ea8894c018e11dc896
parent9d574b7566ec148285d577bc1d6f630f5560718a (diff)
downloadtog-pegasus-TASK-Bugs5690_3913_RemoteCMPI-branch.zip
tog-pegasus-TASK-Bugs5690_3913_RemoteCMPI-branch.tar.gz
tog-pegasus-TASK-Bugs5690_3913_RemoteCMPI-branch.tar.xz
TITLE: Implementation of missing functionality in Remote CMPI DESCRIPTION: committing fixes to address comment 9 in bug
-rwxr-xr-xmak/certificate_test.mak2
-rw-r--r--mak/commands.mak10
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/tools/AppendNS/Makefile5
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/tools/CreateExtNS/Makefile7
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/tools/Makefile2
-rw-r--r--src/Pegasus/ProviderManager2/CMPIR/tools/ReplaceNS/Makefile4
-rw-r--r--src/Pegasus/ProviderManagerService/ProviderManagerService.cpp17
-rw-r--r--src/Providers/TestProviders/CMPI/TestAssociation/tests/Makefile12
-rw-r--r--src/Providers/TestProviders/CMPI/TestAssociation/tests/cmpiAssociationTestClient.cpp114
-rw-r--r--src/Providers/TestProviders/CMPI/TestExecQuery/tests/Makefile17
-rw-r--r--src/Providers/TestProviders/CMPI/TestExecQuery/tests/TestCMPIInstanceExecQuery.cpp34
-rw-r--r--src/Providers/TestProviders/CMPI/TestFail_1/tests/Makefile15
-rw-r--r--src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp14
-rw-r--r--src/Providers/TestProviders/CMPI/TestFail_2/tests/Makefile15
-rw-r--r--src/Providers/TestProviders/CMPI/TestFail_2/tests/TestCMPI_Fail_2.cpp14
-rw-r--r--src/Providers/TestProviders/CMPI/TestFail_3/tests/Makefile15
-rw-r--r--src/Providers/TestProviders/CMPI/TestFail_3/tests/TestCMPI_Fail_3.cpp14
-rw-r--r--src/Providers/TestProviders/CMPI/TestMethod/tests/Makefile18
-rw-r--r--src/Providers/TestProviders/CMPI/TestMethod/tests/TestCMPIMethod.cpp62
-rw-r--r--src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/Makefile15
-rw-r--r--src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/TestCMPIThreadProvider.cpp28
21 files changed, 209 insertions, 225 deletions
diff --git a/mak/certificate_test.mak b/mak/certificate_test.mak
index 29443d1..5842592 100755
--- a/mak/certificate_test.mak
+++ b/mak/certificate_test.mak
@@ -658,7 +658,7 @@ displayCBATestCertificates: FORCE
TEST_CERT_NAME=$($(i)) $(NL))
registerInvalidCBATestCertificates:
- -$(CIMSERVER_STOP_SERVICE)
+ $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
$(foreach i, $(PEGASUS_NOT_VALIDATED_REG_CERT_NAME_SYMBOLS), \
$(MAKESH) $(MAKE) -f TestMakefile \
registerInvalidCBATestCertificate \
diff --git a/mak/commands.mak b/mak/commands.mak
index a1b3544..7b2e7ac 100644
--- a/mak/commands.mak
+++ b/mak/commands.mak
@@ -378,8 +378,8 @@ CMDSFORCE:
##
cimstop: CMDSFORCE
+ -$(CMPIR_STOP_DAEMON)
$(CIMSERVER_STOP_SERVICE)
- $(CMPIR_STOP_DAEMON)
cimstart: CMDSFORCE
$(CIMSERVER_START_SERVICE)
@@ -468,13 +468,11 @@ mkdirhier_IgnoreError: CMDSFORCE
## cimstart command.
##
runTestSuite: CMDSFORCE
- -$(CIMSERVER_STOP_SERVICE)
- $(CIMSERVER_START_SERVICE)
- $(CMPIR_START_DAEMON)
+ make -f TestMakefile -i cimstop
+ make -f TestMakefile cimstart
$(WINDOWS_ONLY_SLEEP)
$(foreach i, $(TESTSUITE_CMDS), $(subst @@, ,$(i)))
- $(CIMSERVER_STOP_SERVICE)
- $(CMPIR_STOP_DAEMON)
+ make -f TestMakefile cimstop
ifndef PEGASUS_SSLCNF_FULLY_QUALIFIED_DSN
PEGASUS_SSLCNF_FULLY_QUALIFIED_DSN=$(GET_HOSTNAME)
diff --git a/src/Pegasus/ProviderManager2/CMPIR/tools/AppendNS/Makefile b/src/Pegasus/ProviderManager2/CMPIR/tools/AppendNS/Makefile
index beffd1a..d714c0b 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/tools/AppendNS/Makefile
+++ b/src/Pegasus/ProviderManager2/CMPIR/tools/AppendNS/Makefile
@@ -28,12 +28,11 @@
#// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#//
#//==============================================================================
-ROOT = $(PEGASUS_ROOT)
+ROOT = ../../../../../..
include $(ROOT)/mak/config.mak
-DIR = Pegasus/ProviderManagaer2/CMPIR/tools/AppendNS
-
+DIR = Pegasus/ProviderManager2/CMPIR/tools/AppendNS
ifeq ($(PEGASUS_PLATFORM),ZOS_ZSERIES_IBM)
CXX = cc
diff --git a/src/Pegasus/ProviderManager2/CMPIR/tools/CreateExtNS/Makefile b/src/Pegasus/ProviderManager2/CMPIR/tools/CreateExtNS/Makefile
index 585e91a..b5289e5 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/tools/CreateExtNS/Makefile
+++ b/src/Pegasus/ProviderManager2/CMPIR/tools/CreateExtNS/Makefile
@@ -28,11 +28,11 @@
#// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#//
#//==============================================================================
-ROOT = $(PEGASUS_ROOT)
+ROOT = ../../../../../..
include $(ROOT)/mak/config.mak
-DIR = Pegasus/ProviderManagaer2/CMPIR/tools/CreateExtNS
+DIR = Pegasus/ProviderManager2/CMPIR/tools/CreateExtNS
ifeq ($(PEGASUS_PLATFORM),ZOS_ZSERIES_IBM)
CXX = cc
@@ -41,7 +41,8 @@ endif
PROGRAM = CreateExtNS
-SOURCES = CreateExtNs.c
+SOURCES = \
+ CreateExtNs.c
include $(ROOT)/mak/program.mak
diff --git a/src/Pegasus/ProviderManager2/CMPIR/tools/Makefile b/src/Pegasus/ProviderManager2/CMPIR/tools/Makefile
index 0a5cc8a..f655183 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/tools/Makefile
+++ b/src/Pegasus/ProviderManager2/CMPIR/tools/Makefile
@@ -28,7 +28,7 @@
#// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#//
#//==============================================================================
-ROOT=$(PEGASUS_ROOT)
+ROOT = ../../../../..
include $(ROOT)/mak/config.mak
diff --git a/src/Pegasus/ProviderManager2/CMPIR/tools/ReplaceNS/Makefile b/src/Pegasus/ProviderManager2/CMPIR/tools/ReplaceNS/Makefile
index b0a3d6e..1964e02 100644
--- a/src/Pegasus/ProviderManager2/CMPIR/tools/ReplaceNS/Makefile
+++ b/src/Pegasus/ProviderManager2/CMPIR/tools/ReplaceNS/Makefile
@@ -28,11 +28,11 @@
#// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#//
#//==============================================================================
-ROOT = $(PEGASUS_ROOT)
+ROOT = ../../../../../..
include $(ROOT)/mak/config.mak
-DIR = Pegasus/ProviderManagaer2/CMPIR/tools/ReplaceNS
+DIR = Pegasus/ProviderManager2/CMPIR/tools/ReplaceNS
ifeq ($(PEGASUS_PLATFORM),ZOS_ZSERIES_IBM)
CXX = cc
diff --git a/src/Pegasus/ProviderManagerService/ProviderManagerService.cpp b/src/Pegasus/ProviderManagerService/ProviderManagerService.cpp
index 8144053..fb33cbd 100644
--- a/src/Pegasus/ProviderManagerService/ProviderManagerService.cpp
+++ b/src/Pegasus/ProviderManagerService/ProviderManagerService.cpp
@@ -714,19 +714,10 @@ Message* ProviderManagerService::_processMessage(CIMRequestMessage* request)
request->operationContext.get(ProviderIdContainer::NAME);
if (pidc1.isRemoteNameSpace() )
{
- if (_basicProviderManagerRouter)
- {
- Tracer::trace ( TRC_PROVIDERMANAGER, Tracer::LEVEL4,
- "Processing Remote NameSpace request ");
- response = _basicProviderManagerRouter->processMessage (request);
- return response;
- }
- else
- {
- throw PEGASUS_CIM_EXCEPTION_L( CIM_ERR_FAILED,
- "Basic Provider Manager Router is not"
- " Initialized for Remote CMPI.");
- }
+ Tracer::trace ( TRC_PROVIDERMANAGER, Tracer::LEVEL4,
+ "Processing Remote NameSpace request ");
+ response = _basicProviderManagerRouter->processMessage (request);
+ return response;
}
}
#endif
diff --git a/src/Providers/TestProviders/CMPI/TestAssociation/tests/Makefile b/src/Providers/TestProviders/CMPI/TestAssociation/tests/Makefile
index c4580ad..487153c 100644
--- a/src/Providers/TestProviders/CMPI/TestAssociation/tests/Makefile
+++ b/src/Providers/TestProviders/CMPI/TestAssociation/tests/Makefile
@@ -51,16 +51,20 @@ SOURCES = cmpiAssociationTestClient.cpp
include $(ROOT)/mak/program.mak
include $(ROOT)/test/config.mak
+LOGFILES = CMPITESTRacing
tests:
poststarttests:
+ @$(RM) $(LOGFILES).log
$(PROGRAM) test/TestProvider
-#ifdef PEGASUS_ENABLE_REMOTE_CMPI
+ @$(RM) $(LOGFILES).log
+ifdef PEGASUS_ENABLE_REMOTE_CMPI
@$(ECHO) Testing with remote namespace
- @$(PROGRAM) test/Remote/Localhost
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#endif
+ $(PROGRAM) test/Remote/Localhost
+else
+ @$(ECHO) "+++++ PEGASUS_ENABLE_REMOTE_CMPI is NOT defined: Skipping remote CMPI tests"
+endif
install:
diff --git a/src/Providers/TestProviders/CMPI/TestAssociation/tests/cmpiAssociationTestClient.cpp b/src/Providers/TestProviders/CMPI/TestAssociation/tests/cmpiAssociationTestClient.cpp
index 19cd38a..f74d703 100644
--- a/src/Providers/TestProviders/CMPI/TestAssociation/tests/cmpiAssociationTestClient.cpp
+++ b/src/Providers/TestProviders/CMPI/TestAssociation/tests/cmpiAssociationTestClient.cpp
@@ -43,8 +43,8 @@
// CMPI_TEST_Racing (association class)
//
// The executable for this CIM client application is: cmpiAssociationTestClient.
-// To display the test results (returned instances or classes), use the -v
-// (verbose) option in the command line: 'cmpiAssociationTestClient -v'.
+// To display the test results (returned instances or classes), define the
+// environment variable PEGASUS_TEST_VERBOSE.
//
// Test results are verified by comparing the number of returned objects
// with the expected number of returned objects. Any unexpected result
@@ -62,13 +62,13 @@
PEGASUS_USING_STD;
PEGASUS_USING_PEGASUS;
-CIMNamespaceName ProviderNamespace;
+CIMNamespaceName providerNamespace;
const CIMName CMPI_TEST_PERSON = CIMName ("CMPI_TEST_Person");
const CIMName CMPI_TEST_VEHICLE = CIMName ("CMPI_TEST_Vehicle");
const CIMName CMPI_TEST_RACING = CIMName ("CMPI_TEST_Racing");
-static Boolean verbose = false;
+Boolean verbose = false;
// exepected results - number of returned objects expected for each test
@@ -102,9 +102,9 @@ void _verifyResult(const Uint32 numObjects, const Uint32 numExpectedObjects)
{
if (numObjects != numExpectedObjects)
{
- cout << "Error: Unexpected number of objects returned. ";
- cout << "Expected " << numExpectedObjects << " object(s), but ";
- cout << numObjects << " object(s) were returned." << endl;
+ cerr << "Error: Unexpected number of objects returned. " << endl;;
+ cerr << "Expected " << numExpectedObjects << " object(s), but ";
+ cerr << numObjects << " object(s) were returned." << endl;
exit(1);
}
}
@@ -156,8 +156,8 @@ void _testAssociators(CIMClient& client, CIMName assocClass, CIMObjectPath insta
{
if (verbose)
{
- cout << "\nAssociation Class: " << assocClass.getString() << endl;
- cout << "\nObject Name: " << instancePath.toString() << endl;
+ cout << "Association Class: " << assocClass.getString() << endl;
+ cout << "Object Name: " << instancePath.toString() << endl;
}
try
@@ -171,7 +171,7 @@ void _testAssociators(CIMClient& client, CIMName assocClass, CIMObjectPath insta
//
Array<CIMObject> resultObjects =
- client.associators(ProviderNamespace, instancePath, assocClass,
+ client.associators(providerNamespace, instancePath, assocClass,
resultClass, role, resultRole);
// verify result
@@ -195,8 +195,8 @@ void _testAssociatorNames(CIMClient& client, CIMName assocClass,
{
if (verbose)
{
- cout << "\nAssociation Class: " << assocClass.getString() << endl;
- cout << "\nObject Name: " << instancePath.toString() << endl;
+ cout << "Association Class: " << assocClass.getString() << endl;
+ cout << "Object Name: " << instancePath.toString() << endl;
}
try
@@ -210,7 +210,7 @@ void _testAssociatorNames(CIMClient& client, CIMName assocClass,
String resultRole = String::EMPTY;
Array<CIMObjectPath> resultObjectPaths =
- client.associatorNames(ProviderNamespace, instancePath,
+ client.associatorNames(providerNamespace, instancePath,
assocClass, resultClass, role, resultRole);
// verify result
_verifyResult(resultObjectPaths.size(), numExpectedObjects);
@@ -233,7 +233,7 @@ void _testReferences(CIMClient& client, CIMObjectPath instancePath,
{
if (verbose)
{
- cout << "\nObject Name: " << instancePath.toString() << endl;
+ cout << "Object Name: " << instancePath.toString() << endl;
}
try
@@ -244,7 +244,7 @@ void _testReferences(CIMClient& client, CIMObjectPath instancePath,
CIMName resultClass = CIMName();
String role = String::EMPTY;
- resultObjects = client.references(ProviderNamespace, instancePath,
+ resultObjects = client.references(providerNamespace, instancePath,
resultClass,role);
// verify result
_verifyResult(resultObjects.size(), numExpectedObjects);
@@ -267,7 +267,7 @@ void _testReferenceNames(CIMClient& client, CIMObjectPath instancePath,
{
if (verbose)
{
- cout << "\nObject Name: " << instancePath.toString() << endl;
+ cout << "Object Name: " << instancePath.toString() << endl;
}
try
@@ -279,7 +279,7 @@ void _testReferenceNames(CIMClient& client, CIMObjectPath instancePath,
String role = String::EMPTY;
resultObjectPaths =
- client.referenceNames(ProviderNamespace, instancePath, resultClass, role);
+ client.referenceNames(providerNamespace, instancePath, resultClass, role);
// verify result
_verifyResult(resultObjectPaths.size(), numExpectedObjects);
@@ -316,14 +316,14 @@ void _testCMPIAssociationClassOperations(CIMClient& client, CIMName className)
if (verbose)
{
- cout << "\n+++++ Test associators for (" << className.getString();
+ cout << "+++++ Test associators for (" << className.getString();
cout << ")" << endl;
}
try
{
// get the association classes
- resultObjects = client.associators(ProviderNamespace, op, assocClass,
+ resultObjects = client.associators(providerNamespace, op, assocClass,
resultClass, role, resultRole);
// display result
@@ -344,13 +344,13 @@ void _testCMPIAssociationClassOperations(CIMClient& client, CIMName className)
if (verbose)
{
- cout << "\n+++++ Test associatorNames for (" << className.getString();
+ cout << "+++++ Test associatorNames for (" << className.getString();
cout << ")" << endl;
}
try
{
- resultObjectPaths = client.associatorNames(ProviderNamespace, op, assocClass,
+ resultObjectPaths = client.associatorNames(providerNamespace, op, assocClass,
resultClass, role, resultRole);
// display result
@@ -370,12 +370,12 @@ void _testCMPIAssociationClassOperations(CIMClient& client, CIMName className)
if (verbose)
{
- cout << "\n+++++ Test references for (" << className.getString() << ")" << endl;
+ cout << "+++++ Test references for (" << className.getString() << ")" << endl;
}
try
{
- resultObjects = client.references(ProviderNamespace, op, resultClass, role);
+ resultObjects = client.references(providerNamespace, op, resultClass, role);
// display result
_displayResult(resultObjects);
@@ -395,14 +395,14 @@ void _testCMPIAssociationClassOperations(CIMClient& client, CIMName className)
if (verbose)
{
- cout << "\n+++++ Test referenceNames for (" << className.getString();
+ cout << "+++++ Test referenceNames for (" << className.getString();
cout << ")" << endl;
}
try
{
resultObjectPaths =
- client.referenceNames(ProviderNamespace, op, resultClass, role);
+ client.referenceNames(providerNamespace, op, resultClass, role);
// display result
_displayResult(resultObjectPaths);
@@ -420,29 +420,19 @@ void _testCMPIAssociationClassOperations(CIMClient& client, CIMName className)
int main(int argc, char** argv)
{
+ verbose = (getenv("PEGASUS_TEST_VERBOSE")) ? true : false;
+
//
- // Check command line option
+ // Check for command line option
//
- int i;
-
- if (argc < 2 || argc > 3)
+ if (argc != 2)
{
- cerr << "Usage: TestCMPIAssosiation [-v] namespace" << endl;
+ cerr << "Usage: TestCMPIAssociation {namespace}" << endl;
return(1);
}
- for(i = 1; i < argc ; ++i)
- {
- const char *opt = argv[i];
- if (strcmp(opt, "-v") == 0)
- {
- verbose = true;
- }
- else
- {
- ProviderNamespace = CIMNamespaceName (argv[i]);
- }
- }
+ providerNamespace = CIMNamespaceName (argv[1]);
+
CIMClient client;
// Connect to server
@@ -459,8 +449,6 @@ int main(int argc, char** argv)
// Test passing Instance object path to the Association Methods
// =======================================================================
- cout << "+++++ Test CMPI Association Provider" << endl;
-
// Get the instance object paths for the Person and Vehicle class
//
Array<CIMObjectPath> personRefs;
@@ -468,13 +456,13 @@ int main(int argc, char** argv)
try
{
personRefs =
- client.enumerateInstanceNames(ProviderNamespace, CMPI_TEST_PERSON);
+ client.enumerateInstanceNames(providerNamespace, CMPI_TEST_PERSON);
vehicleRefs =
- client.enumerateInstanceNames(ProviderNamespace, CMPI_TEST_VEHICLE);
+ client.enumerateInstanceNames(providerNamespace, CMPI_TEST_VEHICLE);
}
catch (Exception& e)
{
- cout << "enumerateInstanceNames() failed." << endl;
+ cerr << "enumerateInstanceNames() failed." << endl;
_errorExit(e.getMessage());
}
@@ -503,7 +491,11 @@ int main(int argc, char** argv)
// instance via an instance of a specified association class.
// =======================================================================
- cout << "\n+++++ Test associators" << endl;
+ if (verbose)
+ {
+ cout << "+++++ Test associators" << endl;
+ }
+
for (Uint32 i = 0; i < numPersonInstances; i++)
{
_testAssociators(client, CMPI_TEST_RACING, personRefs[i],
@@ -523,7 +515,11 @@ int main(int argc, char** argv)
// source CIM instance via an instance of a association class.
// =======================================================================
- cout << "\n+++++ Test associatorNames" << endl;
+ if (verbose)
+ {
+ cout << "+++++ Test associatorNames" << endl;
+ }
+
for (Uint32 i = 0; i < numPersonInstances; i++)
{
_testAssociatorNames(client, CMPI_TEST_RACING, personRefs[i],
@@ -542,7 +538,11 @@ int main(int argc, char** argv)
// instance.
// =======================================================================
- cout << "\n+++++ Test references" << endl;
+ if (verbose)
+ {
+ cout << "+++++ Test references" << endl;
+ }
+
for (Uint32 i = 0; i < numPersonInstances; i++)
{
_testReferences(client, personRefs[i], resultArray_ref_P[i]);
@@ -559,7 +559,11 @@ int main(int argc, char** argv)
// source CIM instance.
// =======================================================================
- cout << "\n+++++ Test referenceNames" << endl;
+ if (verbose)
+ {
+ cout << "+++++ Test referenceNames" << endl;
+ }
+
for (Uint32 i = 0; i < numPersonInstances; i++)
{
_testReferenceNames(client, personRefs[i], resultArray_ref_P[i]);
@@ -573,7 +577,11 @@ int main(int argc, char** argv)
// Test passing Class object path to the Association Methods
// =======================================================================
- cout << "\n+++++ Test association class operations" << endl;
+ if (verbose)
+ {
+ cout << "+++++ Test association class operations" << endl;
+ }
+
_testCMPIAssociationClassOperations(client, CMPI_TEST_PERSON);
_testCMPIAssociationClassOperations(client, CMPI_TEST_VEHICLE);
@@ -581,6 +589,6 @@ int main(int argc, char** argv)
// Association tests completed
// =======================================================================
- cout << "\n+++++ passed all tests" << endl;
+ cout << argv[0] << " +++++ passed all tests" << endl;
return(0);
}
diff --git a/src/Providers/TestProviders/CMPI/TestExecQuery/tests/Makefile b/src/Providers/TestProviders/CMPI/TestExecQuery/tests/Makefile
index b3d4be9..1deaaa3 100644
--- a/src/Providers/TestProviders/CMPI/TestExecQuery/tests/Makefile
+++ b/src/Providers/TestProviders/CMPI/TestExecQuery/tests/Makefile
@@ -39,8 +39,6 @@ LIBRARIES = \
pegconfig \
pegcommon
-LOGFILES = TestCMPIInstanceExecQuery
-
EXTRA_INCLUDES = $(SYS_INCLUDES)
LOCAL_DEFINES = -DPEGASUS_INTERNALONLY
@@ -58,14 +56,17 @@ tests:
poststarttests:
@$(RM) $(LOGFILES).log
- @$(ECHO) $(PROGRAM) test
- @$(PROGRAM) test test/TestProvider
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
+ $(PROGRAM) test test/TestProvider
@$(DIFF) $(LOGFILES).loggood $(LOGFILES).log
- @$(ECHO) +++ $(LOGFILES) passed successfully +++
+ @$(ECHO) $(PROGRAM) "+++++ passed all tests"
+ @$(RM) $(LOGFILES).log
ifdef PEGASUS_ENABLE_REMOTE_CMPI
@$(ECHO) Testing with remote namespace
- @$(PROGRAM) test test/Remote/Localhost
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
+ $(PROGRAM) test test/Remote/Localhost
+ @$(ECHO) $(PROGRAM) "+++++ passed all tests"
+ @$(RM) $(LOGFILES).log
+else
+ @$(ECHO) "+++++ PEGASUS_ENABLE_REMOTE_CMPI is NOT defined: Skipping remote CMPI tests"
endif
+
install:
diff --git a/src/Providers/TestProviders/CMPI/TestExecQuery/tests/TestCMPIInstanceExecQuery.cpp b/src/Providers/TestProviders/CMPI/TestExecQuery/tests/TestCMPIInstanceExecQuery.cpp
index 18e010f..bb929ad 100644
--- a/src/Providers/TestProviders/CMPI/TestExecQuery/tests/TestCMPIInstanceExecQuery.cpp
+++ b/src/Providers/TestProviders/CMPI/TestExecQuery/tests/TestCMPIInstanceExecQuery.cpp
@@ -29,8 +29,6 @@
//
//==============================================================================
//
-// Author: Konrad Rzeszutek <konradr@us.ibm.com>
-//
//%/////////////////////////////////////////////////////////////////////////////
#include <Pegasus/Common/Config.h>
@@ -48,7 +46,7 @@ PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;
-CIMNamespaceName ProviderNamespace;
+CIMNamespaceName providerNamespace;
const char *queries[] = {
"select n32,s,ElementName,n64,n16,r32, r64,d from TestCMPI_ExecQuery where n32=42", // 0
"SELECT * FROM TestCMPI_ExecQuery", // 1
@@ -212,18 +210,12 @@ void _checkUint64Property
PEGASUS_TEST_ASSERT (result == value);
}
-
-
void
_usage ()
{
- cerr << "Usage: TestCMPIInstanceExecQuery " << "{test} {namespace}" << endl;
+ cerr << "Usage: TestCMPIInstanceExecQuery {test} {namespace}" << endl;
}
-
-
-
-
static void
_test1 (CIMClient & client)
{
@@ -238,7 +230,7 @@ _test1 (CIMClient & client)
if (verbose)
cerr << "Querying " << queries[i] << endl;
- Array < CIMObject > objects = client.execQuery (ProviderNamespace,
+ Array < CIMObject > objects = client.execQuery (providerNamespace,
wql, queries[i]);
if (objects.size () == 0)
@@ -299,14 +291,14 @@ _test2 (CIMClient & client)
"TestCMPI_ExecQuery",
CIMKeyBinding::STRING));
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName ("TestCMPI_ExecQuery");
instanceName.setKeyBindings (keyBindings);
/* Call the unsupported functions of the provider. */
try
{
- CIMInstance instance (client.getInstance (ProviderNamespace,
+ CIMInstance instance (client.getInstance (providerNamespace,
instanceName));
} catch (const CIMException &)
{
@@ -316,14 +308,14 @@ _test2 (CIMClient & client)
try
{
- client.deleteInstance (ProviderNamespace, instanceName);
+ client.deleteInstance (providerNamespace, instanceName);
} catch (const CIMException & )
{
exceptions ++;
}
CIMClass thisClass =
- client.getClass(ProviderNamespace,"TestCMPI_ExecQuery",false,true,true,CIMPropertyList());
+ client.getClass(providerNamespace,"TestCMPI_ExecQuery",false,true,true,CIMPropertyList());
Array<CIMName> propertyNameList;
propertyNameList.append(CIMName("ElementName"));
CIMPropertyList myPropertyList(propertyNameList);
@@ -333,7 +325,7 @@ _test2 (CIMClient & client)
try
{
- CIMObjectPath objectPath (client.createInstance (ProviderNamespace,
+ CIMObjectPath objectPath (client.createInstance (providerNamespace,
newInstance));
@@ -344,7 +336,7 @@ _test2 (CIMClient & client)
try
{
- client.modifyInstance (ProviderNamespace, newInstance);
+ client.modifyInstance (providerNamespace, newInstance);
} catch (const CIMException &)
{
@@ -354,7 +346,7 @@ _test2 (CIMClient & client)
{
Array < CIMInstance > instances =
- client.enumerateInstances (ProviderNamespace,
+ client.enumerateInstances (providerNamespace,
CIMName ("TestCMPI_ExecQuery"));
} catch (const CIMException &)
{
@@ -364,7 +356,7 @@ _test2 (CIMClient & client)
try
{
Array < CIMObjectPath > objectPaths =
- client.enumerateInstanceNames (ProviderNamespace,
+ client.enumerateInstanceNames (providerNamespace,
CIMName ("TestCMPI_ExecQuery"));
} catch (const CIMException &)
{
@@ -402,10 +394,9 @@ main (int argc, char **argv)
if (String::equalNoCase (opt, "test"))
{
- ProviderNamespace = CIMNamespaceName (argv[2]);
+ providerNamespace = CIMNamespaceName (argv[2]);
_test1 (client);
_test2 (client);
- cout << "+++++ test completed successfully" << endl;
}
else
{
@@ -414,6 +405,7 @@ main (int argc, char **argv)
return -1;
}
}
+ cout << argv[0] << " +++++ completed" << endl;
return 0;
}
diff --git a/src/Providers/TestProviders/CMPI/TestFail_1/tests/Makefile b/src/Providers/TestProviders/CMPI/TestFail_1/tests/Makefile
index 49f0ed1..ee4ed5d 100644
--- a/src/Providers/TestProviders/CMPI/TestFail_1/tests/Makefile
+++ b/src/Providers/TestProviders/CMPI/TestFail_1/tests/Makefile
@@ -49,11 +49,12 @@ include $(ROOT)/test/config.mak
tests:
poststarttests:
- @$(PROGRAM) test test/TestProvider
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#ifdef PEGASUS_ENABLE_REMOTE_CMPI
- @$(ECHO) Testing with remote namespace
- @$(PROGRAM) test test/Remote/Localhost
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#endif
+ $(PROGRAM) test test/TestProvider
+ifdef PEGASUS_ENABLE_REMOTE_CMPI
+ @$(ECHO) Testing with remote namespace
+ $(PROGRAM) test test/Remote/Localhost
+else
+ @$(ECHO) "+++++ PEGASUS_ENABLE_REMOTE_CMPI is NOT defined: Skipping remote CMPI tests"
+endif
+
install:
diff --git a/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp b/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp
index 1962f14..787da22 100644
--- a/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp
+++ b/src/Providers/TestProviders/CMPI/TestFail_1/tests/TestCMPI_Fail_1.cpp
@@ -29,8 +29,6 @@
//
//==============================================================================
//
-// Author: Konrad Rzeszutek <konradr@us.ibm.com>
-//
//%/////////////////////////////////////////////////////////////////////////////
#include <Pegasus/Common/Config.h>
@@ -48,7 +46,7 @@ PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;
-CIMNamespaceName ProviderNamespace;
+CIMNamespaceName providerNamespace;
const CIMName CLASSNAME = CIMName ("TestCMPI_Fail_1");
const String ERROR = "CIM_ERR_FAILED: A general error occurred that is not covered by a more specific error code: \"ProviderInitFailure: Error initializing TestCMPIFail_1Provider the following API(s): TestCMPIFail_1Provider_Create_InstanceMI, TestCMPIFail_1Provider_Create_AssociationMI, TestCMPIFail_1Provider_Create_MethodMI, TestCMPIFail_1Provider_Create_PropertyMI, TestCMPIFail_1Provider_Create_IndicationMI\"";
const String RCMPI_ERROR = "CIM_ERR_FAILED: A general error occurred that is not covered by a more specific error code: \"ProviderInitFailure: Error initializing the API's _Create<mi-type>MI\"";
@@ -58,7 +56,7 @@ Boolean verbose;
void
_usage ()
{
- cerr << "Usage: TestCMPI_Fail_1 " << "{test} {namespace}" << endl;
+ cerr << "Usage: TestCMPI_Fail_1 {test} {namespace}" << endl;
}
void
@@ -66,7 +64,7 @@ test01 (CIMClient & client)
{
try {
- Array<CIMObjectPath> array = client.enumerateInstanceNames (ProviderNamespace,
+ Array<CIMObjectPath> array = client.enumerateInstanceNames (providerNamespace,
CLASSNAME);
} catch (const CIMException &e)
{
@@ -91,8 +89,6 @@ _test (CIMClient & client)
cerr << "test failed: " << e.getMessage () << endl;
exit (-1);
}
-
- cout << "+++++ test completed successfully" << endl;
}
@@ -123,7 +119,7 @@ main (int argc, char **argv)
if (String::equalNoCase (opt, "test"))
{
- ProviderNamespace = CIMNamespaceName (argv[2]);
+ providerNamespace = CIMNamespaceName (argv[2]);
_test (client);
}
else
@@ -134,5 +130,7 @@ main (int argc, char **argv)
}
}
+ cout << argv[0] << " +++++ passed all tests" << endl;
+
return 0;
}
diff --git a/src/Providers/TestProviders/CMPI/TestFail_2/tests/Makefile b/src/Providers/TestProviders/CMPI/TestFail_2/tests/Makefile
index 51c2ea1..13b5158 100644
--- a/src/Providers/TestProviders/CMPI/TestFail_2/tests/Makefile
+++ b/src/Providers/TestProviders/CMPI/TestFail_2/tests/Makefile
@@ -49,11 +49,12 @@ include $(ROOT)/test/config.mak
tests:
poststarttests:
- @$(PROGRAM) test test/TestProvider
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#ifdef PEGASUS_ENABLE_REMOTE_CMPI
- @$(ECHO) Testing with remote namespace
- @$(PROGRAM) test test/Remote/Localhost
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#endif
+ $(PROGRAM) test test/TestProvider
+ifdef PEGASUS_ENABLE_REMOTE_CMPI
+ @$(ECHO) Testing with remote namespace
+ $(PROGRAM) test test/Remote/Localhost
+else
+ @$(ECHO) "+++++ PEGASUS_ENABLE_REMOTE_CMPI is NOT defined: Skipping remote CMPI tests"
+endif
+
install:
diff --git a/src/Providers/TestProviders/CMPI/TestFail_2/tests/TestCMPI_Fail_2.cpp b/src/Providers/TestProviders/CMPI/TestFail_2/tests/TestCMPI_Fail_2.cpp
index 9214636..2cb51fc 100644
--- a/src/Providers/TestProviders/CMPI/TestFail_2/tests/TestCMPI_Fail_2.cpp
+++ b/src/Providers/TestProviders/CMPI/TestFail_2/tests/TestCMPI_Fail_2.cpp
@@ -29,8 +29,6 @@
//
//==============================================================================
//
-// Author: Konrad Rzeszutek <konradr@us.ibm.com>
-//
//%/////////////////////////////////////////////////////////////////////////////
#include <Pegasus/Common/Config.h>
@@ -48,7 +46,7 @@ PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;
-CIMNamespaceName ProviderNamespace;
+CIMNamespaceName providerNamespace;
const CIMName CLASSNAME = CIMName ("TestCMPI_Fail_2");
const String ERROR_SUBSTRING = "Provider is not a CMPI style provider. Cannot find TestCMPIFail_2Provider_Create<mi-type>MI symbol.";
const String RCMPI_ERROR = "CIM_ERR_FAILED: A general error occurred that is not covered by a more specific error code: \"ProviderInitFailure: Error initializing the API's _Create<mi-type>MI\"";
@@ -58,7 +56,7 @@ Boolean verbose;
void
_usage ()
{
- cerr << "Usage: TestCMPI_Fail_2 " << "{test} {namespace}" << endl;
+ cerr << "Usage: TestCMPI_Fail_2 {test} {namespace}" << endl;
}
void
@@ -66,7 +64,7 @@ test01 (CIMClient & client)
{
try {
- Array<CIMObjectPath> array = client.enumerateInstanceNames (ProviderNamespace,
+ Array<CIMObjectPath> array = client.enumerateInstanceNames (providerNamespace,
CLASSNAME);
} catch (const CIMException &e)
{
@@ -91,8 +89,6 @@ _test (CIMClient & client)
cerr << "test failed: " << e.getMessage () << endl;
exit (-1);
}
-
- cout << "+++++ test completed successfully" << endl;
}
@@ -123,7 +119,7 @@ main (int argc, char **argv)
if (String::equalNoCase (opt, "test"))
{
- ProviderNamespace = CIMNamespaceName (argv[2]);
+ providerNamespace = CIMNamespaceName (argv[2]);
_test (client);
}
else
@@ -134,5 +130,7 @@ main (int argc, char **argv)
}
}
+ cout << argv[0] << " +++++ passed all tests" << endl;
+
return 0;
}
diff --git a/src/Providers/TestProviders/CMPI/TestFail_3/tests/Makefile b/src/Providers/TestProviders/CMPI/TestFail_3/tests/Makefile
index 99ed2a2..df3f29f 100644
--- a/src/Providers/TestProviders/CMPI/TestFail_3/tests/Makefile
+++ b/src/Providers/TestProviders/CMPI/TestFail_3/tests/Makefile
@@ -49,13 +49,12 @@ include $(ROOT)/test/config.mak
tests:
poststarttests:
- @$(PROGRAM) test test/TestProvider
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#ifdef PEGASUS_ENABLE_REMOTE_CMPI
- @$(ECHO) Testing with remote namespace
- @$(PROGRAM) test test/Remote/Localhost
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#endif
-
+ $(PROGRAM) test test/TestProvider
+ifdef PEGASUS_ENABLE_REMOTE_CMPI
+ @$(ECHO) Testing with remote namespace
+ $(PROGRAM) test test/Remote/Localhost
+else
+ @$(ECHO) "+++++ PEGASUS_ENABLE_REMOTE_CMPI is NOT defined: Skipping remote CMPI tests"
+endif
install:
diff --git a/src/Providers/TestProviders/CMPI/TestFail_3/tests/TestCMPI_Fail_3.cpp b/src/Providers/TestProviders/CMPI/TestFail_3/tests/TestCMPI_Fail_3.cpp
index 3920c7c..c6155e1 100644
--- a/src/Providers/TestProviders/CMPI/TestFail_3/tests/TestCMPI_Fail_3.cpp
+++ b/src/Providers/TestProviders/CMPI/TestFail_3/tests/TestCMPI_Fail_3.cpp
@@ -29,8 +29,6 @@
//
//==============================================================================
//
-// Author: Konrad Rzeszutek <konradr@us.ibm.com>
-//
//%/////////////////////////////////////////////////////////////////////////////
#include <Pegasus/Common/Config.h>
@@ -48,7 +46,7 @@ PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;
-CIMNamespaceName ProviderNamespace;
+CIMNamespaceName providerNamespace;
const CIMName CLASSNAME = CIMName ("TestCMPI_Fail_3");
const String ERROR_SUBSTRING = "TestCMPIFail_3Provider) conflicting generic/specfic CMPI style provider.";
const String RCMPI_ERROR = "CIM_ERR_FAILED: A general error occurred that is not covered by a more specific error code: \"ProviderInitFailure: Error initializing the API's _Create<mi-type>MI\"";
@@ -58,7 +56,7 @@ Boolean verbose;
void
_usage ()
{
- cerr << "Usage: TestCMPI_Fail_3 " << "{test} {namespace}" << endl;
+ cerr << "Usage: TestCMPI_Fail_3 {test} {namespace}" << endl;
}
void
@@ -66,7 +64,7 @@ test01 (CIMClient & client)
{
try {
- Array<CIMObjectPath> array = client.enumerateInstanceNames (ProviderNamespace,
+ Array<CIMObjectPath> array = client.enumerateInstanceNames (providerNamespace,
CLASSNAME);
} catch (const CIMException &e)
{
@@ -91,8 +89,6 @@ _test (CIMClient & client)
cerr << "test failed: " << e.getMessage () << endl;
exit (-1);
}
-
- cout << "+++++ test completed successfully" << endl;
}
@@ -123,7 +119,7 @@ main (int argc, char **argv)
if (String::equalNoCase (opt, "test"))
{
- ProviderNamespace = CIMNamespaceName (argv[2]);
+ providerNamespace = CIMNamespaceName (argv[2]);
_test (client);
}
else
@@ -134,5 +130,7 @@ main (int argc, char **argv)
}
}
+ cout << argv[0] << " +++++ passed all tests" << endl;
+
return 0;
}
diff --git a/src/Providers/TestProviders/CMPI/TestMethod/tests/Makefile b/src/Providers/TestProviders/CMPI/TestMethod/tests/Makefile
index e77007f..697e66e 100644
--- a/src/Providers/TestProviders/CMPI/TestMethod/tests/Makefile
+++ b/src/Providers/TestProviders/CMPI/TestMethod/tests/Makefile
@@ -60,16 +60,16 @@ tests:
poststarttests:
@$(RM) $(LOGFILES).log
- @$(ECHO) $(PROGRAM) test
- @$(PROGRAM) test test/TestProvider
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
+ $(PROGRAM) test test/TestProvider
@$(DIFF) $(TEST_LOGFILES).loggood $(LOGFILES).log
- @$(ECHO) +++ $(TEST_LOGFILES).loggood passed successfully +++
+ @$(ECHO) $(PROGRAM) "+++++ passed all tests"
@$(RM) $(LOGFILES).log
-#ifdef PEGASUS_ENABLE_REMOTE_CMPI
- @$(ECHO) Testing with remote namespace
- @$(PROGRAM) test test/Remote/Localhost
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#endif
+ifdef PEGASUS_ENABLE_REMOTE_CMPI
+ @$(ECHO) Testing with remote namespace
+ $(PROGRAM) test test/Remote/Localhost
+ @$(ECHO) $(PROGRAM) "+++++ passed all tests"
+else
+ @$(ECHO) "+++++ PEGASUS_ENABLE_REMOTE_CMPI is NOT defined: Skipping remote CMPI tests"
+endif
install:
diff --git a/src/Providers/TestProviders/CMPI/TestMethod/tests/TestCMPIMethod.cpp b/src/Providers/TestProviders/CMPI/TestMethod/tests/TestCMPIMethod.cpp
index 6535323..613a99c 100644
--- a/src/Providers/TestProviders/CMPI/TestMethod/tests/TestCMPIMethod.cpp
+++ b/src/Providers/TestProviders/CMPI/TestMethod/tests/TestCMPIMethod.cpp
@@ -29,8 +29,6 @@
//
//==============================================================================
//
-// Author: Konrad Rzeszutek <konradr@us.ibm.com>
-//
//%/////////////////////////////////////////////////////////////////////////////
#include <Pegasus/Common/Config.h>
@@ -48,7 +46,7 @@ PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;
-CIMNamespaceName ProviderNamespace;
+CIMNamespaceName providerNamespace;
const CIMName CLASSNAME = CIMName ("TestCMPI_Method");
Boolean verbose;
@@ -114,7 +112,7 @@ _checkUint32Value (CIMValue & theValue, Uint32 value)
void
_usage ()
{
- cerr << "Usage: TestCMPIMethod " << "{test}" << endl;
+ cerr << "Usage: TestCMPIMethod {test} {namespace}" << endl;
}
void
@@ -122,7 +120,7 @@ test01 (CIMClient & client)
{
CIMObjectPath instanceName;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
@@ -130,7 +128,7 @@ test01 (CIMClient & client)
/* String returnUint32(); */
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"returnUint32",
inParams,
@@ -143,7 +141,7 @@ test02 (CIMClient & client)
{
CIMObjectPath instanceName;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
@@ -151,7 +149,7 @@ test02 (CIMClient & client)
/* String returnString(); */
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"returnString",
inParams,
@@ -166,7 +164,7 @@ test03 (CIMClient & client)
{
CIMObjectPath instanceName;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
@@ -186,7 +184,7 @@ test03 (CIMClient & client)
{
/* CDGetType */
inParams.append (CIMParamValue ("Operation", CIMValue (Uint32 (1))));
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"TestCMPIBroker",
inParams,
@@ -203,7 +201,7 @@ test03 (CIMClient & client)
{
/* CDToString */
inParams.append (CIMParamValue ("Operation", CIMValue (Uint32 (2))));
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"TestCMPIBroker",
inParams,
@@ -220,7 +218,7 @@ test03 (CIMClient & client)
{
/* CDIsOfType */
inParams.append (CIMParamValue ("Operation", CIMValue (Uint32 (3))));
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"TestCMPIBroker",
inParams,
@@ -237,7 +235,7 @@ test03 (CIMClient & client)
{
/* CDGetMessage */
inParams.append (CIMParamValue ("Operation", CIMValue (Uint32 (4))));
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"TestCMPIBroker",
inParams,
@@ -254,7 +252,7 @@ test03 (CIMClient & client)
{
/* CDLogMessage */
inParams.append (CIMParamValue ("Operation", CIMValue (Uint32 (5))));
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"TestCMPIBroker",
inParams,
@@ -273,7 +271,7 @@ test03 (CIMClient & client)
{
/* CDTraceMessage */
inParams.append (CIMParamValue ("Operation", CIMValue (Uint32 (6))));
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"TestCMPIBroker",
inParams,
@@ -293,7 +291,7 @@ test04 (CIMClient & client)
{
CIMObjectPath instanceName;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
@@ -301,7 +299,7 @@ test04 (CIMClient & client)
/* [EmbeddedObject] String returnInstance(); */
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"returnInstance",
inParams,
@@ -323,7 +321,7 @@ test05 (CIMClient & client)
{
CIMObjectPath instanceName;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
@@ -331,7 +329,7 @@ test05 (CIMClient & client)
/* String returnDateTime(); */
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"returnDateTime",
inParams,
@@ -346,7 +344,7 @@ test06 (CIMClient & client)
{
CIMObjectPath instanceName;
Uint32 exception =0;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
@@ -354,7 +352,7 @@ test06 (CIMClient & client)
/* String returnDateTime(); */
try {
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"noSuchFunction",
inParams,
@@ -371,14 +369,14 @@ test07 (CIMClient & client)
{
CIMObjectPath instanceName;
Uint32 exception =0;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
Array < CIMParamValue > outParams;
inParams.append (CIMParamValue ("Operation", CIMValue (String ("Boom"))));
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"TestCMPIBroker",
inParams,
@@ -390,14 +388,14 @@ test08 (CIMClient & client)
{
CIMObjectPath instanceName;
Uint32 exception =0;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
Array < CIMParamValue > outParams;
inParams.append (CIMParamValue ("Operation", CIMValue (Uint64 (1))));
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"TestCMPIBroker",
inParams,
@@ -415,7 +413,7 @@ void test09 (CIMClient & client)
{
CIMObjectPath instanceName;
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName (CLASSNAME);
Array < CIMParamValue > inParams;
@@ -423,7 +421,7 @@ void test09 (CIMClient & client)
/* [EmbeddedObject] String returnInstance(); */
- CIMValue retValue = client.invokeMethod (ProviderNamespace,
+ CIMValue retValue = client.invokeMethod (providerNamespace,
instanceName,
"returnInstance",
inParams,
@@ -444,7 +442,7 @@ void test09 (CIMClient & client)
inParams.append(
CIMParamValue(String("inputInstance"), CIMValue(inputInstance)));
- retValue = client.invokeMethod (ProviderNamespace,
+ retValue = client.invokeMethod (providerNamespace,
instanceName,
"processEmbeddedInstance",
inParams,
@@ -507,7 +505,7 @@ _test (CIMClient & client)
test08 (client);
#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
// Don't run against the remote-namespace, not yet suppoted.
- if (ProviderNamespace == "test/TestProvider")
+ if (providerNamespace == "test/TestProvider")
{
test09 (client); // Embedded Instance Test
}
@@ -519,8 +517,6 @@ _test (CIMClient & client)
cerr << "test failed: " << e.getMessage () << endl;
exit (-1);
}
-
- cout << "+++++ test completed successfully" << endl;
}
@@ -551,7 +547,7 @@ main (int argc, char **argv)
if (String::equalNoCase (opt, "test"))
{
- ProviderNamespace = CIMNamespaceName (argv[2]);
+ providerNamespace = CIMNamespaceName (argv[2]);
_test (client);
}
else
@@ -562,5 +558,7 @@ main (int argc, char **argv)
}
}
+ cout << argv[0] << " +++++ completed" << endl;
+
return 0;
}
diff --git a/src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/Makefile b/src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/Makefile
index 50fdb7d..9010e9d 100644
--- a/src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/Makefile
+++ b/src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/Makefile
@@ -49,13 +49,12 @@ include $(ROOT)/test/config.mak
tests:
poststarttests:
- @$(PROGRAM) test test/TestProvider
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#ifdef PEGASUS_ENABLE_REMOTE_CMPI
- @$(ECHO) Testing with remote namespace
- @$(PROGRAM) test test/Remote/Localhost
- @$(ECHO) +++ $(PROGRAM) passed successfully +++
-#endif
-
+ $(PROGRAM) test test/TestProvider
+ifdef PEGASUS_ENABLE_REMOTE_CMPI
+ @$(ECHO) Testing with remote namespace
+ $(PROGRAM) test test/Remote/Localhost
+else
+ @$(ECHO) "+++++ PEGASUS_ENABLE_REMOTE_CMPI is NOT defined: Skipping remote CMPI tests"
+endif
install:
diff --git a/src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/TestCMPIThreadProvider.cpp b/src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/TestCMPIThreadProvider.cpp
index eda4344..e5ba77a 100644
--- a/src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/TestCMPIThreadProvider.cpp
+++ b/src/Providers/TestProviders/CMPI/TestProviderThreaded/tests/TestCMPIThreadProvider.cpp
@@ -29,8 +29,6 @@
//
//==============================================================================
//
-// Author: Konrad Rzeszutek <konradr@us.ibm.com>
-//
//%/////////////////////////////////////////////////////////////////////////////
#include <Pegasus/Common/Config.h>
@@ -47,14 +45,14 @@
PEGASUS_USING_PEGASUS;
PEGASUS_USING_STD;
-CIMNamespaceName ProviderNamespace;
+CIMNamespaceName providerNamespace;
Boolean verbose;
void
_usage ()
{
- cerr << "Usage: TestCMPIThreadProvider " << "{test} {namespace}" << endl;
+ cerr << "Usage: TestCMPIThreadProvider {test} {namespace}" << endl;
}
void
@@ -62,7 +60,7 @@ test01( CIMClient & client)
{
try {
Array<CIMInstance> instances = client.enumerateInstances(
- ProviderNamespace,
+ providerNamespace,
CIMName("TestCMPI_Thread"));
} catch (const CIMException &e)
{
@@ -83,14 +81,14 @@ test02 (CIMClient & client)
"TestCMPI_Thread",
CIMKeyBinding::STRING));
- instanceName.setNameSpace (ProviderNamespace);
+ instanceName.setNameSpace (providerNamespace);
instanceName.setClassName ("TestCMPI_Thread");
instanceName.setKeyBindings (keyBindings);
/* Call the unsupported functions of the provider. */
try
{
- CIMInstance instance (client.getInstance (ProviderNamespace,
+ CIMInstance instance (client.getInstance (providerNamespace,
instanceName));
} catch (const CIMException &)
{
@@ -100,7 +98,7 @@ test02 (CIMClient & client)
try
{
- client.deleteInstance (ProviderNamespace, instanceName);
+ client.deleteInstance (providerNamespace, instanceName);
} catch (const CIMException & )
{
@@ -111,7 +109,7 @@ test02 (CIMClient & client)
try
{
- CIMObjectPath objectPath (client.createInstance (ProviderNamespace,
+ CIMObjectPath objectPath (client.createInstance (providerNamespace,
newInstance));
@@ -122,7 +120,7 @@ test02 (CIMClient & client)
try
{
- client.modifyInstance (ProviderNamespace, newInstance);
+ client.modifyInstance (providerNamespace, newInstance);
} catch (const CIMException &)
{
@@ -132,7 +130,7 @@ test02 (CIMClient & client)
{
Array < CIMInstance > instances =
- client.enumerateInstances (ProviderNamespace,
+ client.enumerateInstances (providerNamespace,
CIMName ("TestCMPI_Thread"));
} catch (const CIMException &)
{
@@ -142,7 +140,7 @@ test02 (CIMClient & client)
try
{
Array < CIMObjectPath > objectPaths =
- client.enumerateInstanceNames (ProviderNamespace,
+ client.enumerateInstanceNames (providerNamespace,
CIMName ("TestCMPI_Thread"));
} catch (const CIMException &)
{
@@ -190,8 +188,6 @@ _test (CIMClient & client)
cerr << "test failed: " << e.getMessage () << endl;
exit (-1);
}
-
- cout << "+++++ test completed successfully" << endl;
}
@@ -222,7 +218,7 @@ main (int argc, char **argv)
if (String::equalNoCase (opt, "test"))
{
- ProviderNamespace = CIMNamespaceName (argv[2]);
+ providerNamespace = CIMNamespaceName (argv[2]);
_test (client);
}
else
@@ -233,5 +229,7 @@ main (int argc, char **argv)
}
}
+ cout << argv[0] << " +++++ passed all tests" << endl;
+
return 0;
}