Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If unit test fails, return a non-zero exit code #6317

Merged
merged 1 commit into from
Nov 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CondCore/DBCommon/test/testCondObjCopy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ int main(){
std::cout<<"committed"<<std::endl;
}catch(cond::Exception& er){
std::cout<<er.what()<<std::endl;
return -1;
}catch(std::exception& er){
std::cout<<er.what()<<std::endl;
return -1;
}catch(...){
std::cout<<"Funny error"<<std::endl;
return -1;
}
return 0;
}
3 changes: 3 additions & 0 deletions CondCore/DBCommon/test/testDbSession.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ int main(){
std::cout << "Session is correctly open."<<std::endl;
} catch ( const cond::Exception& exc ){
std::cout << "ERROR: "<<exc.what()<<std::endl;
return -1;
}
std::cout << "######### test 6"<<std::endl;
s.close();
Expand All @@ -73,6 +74,7 @@ int main(){
s2.transaction().commit();
} catch ( const cond::Exception& exc ){
std::cout << "ERROR: "<<exc.what()<<std::endl;
return -1;
}
std::cout << "######### test 8"<<std::endl;
// closing connection...
Expand All @@ -89,5 +91,6 @@ int main(){
} catch ( const ora::Exception& exc ){
std::cout << "Expected error: "<<exc.what()<<std::endl;
}
return 0;

}
2 changes: 2 additions & 0 deletions CondCore/DBCommon/test/testDbSessionIO.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,7 @@ int main(){
s0.transaction().commit();
} catch ( const cond::Exception& exc ){
std::cout << "ERROR: "<<exc.what()<<std::endl;
return -1;
}
return 0;
}
1 change: 1 addition & 0 deletions CondCore/DBCommon/test/testTechnologyPlugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ int main(){
}
} catch ( const std::exception & er) {
std::cout << "Error: " << er.what()<<std::endl;
return -1;
}
return 0;
}
Expand Down
3 changes: 3 additions & 0 deletions CondCore/IOVService/test/testIOVCopy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ int main(){
std::cout<<"editor deleted"<<std::endl;
}catch(const cond::Exception& er){
std::cout<<"error "<<er.what()<<std::endl;
return -1;
}catch(const std::exception& er){
std::cout<<"std error "<<er.what()<<std::endl;
return -1;
}
return 0;
}
3 changes: 3 additions & 0 deletions CondCore/IOVService/test/testIOVDelete.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ int main(){
pooldb.transaction().commit();
}catch(const cond::Exception& er){
std::cout<<"error "<<er.what()<<std::endl;
return -1;
}catch(const std::exception& er){
std::cout<<"std error "<<er.what()<<std::endl;
return -1;
}
return 0;
}
3 changes: 3 additions & 0 deletions CondCore/IOVService/test/testIOVEditor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ int main(){

}catch(const cond::Exception& er){
std::cout<<"error "<<er.what()<<std::endl;
return -1;
}catch(const std::exception& er){
std::cout<<"std error "<<er.what()<<std::endl;
return -1;
}
return 0;
}
3 changes: 3 additions & 0 deletions CondCore/IOVService/test/testIOVIterator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ int main(){
}
}catch(const cond::Exception& er){
std::cout<<"error "<<er.what()<<std::endl;
return -1;
}catch(const std::exception& er){
std::cout<<"std error "<<er.what()<<std::endl;
return -1;
}
return 0;
}
3 changes: 3 additions & 0 deletions CondCore/IOVService/test/testIOVReplaceInterval.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,10 @@ int main(){
delete session;
}catch(const cond::Exception& er){
std::cout<<"error "<<er.what()<<std::endl;
return -1;
}catch(const std::exception& er){
std::cout<<"std error "<<er.what()<<std::endl;
return -1;
}
return 0;
}
3 changes: 3 additions & 0 deletions CondCore/IOVService/test/testqueryPContainer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ int main(){
}
}catch(const cond::Exception& er){
std::cout<<"error "<<er.what()<<std::endl;
return -1;
}catch(const std::exception& er){
std::cout<<"std error "<<er.what()<<std::endl;
return -1;
}
return 0;
}
1 change: 1 addition & 0 deletions CondCore/ORA/test/TestBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ namespace ora {
serializer.release();
}catch ( const std::exception& exc ){
std::cout << "### TEST "<<m_testName<<" ERROR: "<<exc.what()<<std::endl;
exit(-1);
}
}

Expand Down