- Add summary of catched expression for easier output parsing from Dejagnu

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@595 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
tchernobog 2006-05-31 08:28:08 +00:00
parent 95d3da2041
commit 16acaf51d9
1 changed files with 9 additions and 0 deletions

View File

@ -53,6 +53,8 @@ main(int argc, char** argv) {
using namespace sgpem; using namespace sgpem;
using namespace std; using namespace std;
int successes = 0;
if(argc != 2) { if(argc != 2) {
std::cout << "[EE] Usage:\n\t" << argv[0] << std::cout << "[EE] Usage:\n\t" << argv[0] <<
" path/to/uninstalled/policies" << std::endl; " path/to/uninstalled/policies" << std::endl;
@ -73,6 +75,7 @@ main(int argc, char** argv) {
catch(UserInterruptException e) catch(UserInterruptException e)
{ {
cout << "configure: Caught UserInterruptException" << endl; cout << "configure: Caught UserInterruptException" << endl;
successes++;
} }
@ -84,6 +87,7 @@ main(int argc, char** argv) {
catch(UserInterruptException e) catch(UserInterruptException e)
{ {
cout << "is_preemptive: Caught UserInterruptException" << endl; cout << "is_preemptive: Caught UserInterruptException" << endl;
successes++;
} }
try try
@ -94,6 +98,7 @@ main(int argc, char** argv) {
catch(UserInterruptException e) catch(UserInterruptException e)
{ {
cout << "get_time_slice: Caught UserInterruptException" << endl; cout << "get_time_slice: Caught UserInterruptException" << endl;
successes++;
} }
@ -106,7 +111,11 @@ main(int argc, char** argv) {
catch(UserInterruptException e) catch(UserInterruptException e)
{ {
cout << "sort_queue: Caught UserInterruptException" << endl; cout << "sort_queue: Caught UserInterruptException" << endl;
successes++;
} }
cout << "Result: catched " << successes
<< " exceptions out of 4." << endl;
exit(0); exit(0);
} }