From bfaa82fd52cb0392219b6e08138f71f69ddc1879 Mon Sep 17 00:00:00 2001 From: srn Date: Wed, 6 Dec 2006 07:15:13 +0000 Subject: [PATCH] Added support of environment variables and preprocessor definitions --- src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx | 8 ++++---- src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx | 8 ++++---- src/SALOMEDS/Test/TestSALOMEDS.cxx | 4 +++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx index 7f20ec766..309035de7 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_AttributeTreeNode.cxx @@ -72,10 +72,8 @@ void SALOMEDSTest::testAttributeTreeNode() //Check method HasFather CPPUNIT_ASSERT(_attr1->HasFather()); - cout << endl << "THE TEST IS NOT COMPLETE !!!" << endl; - +#ifdef SALOMEDS_ALL_TESTS //Check method GetFather - /* CPPUNIT_ASSERT(_attr1->GetFather() == _attr); //Check method Append @@ -136,7 +134,9 @@ void SALOMEDSTest::testAttributeTreeNode() _attr2->SetTreeID(TreeNodeID); CPPUNIT_ASSERT(_attr2->GetTreeID() == TreeNodeID); - */ +#else + cout << endl << "THE TEST IS NOT COMPLETE !!!" << endl; +#endif sm->Close(study); } diff --git a/src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx b/src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx index fad6fc774..9ad472a06 100755 --- a/src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx +++ b/src/SALOMEDS/Test/SALOMEDSTest_UseCase.cxx @@ -65,10 +65,8 @@ void SALOMEDSTest::testUseCase() //Check method GetName CPPUNIT_ASSERT(builder->GetName() == "A root use case"); - cout << endl << "THE TEST IS NOT COMPLETE !!!" << endl; - +#ifdef SALOMEDS_ALL_TESTS //Check method GetUseCaseIterator - /* builder->SetRootCurrent(); _PTR(SObject) nullObject; _PTR(UseCaseIterator) root_it = builder->GetUseCaseIterator(nullObject); //The iterator on all UseCases @@ -80,7 +78,9 @@ void SALOMEDSTest::testUseCase() CPPUNIT_ASSERT(root_it->Value()->GetID() == root2->GetID()); root_it->Next(); CPPUNIT_ASSERT(!root_it->More()); - */ +#else + cout << endl << "THE TEST IS NOT COMPLETE !!!" << endl; +#endif builder->SetCurrentObject(root1); _PTR(UseCaseIterator) it = builder->GetUseCaseIterator(root1); //The iterator on the given UseCase diff --git a/src/SALOMEDS/Test/TestSALOMEDS.cxx b/src/SALOMEDS/Test/TestSALOMEDS.cxx index 53e633fbd..09a25a3ae 100644 --- a/src/SALOMEDS/Test/TestSALOMEDS.cxx +++ b/src/SALOMEDS/Test/TestSALOMEDS.cxx @@ -72,7 +72,9 @@ int main(int argc, char* argv[]) char hostname[511]; int size; gethostname(hostname, size); - string cfg_file = string(getenv("HOME"))+"/.omniORB_"+string(hostname)+"_2810.cfg"; + string port = getenv("SALOMEDS_UNITTESTS_PORT"); + if(port.empty()) port = "2810"; + string cfg_file = string(getenv("HOME"))+"/.omniORB_"+string(hostname)+"_"+port+".cfg"; setenv("OMNIORB_CONFIG", cfg_file.c_str(), 1); ORB_INIT &init = *SINGLETON_::Instance() ; -- 2.39.2