Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

int main ( int  argc,
char **  argv 
)

Definition at line 33 of file mainUnitTest.cpp.

References Impala::CmdOptions::GetBool(), Impala::CmdOptions::GetInstance(), ILOG_VAR, Impala::CmdOptions::Initialise(), and Impala::CmdOptions::ParseArgs().

00034 {
00035     // Setup logging and parse cmd line 
00036     Impala::CmdOptions& options = Impala::CmdOptions::GetInstance();
00037     options.Initialise(true, false, true);
00038     if (! options.ParseArgs(argc, argv, ""))
00039         return 1;
00040 
00041     ILOG_VAR(Impala.Test.mainUnitTest);
00042 
00043     // Create the event manager and test controller
00044     TestResult controller;
00045     
00046     // Add a listener that collects test results
00047     TestResultCollector resultCollector;
00048     controller.addListener(&resultCollector);
00049 
00050     // Add a test progress listener
00051     TestListener *listener = 0;
00052     TextOutputter* out = 0;
00053     if (TeamCity::TeamCityUsed())
00054         if (TeamCity::UnderTeamCity() || options.GetBool("verb"))
00055             listener = TeamCity::GetTestListener();
00056     if (listener == 0)
00057     {
00058         TestResultCollector* trl = new TestResultCollector();
00059         out = new TextOutputter(trl, std::cout);
00060         listener = trl;
00061     }
00062     controller.addListener(listener);
00063 
00064     // Create the test runner and provide it with the top test object
00065     TestRunner runner;
00066     runner.addTest(TestFactoryRegistry::getRegistry().makeTest());
00067 
00068     // Run all tests
00069 
00070 #ifdef NO_DIALOGONCRASH
00071 #ifdef WIN32
00072     DWORD oldMode = ::SetErrorMode(SEM_NOGPFAULTERRORBOX);
00073     ::SetErrorMode(oldMode | SEM_NOGPFAULTERRORBOX);
00074 #endif
00075 #endif
00076 
00077     runner.run(controller);
00078     
00079     // Finish work
00080     if(out)
00081     {
00082         out->write();
00083         delete out;
00084     }
00085     delete listener;
00086 
00087     return resultCollector.wasSuccessful() ? 0 : 1;
00088 }

Here is the call graph for this function:


Generated on Thu Jan 13 09:06:15 2011 for ImpalaSrc by  doxygen 1.5.1