(file) Return to StressTestControllerMain.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / test / StressTestController

Diff for /pegasus/test/StressTestController/StressTestControllerMain.cpp between version 1.5 and 1.6

version 1.5, 2007/08/10 21:30:29 version 1.6, 2008/02/22 19:23:48
Line 95 
Line 95 
     char strTime[256];     char strTime[256];
     struct tm tmTime;     struct tm tmTime;
     int rc;     int rc;
     String fileName = String::EMPTY;      String fileName;
     ofstream log_file;     ofstream log_file;
  
  
Line 112 
Line 112 
         cout<<StressTestControllerCommand::COMMAND_NAME\         cout<<StressTestControllerCommand::COMMAND_NAME\
             <<"::Failed to generate required files for tests. "<<endl;             <<"::Failed to generate required files for tests. "<<endl;
         command.removeUnusedFiles();         command.removeUnusedFiles();
         exit (Command::RC_ERROR);          return Command::RC_ERROR;
     }     }
  
     //     //
Line 125 
Line 125 
        log_file.close();        log_file.close();
        cout<<"Cannot get file "<<command.getStressTestLogFile()<<endl;        cout<<"Cannot get file "<<command.getStressTestLogFile()<<endl;
        command.removeUnusedFiles();        command.removeUnusedFiles();
        exit (Command::RC_ERROR);         return Command::RC_ERROR;
     }     }
     strftime(strTime,256,"%d/%m/%Y at %H:%M:%S\n",&tmTime);     strftime(strTime,256,"%d/%m/%Y at %H:%M:%S\n",&tmTime);
     log_file<<StressTestControllerCommand::COMMAND_NAME\     log_file<<StressTestControllerCommand::COMMAND_NAME\
Line 174 
Line 174 
  
         log_file.close();         log_file.close();
         command.removeUnusedFiles();         command.removeUnusedFiles();
         exit (Command::RC_ERROR);          return Command::RC_ERROR;
     }     }
     catch (...)     catch (...)
     {     {
Line 184 
Line 184 
             "::Unknown exception caught when setting commands."<<endl;             "::Unknown exception caught when setting commands."<<endl;
         log_file.close();         log_file.close();
         command.removeUnusedFiles();         command.removeUnusedFiles();
         exit (Command::RC_ERROR);          return Command::RC_ERROR;
     }     }
  
     //     //
Line 200 
Line 200 
         // Log file not required when help or verbose is opted.         // Log file not required when help or verbose is opted.
         //         //
         FileSystem::removeFile(command.getStressTestLogFile());         FileSystem::removeFile(command.getStressTestLogFile());
         exit (rc);          return rc;
     }     }
  
     String filename;     String filename;
Line 222 
Line 222 
             //             //
             // Check for file in default directory as well             // Check for file in default directory as well
             //             //
             fileName = String::EMPTY;              fileName = StressTestControllerCommand::DEFAULT_CFGDIR;
             fileName.append(StressTestControllerCommand::DEFAULT_CFGDIR);  
             fileName.append(filename);             fileName.append(filename);
  
             if (!FileSystem::exists(fileName))             if (!FileSystem::exists(fileName))
Line 233 
Line 232 
                 cerr << "\" does not exist."<<endl;                 cerr << "\" does not exist."<<endl;
                 log_file.close();                 log_file.close();
                 command.removeUnusedFiles();                 command.removeUnusedFiles();
                 exit (Command::RC_ERROR);                  return Command::RC_ERROR;
             }             }
             log_file<<StressTestControllerCommand::COMMAND_NAME<<             log_file<<StressTestControllerCommand::COMMAND_NAME<<
                 "::Using config file: "<<fileName<<endl;                 "::Using config file: "<<fileName<<endl;
Line 253 
Line 252 
         //         //
         // Use default file in default dir.         // Use default file in default dir.
         //         //
         fileName = String::EMPTY;          fileName = StressTestControllerCommand::DEFAULT_CFGDIR;
         fileName.append(StressTestControllerCommand::DEFAULT_CFGDIR);  
         fileName.append(StressTestControllerCommand::FILENAME);         fileName.append(StressTestControllerCommand::FILENAME);
         //         //
         // Use hard coded default configuration values if default conf. file         // Use hard coded default configuration values if default conf. file
Line 313 
Line 311 
             ": " << msg <<  endl;             ": " << msg <<  endl;
         log_file.close();         log_file.close();
         command.removeUnusedFiles();         command.removeUnusedFiles();
         exit (Command::RC_ERROR);          return Command::RC_ERROR;
   
     }     }
     catch (Exception& e )     catch (Exception& e )
     {     {
Line 327 
Line 324 
         cerr << msg <<  endl;         cerr << msg <<  endl;
         log_file.close();         log_file.close();
         command.removeUnusedFiles();         command.removeUnusedFiles();
         exit (Command::RC_ERROR);          return Command::RC_ERROR;
     }     }
     catch (...)     catch (...)
     {     {
Line 337 
Line 334 
             "::Unknown exception caught when acquiring configuration."<<endl;             "::Unknown exception caught when acquiring configuration."<<endl;
         log_file.close();         log_file.close();
         command.removeUnusedFiles();         command.removeUnusedFiles();
         exit (Command::RC_ERROR);          return Command::RC_ERROR;
     }     }
  
     log_file << StressTestControllerCommand::COMMAND_NAME <<     log_file << StressTestControllerCommand::COMMAND_NAME <<
Line 368 
Line 365 
             "::Failed to Generate Client Commands."<<  endl;             "::Failed to Generate Client Commands."<<  endl;
         log_file.close();         log_file.close();
         command.removeUnusedFiles();         command.removeUnusedFiles();
         exit (Command::RC_ERROR);          return Command::RC_ERROR;
     }     }
  
     //     //
Line 420 
Line 417 
     cout <<" Client log:     "<<     cout <<" Client log:     "<<
         FileSystem::extractFileName(command.getStressClientLogFile())<<endl;         FileSystem::extractFileName(command.getStressClientLogFile())<<endl;
     log_file.close();     log_file.close();
     exit (rc);  
     return rc;     return rc;
 } /* main */ } /* main */


Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2