Home || Architecture || Video Search || Visual Search || Scripts || Applications || 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     if (TeamCity::TeamCityUsed())
00053         if (TeamCity::UnderTeamCity() || options.GetBool("verb"))
00054             listener = TeamCity::GetTestListener();
00055     if (listener == 0)
00056         listener = new BriefTestProgressListener();
00057     controller.addListener(listener);
00058 
00059     // Create the test runner and provide it with the top test object
00060     TestRunner runner;
00061     runner.addTest(TestFactoryRegistry::getRegistry().makeTest());
00062 
00063     // Run all tests
00064 
00065 #ifdef NO_DIALOGONCRASH
00066 #ifdef WIN32
00067     DWORD oldMode = ::SetErrorMode(SEM_NOGPFAULTERRORBOX);
00068     ::SetErrorMode(oldMode | SEM_NOGPFAULTERRORBOX);
00069 #endif
00070 #endif
00071 
00072     runner.run(controller);
00073     
00074     // Finish work
00075     delete listener;
00076     return resultCollector.wasSuccessful() ? 0 : 1;
00077 }

Here is the call graph for this function:


Generated on Fri Mar 19 09:40:25 2010 for ImpalaSrc by  doxygen 1.5.1