StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TestMain.C
1 #include <TSystem.h>
2 
3 #include <cppunit/BriefTestProgressListener.h>
4 #include <cppunit/CompilerOutputter.h>
5 #include <cppunit/extensions/TestFactoryRegistry.h>
6 #include <cppunit/TestResult.h>
7 #include <cppunit/TestResultCollector.h>
8 #include <cppunit/TestRunner.h>
9 
10 void loadSharedObjects();
11 
12 int
13 main( int argc, char* argv[] )
14 {
15  loadSharedObjects();
16 
17  // Create the event manager and test controller
18  CPPUNIT_NS::TestResult controller;
19 
20  // Add a listener that colllects test result
21  CPPUNIT_NS::TestResultCollector result;
22  controller.addListener( &result );
23 
24  // Add a listener that print dots as test run.
25  CPPUNIT_NS::BriefTestProgressListener progress;
26  controller.addListener( &progress );
27 
28  // Add the top suite to the test runner
29  CPPUNIT_NS::TestRunner runner;
30  runner.addTest( CPPUNIT_NS::TestFactoryRegistry::getRegistry().makeTest() );
31  runner.run( controller );
32 
33  // Print test in a compiler compatible format.
34  CPPUNIT_NS::CompilerOutputter outputter( &result, CPPUNIT_NS::stdCOut() );
35  outputter.write();
36 
37  return result.wasSuccessful() ? 0 : 1;
38 }
39 
40 void loadSharedObjects() {
41 
42  gSystem->Load("libTable.so");
43  gSystem->Load("libPhysics.so");
44  gSystem->Load("libStarRoot.so");
45  gSystem->Load("libSt_base.so");
46  gSystem->Load("libStChain.so");
47  gSystem->Load("libtpc_Tables.so");
48  gSystem->Load("libStarClassLibrary.so");
49  gSystem->Load("libStTpcDb.so");
50  gSystem->Load("libStDb_Tables.so");
51  gSystem->Load("libStDetectorDbMaker.so");
52  gSystem->Load("libStDbUtilities.so");
53  gSystem->Load("libStMcEvent.so");
54  gSystem->Load("libStMcEventMaker.so");
55  gSystem->Load("libStDaqLib.so");
56  gSystem->Load("libStEmcRawMaker.so");
57  gSystem->Load("libStEvent.so");
58  gSystem->Load("libStStrangeMuDstMaker.so");
59  gSystem->Load("libgeometry_Tables.so");
60  gSystem->Load("libStEmcUtil.so");
61  gSystem->Load("libStMuDSTMaker.so");
62  gSystem->Load("libStEmcADCtoEMaker.so");
63  gSystem->Load("libStEpcMaker.so");
64  gSystem->Load("libStEmcSimulatorMaker.so");
65  gSystem->Load("libStDbLib.so");
66  gSystem->Load("libStDbBroker.so");
67  gSystem->Load("libSt_db_Maker.so");
68  gSystem->Load("libStEEmcUtil.so");
69  gSystem->Load("libStEEmcDbMaker.so");
70  gSystem->Load("libStSpinDbMaker.so");
71  gSystem->Load("libStEmcTriggerMaker.so");
72  gSystem->Load("libStTriggerUtilities.so");
73  gSystem->Load("libStMCAsymMaker.so");
74  gSystem->Load("libStJetFinder.so");
75  gSystem->Load("libStJets.so");
76  gSystem->Load("libStJetSkimEvent.so");
77  gSystem->Load("libStJetMaker.so");
78 
79  gSystem->Load(".libs/libStJetMakerTest.so");
80 }