int main(int argc, char** argv) { verbose = (getenv ("PEGASUS_TEST_VERBOSE")) ? true : false; if (verbose) { cout << argv[0] << ": started" << endl; } const char* tmpDir = getenv ("PEGASUS_TMP"); String repositoryRoot; if (tmpDir == NULL) { repositoryRoot = "."; } else { repositoryRoot = tmpDir; } repositoryRoot.append("/repository"); CIMRepository r (repositoryRoot) ; ProviderRegistrationManager prmanager(&r); try { TestCreateInstances(prmanager); } catch(Exception& e) { PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); PEGASUS_STD (cout) << argv[0] << " +++++ create instances failed" << PEGASUS_STD (endl); exit(-1); } PEGASUS_STD(cout) << argv[0] << " +++++ passed all tests" << PEGASUS_STD(endl); return 0; }
int main(int argc, char** argv) { try { CIMClient client; client.connectLocal(); TestCreateInstances(client); } catch(Exception& e) { PEGASUS_STD(cerr) << "Error: " << e.getMessage() << PEGASUS_STD(endl); PEGASUS_STD (cout) << "+++++ create instances failed" << PEGASUS_STD (endl); exit(-1); } PEGASUS_STD(cout) << "+++++ passed all tests" << PEGASUS_STD(endl); exit (0); }