Commits

Anonymous committed b024875

create TestTools-00-05-05-branch

  • Participants
  • Branches TestTools-00-05-05-branch

Comments (0)

Files changed (19)

+2d6e32ffe1d8a9cc7f6a88aabb1db783d6cfffdd TestTools-00-04-03
+dd34b2c5b530f7154224283ea632f44f6b66c953 TestTools-00-04-04
+8e496c14e6ad54189517c5b2900ce9b34511f93c TestTools-00-04-05
+a02578d26c5abb01d0708af8709fe480e9e9f5e1 TestTools-00-04-06
+6ab690de3a0036599a916a37a7113ca54a11735e TestTools-00-04-07
+a1063371abd49bd7effc2d70b2d35b5670f83421 TestTools-00-04-08
+3b45862355b8b2ed4cfaf7bdf3411ec002e3cb2f TestTools-00-05-00
+31dfe3df4d912264d87233a4f2d99d2a23b7e7c6 TestTools-00-05-01
+32cc0fb8002137fc503024e3942c1e3a8c432f0a TestTools-00-05-02
+157f6830eec166312d346cd1148c930b3b4f942e TestTools-00-05-03
+d1c42d51b80be064ab595342b8f0486066de8f94 TestTools-00-05-04
+2011-05-05  Paolo Calafiura  <calaf@calaf-laptop>
+
+	* tagging TestTools-00-05-05
+	* share/post.sh (PP): ignore gaudi deprecation warning for 16.6.X
+	* cmt/requirements: use TestPolicy must be public, or all clients of
+	UnitTest_run will break
+
+2011-03-28  Sebastien Binet  <binet@lxplus425.cern.ch>
+
+	* tagging TestTools-00-05-04
+	* make TestPolicy private (obo MarkH)
+	* M cmt/requirements
+
+2010-12-20  Paolo Calafiura  <calaf@calaf-laptop>
+
+	* tagging TestTools-00-05-03
+	* share/post.sh (PP): ignore athenarc files
+
+2010-12-13  Paolo Calafiura  <calaf@calaf-laptop>
+
+	* tagging TestTools-00-05-02
+	* share/post.sh: fixed check for number of configurables 
+
+2010-07-15  Paolo Calafiura  <calaf@calaf-laptop>
+
+	* tagging TestTools-00-05-01
+	* share/post.sh (PP): ignore trunk package names e.g. Package-r123456
+
+2010-06-02  Sebastien Binet  <sebastien.binet@cern.ch>
+
+	* tagging TestTools-00-05-00
+	* fwd compat w/ gaudi-v21
+	* M src/initGaudi.cxx
+
+2009-12-21  Paolo Calafiura  <calaf@lxplus314.cern.ch>
+
+	* tagging TestTools-00-04-08
+	* share/post.sh (PP): ignore shutting down athfile-server printout
+
+2009-12-19  Paolo Calafiura  
+
+	* tagging TestTools-00-04-07
+	* share/post.sh (PP): ignore which malloc version we are using
+
+2009-12-08  Paolo Calafiura
+	* tagging TestTools-00-04-06
+	* cmt/requirements: remove bash extensions from UnitTest_run pattern
+	to make it run as a true sh script
+
+2009-06-16 Alex Undrus <undrus@bnl.gov>
+	* tagging TestTools-00-04-05
+	* replace #!/usr/local/bin/bash with #!/usr/bin/env bash
+	* in scripts for ATN tests
+	
+2008-07-03  Paolo Calafiura  
+
+	* tagging TestTools-00-04-04
+	* TestTools/FLOATassert.h: functions & macros to test the difference 
+	between floats
+
+2008-02-19  Sebastien Binet  <binet@lxplus220.cern.ch>
+
+	* tagging TestTools-00-04-03
+	* share/IoAuditor_fragment.py: minor change for configurables
+
+2007-11-09  Paolo Calafiura  
+
+	* tagging TestTools-00-04-02
+	* share/post.sh (PP): ignore all lines with txt jo parser comments
+
+2007-10-05  Paolo Calafiura  
+
+	* tagging TestTools-00-04-01
+	* share/post.sh (PP): update ClassIDSvc pattern to be ignored
+
+2007-09-07  Paolo Calafiura 
+	* tagging TestTools-00-04-00
+	* cmt/requirements: remove redundant -import=TestTools from UnitTest_run definition.
+	This addresses the -ldpm problem with nightly tests.
+	
+2007-03-08  Sebastien Binet  <binet@lblbox>
+
+	* tagging TestTools-00-03-03
+	* python/iobench.py: update to use new Gaudi 19 ChronoStatSvc output
+	  file to extract I/O timings
+
+2007-03-02  scott snyder  <snyder@bnl.gov>
+	* tagging TestTools-00-03-02
+	* share/post.sh: Ignore message about number of configurables
+        read, and the gaudi19 ApplicationMgr header.Ignore include messages 
+	from txt files parser.
+
+2007-01-22  Paolo Calafiura <pcalafiura@lbl.gov>
+	* tagging TestTools-00-03-00
+	* share/post.sh: new version from Scott
+        * cmt/requirements: change for the above
+	
+2007-01-17  Sebastien Binet  <binet@lblbox>
+
+	* tagging TestTools-00-02-16
+	* python/iobench.py: introduced BenchSuite and ScOutput objects
+	* python/iobench.py: factorised workDir and doValidation functions
+
+2006-12-22  Paolo Calafiura <pcalafiura@lbl.gov>
+	* tagging TestTools-00-02-15
+	* share/post.sh (test): updated for gaudi v19
+
+2006-12-21  Paolo Calafiura  <pcalafiura@lbl.gov>
+
+	* tagging TestTools-00-02-14
+	* share/post.sh (test): match better hex numbers
+
+2006-12-01  Paolo Calafiura  <pcalafiura@lbl.gov>
+
+	* tagging TestTools-00-02-13
+	* share/post.sh (test): ignore a number of printouts counting objects when comparing test outputs
+
+2006-11-13  Sebastien Binet  <binet@lblbox>
+
+	* tagging TestTools-00-02-12
+	* improved iobench to more nicely deal with Read/Write tests (ie: it
+	  now displays cRep_ and cObj_ timings)
+
+2006-10-19  Sebastien Binet  <binet@lblbox>
+
+	* tagging TestTools-00-02-11
+	* introducing iobench (python) module
+	* A python/__init__.py
+	* A python/iobench.py
+	* A share/IoAuditor_fragment.py
+	* A test/test_iobench.py
+	* M cmt/requirements
+
+2006-07-31  Alex Undrus <undrus@bnl.gov>
+        * tag TestTools-00-02-10
+	* scripts/nightlies: removed tests
+	* TestAthenaPoolExample, TestAthenaPoolMultiTest, TestAthenaPoolTest
+	* TestIdDictTest, TestInDetRec, TestIOVDbTest, TestSealDictTest,
+	* TestTagCollectionTest
+	* These tests do not belong to AtlasCore. Many of them were moved 
+	* to AtlasConditions, Events, Analysis projects
+	
+2006-05-11  Alex Undrus <undrus@bnl.gov>
+	* tag TestTools-00-02-09
+        * corrected ChangeLog
+
+2006-05-11  Alex Undrus <undrus@bnl.gov>
+	* tag TestTools-00-02-08
+	* scripts/nightlies: removed TestEdmSealDict test
+
+2006-03-27  Alex Undrus <undrus@bnl.gov>
+	* tag TestTools-00-02-07
+	* scripts/nightlies: removed TestTriggerRelease test
+        * which is obsolete and does not belong to AtlasCore
+	
+2006-03-27  Alex Undrus <undrus@bnl.gov>
+        * tag TestTools-00-02-06
+	* scripts/nightlies: removed KitValidation tests
+	* as they moved to AtlasTest/ProductionTest
+
+2006-03-22  Alex Undrus <undrus@bnl.gov>
+	* tag TestTools-00-02-05
+	* scripts/nightlies/*.xml: replaced tag <options> with
+	* <options_atn> to bring in compliance with common XML
+	* description standard (tag <options> is already used by
+	* RTT and unfortunately XML does not allow to assign a tag
+	* to particular sections, such as ATN or RTT)
+
+2006-03-10  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* tag TestTools-00-02-04
+	* scripts/nightlies/TestControl.sh: removed. Using xml description instead
+
+2006-03-08  Alex Undrus <undrus@bnl.gov>
+        * tag TestTools-00-02-03
+	* scripts/nightlies/*.sh: the "cd" statements are corrected
+	* for project oriented structure:
+	* if [ "$CMTSTRUCTURINGSTYLE" = "without_version_directory" ]; then
+	* cd ${NIGHTLYAREA}/Atlas*Release/cmt
+	
+2006-03-07  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* tag TestTools-00-02-02
+	* scripts/nightlies/TestControl.sh: fixing the fix   
+
+2006-03-06  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* tag TestTools-00-02-01
+	* scripts/nightlies/TestControl.sh: fix cmt directory
+
+2005-11-01  Alex Undrus <undrus@bnl.gov>
+	* tag TestTools-00-01-22
+        * removed scripts/nightlies/TestLArSoftware.sh
+        * as this test is abandoned
+	
+2005-07-07  Alex Undrus <undrus@bnl.gov>
+	* tag TestTools-00-01-21
+	* removed files from scripts/nightlies/tmp area
+	* removed use of agetof from requirements file
+	* (use of agetof was needed to avoid checkreq complains
+	* these complains however were caused by obsolete scripts
+	* in scripts/nightlies/tmp area)
+
+2005-06-28  RD Schaffer  <R.D.Schaffer@cern.ch>
+
+	* tag TestTools-00-01-20
+	* scripts/nightlies/TestIOVDbTest.sh (stat): adding test for IOVDb
+
+2005-06-01  RD Schaffer  <R.D.Schaffer@cern.ch>
+
+	* tag TestTools-00-01-19
+	* scripts/nightlies/TestSealDictTest.sh: added Fredrik to mail
+	list of sealdict test
+
+2005-05-27  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* tag TestTools-00-01-18
+	* requirements: add agetof to make checkreq happy 
+
+2005-05-16  Alex Undrus <undrus@bnl.gov>
+        * tag TestTools-00-01-17
+	* various updates in scripts/nightlies area
+
+2005-05-03  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* tag TestTools-00-01-16
+	* src/initGaudi.cxx (Athena_test): back to ignore()
+
+2005-05-03  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* tag TestTools-00-01-15
+	* src/initGaudi.cxx (Athena_test): do not using ignore() yet
+
+2005-04-27  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* tag TestTools-00-01-14
+	* share/post.sh (test): mv status to testStatus, update patterns
+	* src/initGaudi.cxx (Athena_test): ignore() StatusCodes
+
+2005-04-14  Alex Undrus <undrus@bnl.gov>
+        * tag TestTools-00-01-13
+	* removed scripts/nightlies/TestRunEventNumber.sh
+
+2005-02-17 Alex Undrus <undrus@bnl.gov>
+	* tag TestTools-00-01-12
+	* minor corrections to scripts/nightlies/TestHelloWorld,
+	* TestRunEventNumber
+
+2005-02-07  RD Schaffer  <R.D.Schaffer@cern.ch>
+
+	* tag TestTools-00-01-11
+
+	* scripts/nightlies/TestSealDictTest.sh: added gemmeren to mailto:
+
+2005-02-01  RD Schaffer  <R.D.Schaffer@cern.ch>
+
+	* tag TestTools-00-01-10
+	* scripts/nightlies/TestSealDictTest.sh: added new test for seal
+	dicts
+
+2005-01-19  Paolo Calafiura  <calaf@lxplus061.cern.ch>
+	* cmt/requirements: install post.sh as a script
+	* tag TestTools-00-01-09
+
+2005-01-13  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* cmt/requirements: fix usage of post.sh. Modernize patterns...
+	* tag TestTools-00-01-08
+
+2004-11-08  Alex Undrus <undrus@bnl.gov>
+	* tag TestTools-00-01-07
+	* add scripts for KitValidation nightly tests (one script for
+	  each test)
+
+2004-11-04  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* scripts/nightlies/TestDigitization.sh: cp PoolFileCatalog.xml 
+	rather than pointing to it (so that we can modify it...)
+	* scripts/nightlies/TestPileUp.sh: cp PoolFileCatalog.xml 
+	rather than pointing to it (so that we can modify it...)
+	* scripts/nightlies/Test*.sh: moved to Digitization/test area
+	
+2004-11-03  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* scripts/nightlies/AthenaServicesTests.sh: moved to its package
+	* scripts/nightlies/CLIDSvcTests.sh: moved to its package
+
+2004-10-28  Paolo Calafiura  <calaf@lxplus062.cern.ch>
+	* scripts/nightlies/TestEventMixer.sh: fix SUCCESS_MESSAGE
+
+2004-10-25  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* scripts/nightlies/TestDigitization.sh: still need to get  PDGTABLE.MeV
+	* scripts/nightlies/TestPileUp.sh: still need to get  PDGTABLE.MeV
+
+2004-10-06  Paolo Calafiura  <pcalafiura@lbl.gov>
+
+	* tag TestTools-00-01-06
+	* scripts/nightlies/TestDigitization.sh: run AtlasDigitization.py
+	comment out obsolete(?) copying/linking of run-time files
+	* scripts/nightlies/TestPileUp.sh: comment out obsolete(?) 
+	copying/linking of run-time files
+
+2004-09-16  Kristo Karr  <Kristo.Karr@cern.ch>
+
+	* tag TestTools-00-01-05
+        * added TestTagCollectionTest.sh to scripts/nightlies
+
+2004-07-07  RD Schaffer  <R.D.Schaffer@cern.ch>
+
+	* tag TestTools-00-01-04
+	* scripts/nightlies/TestIdDictTest.sh: added test for IdDictTest
+
+2004-06-22  Paolo Calafiura  <pcalafiura@lbl.gov>
+
+	* scripts/nightlies/TestDigitization.sh: use py jos
+	* scripts/nightlies/TestPileUp.sh: use py jos
+
+2004-06-18  RD Schaffer  <R.D.Schaffer@cern.ch>
+
+	* tag TestTools-00-01-03
+
+	* scripts/nightlies/TestAthenaPoolTest.sh (stat): corrected a bit
+	the script.
+
+2004-04-23  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* cmt/requirements: do not run UnitTests in opt mode
+	* tag TestTools-00-01-02
+
+2004-03-12  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* scripts/nightlies/TestEventMixer.sh: temporarily 
+	use preprod770 catalog 
+
+2004-02-27  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* scripts/nightlies/TestPileUp.sh: new test
+	* scripts/nightlies/TestDigitization.sh: fix typos
+
+2004-02-19  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* scripts/nightlies/TestEventMixer.sh: test the Event Mixing selector
+
+2004-02-11  Paolo Calafiura  <calaf@electra.lbl.gov>
+	* share/post.sh: fixed pattern to ignore ChronoStat output 
+	* tag TestTools-00-01-01
+	
+2004-01-26  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* scripts/nightlies/CLIDSvcTests.sh: new set of unit tests for 
+	Control/CLIDSvc
+	* scripts/nightlies/SGToolsTests.sh: new set of unit tests for 
+	Control/SGTools 
+
+2004-01-23  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* moved ToyConversion classes to Control/AthenaExamples/ToyConversion
+	to improve dependencies
+	* tag TestTools-00-01-00
+	
+2004-01-15  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* scripts/nightlies/AthenaServicesTests.sh: use /bin/sh,
+	exit rather than return, 
+	* scripts/nightlies/DataModelTests.sh: same
+	* scripts/nightlies/StoreGateTests.sh: same
+	* scripts/nightlies/TestControl.sh: same
+	* tag TestTools-00-00-13
+	* added ERROR/FAILURE patterns to the scrips above, made them 
+	executable
+
+2003-12-23  David Rousseau  <droussea@lxplus064.cern.ch>
+
+	* scripts/nightlies/TestRecExCommon1.sh (stat): do not return
+
+2003-07-03  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* share/post.sh (test): make diff errors non fatal, update supps
+	* tag TestTools-00-00-12
+
+2003-05-15  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* share/post.sh: update suppressions             
+	* tag TestTools-00-00-11
+
+2003-04-29  Paolo Calafiura  <calaf@localhost>
+	* cmt/requirements: added -import=TestTools to the UnitTest apps
+	* tag TestTools-00-00-10
+
+2003-04-17  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* share/post.sh: fix timeleft egrep              
+	* tag TestTools-00-00-09
+
+2003-04-15  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* share/post.sh: more slug output suppressions   
+	* tag TestTools-00-00-08
+
+2003-04-13  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* share/post.sh: remove slug library printouts   
+	* tag TestTools-00-00-07
+
+2003-04-10  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* share/post.sh: ignore some atlsim/dice messages   
+	* tag TestTools-00-00-06
+
+2003-04-08  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* share/post.sh: improved parsing of diff output
+	* tag TestTools-00-00-05
+
+2003-04-03  Paolo Calafiura  <pcalafiura@lbl.gov>
+	* share/runUnitTests.sh: cmt bro gmake check and filter output
+	* tag TestTools-00-00-04
+
+2003-04-02  Paolo Calafiura  <pcalafiura@lbl.gov>
+
+	* initial release
+	* tag TestTools-00-00-02
+

File TestTools/FLOATassert.h

+/**  functions & macros to test the difference between floats */
+#ifndef TESTTOOLS_FLOATASSERT_H
+#define TESTTOOLS_FLOATASSERT_H
+
+#include <cassert>
+#include <cfloat>
+#include <cmath>
+
+#undef NDEBUG
+
+namespace Athena_test {
+  bool floatEQ(float lhs, float rhs) {
+    return fabs(lhs-rhs)<=FLT_EPSILON;
+  }
+  bool floatNEQ(float lhs, float rhs) {
+    return fabs(lhs-rhs)>FLT_EPSILON;
+  }
+}
+
+#define FLOAT_NEQassert( LHS, RHS ) assert(Athena_test::floatNEQ(LHS, RHS));	
+#define FLOAT_EQassert( LHS, RHS ) assert(Athena_test::floatEQ(LHS, RHS));	
+
+#endif

File TestTools/SGassert.h

+/***************************************************************************
+ macro to assert an error condition
+ ----------------------------------
+ ATLAS Collaboration
+ ***************************************************************************/
+
+// $Id: SGassert.h,v 1.2 2005-11-29 00:51:33 calaf Exp $
+
+
+#ifndef TEST_SGASSERT_H
+# define TEST_SGASSERT_H
+
+#include <cassert>
+#include <iostream>
+
+#undef NDEBUG
+
+#define SGASSERT( TRUEEXPR ) assert(TRUEEXPR)
+#define SGASSERTERROR( FALSEEXPR )   \
+    std::cerr << "Now we expect to see an error message:" << std::endl \
+              << "----Error Message Starts--->>" << std::endl; \
+    assert(!FALSEEXPR); \
+    std::cerr<< "<<---Error Message Ends-------" << std::endl
+
+
+#endif // TEST_SGASSERT_H

File TestTools/initGaudi.h

+#ifndef TEST_INITGAUDI_H
+# define TEST_INITGAUDI_H
+/** @file initGaudi.h
+ * @brief  minimal gaudi initialization for AthenaServices unit testing
+ *
+ * @author Paolo Calafiura <pcalafiura@lbl.gov> -ATLAS Collaboration
+ * $Id: initGaudi.h,v 1.4 2005-11-29 00:51:33 calaf Exp $
+ **/
+
+#include <string>
+
+#undef NDEBUG
+
+class ISvcLocator;
+
+
+namespace Athena_test {
+  /** @fn bool initGaudi(ISvcLocator*& pSvcLoc)
+   *  @brief  minimal gaudi initialization for AthenaServices unit testing
+   *  @param pSvcLoc returns a pointer to the Gaudi ServiceLocator
+   */
+  bool initGaudi(ISvcLocator*& pSvcLoc);
+  /** @fn initGaudi(const std::string& jobOptsFile, ISvcLocator*& pSvcLoc);
+   *  @brief  minimal gaudi initialization for AthenaServices unit testing
+   *  @param jobOptsFile job opts file name (located at ../share/jobOptFiles)
+   *  @param pSvcLoc returns a pointer to the Gaudi ServiceLocator
+   */
+  bool initGaudi(const std::string& jobOptsFile, ISvcLocator*& pSvcLoc);
+}
+#endif // TEST_INITGAUDI_H

File cmt/requirements

+package TestTools
+author Paolo Calafiura   <Paolo.Calafiura@cern.ch>
+author Sebastien Binet   <binet@cern.ch>
+
+use AtlasPolicy    AtlasPolicy-01-*
+use AtlasPython    AtlasPython-00-*        External -no_auto_imports
+use GaudiInterface GaudiInterface-01-*     External 
+
+use AthenaCommon   AthenaCommon-*          Control -no_auto_imports
+
+#setup LD_LIBRARY_PATH
+use GaudiSvc       v*                            -no_auto_imports
+
+branches python share src TestTools test
+
+library TestTools *.cxx
+apply_pattern installed_library
+
+apply_pattern declare_scripts files="runUnitTests.sh post.sh"
+apply_pattern declare_python_modules files="*.py"
+apply_pattern declare_joboptions files="*.py"
+
+macro whichGroup check
+#macro whichGroup "NONE" \
+#	debug    "check"
+
+use TestPolicy      TestPolicy-*
+
+pattern UnitTest_run \
+	application <unit_test>_test -group=$(whichGroup) ../test/<unit_test>_test.cxx ; \
+	document athenarun_launcher <unit_test>_utest -group=$(whichGroup) \
+        athenarun_exe="'../${CMTCONFIG}/<unit_test>_test.exe'" \
+        athenarun_pre="'. ../cmt/setup.sh'" \
+        athenarun_opt="" \
+        athenarun_out="' > <unit_test>_test.log 2>&1'" \
+        athenarun_post="'post.sh <unit_test>_test $(q)<extrapatterns>$(q)'"
+private
+macro_append DOXYGEN_INPUT " ../doc" 
+macro_append DOXYGEN_INPUT " ../share" 
+macro_append DOXYGEN_FILE_PATTERNS    " *.sh"
+macro_append DOXYGEN_FILE_PATTERNS    " *.txt"
+
+

File doc/MainPage.h

+/**
+
+   \mainpage
+
+This package contains a few tools to help writing unit tests. 
+
+\section UnitTest_run The UnitTest_run cmt pattern
+
+TestTools requirements file defines the cmt pattern UnitTest_run. UnitTest_run 
+will compile, link and run a standalone C++ program when a "gmake check" 
+command is issued. It will then run the share/post.sh script to compare the 
+program output with a reference one, if available.
+ The pattern takes one parameter <unit_test> which is used to identify a number of files:
+ -# $PKGROOT/test/<unit_test>_test.cxx		C++ program to be run
+ -# $PKGROOT/share/<unit_test>_test.ref		optional reference output
+ -# $PKGROOT/run/<unit_test>_test.log		program output (stdout & stderr)
+ -# $PKGROOT/$CMTCONFIG/<unit_test>_test.exe	executable
+
+So for example 
+<PRE>
+  apply_pattern UnitTest_run unit_test=DataPool
+will compile and link 
+ ../test/DataPool_test.cxx 
+into 
+ ../$CMTCONFIG/DataPool_test.exe 
+which will be run and produce 
+ ../run/DataPool_test.log 
+If you have created the reference output
+ ../share/DataPool_test.ref
+this will be compared to the log file at the end of the job.
+</PRE>
+
+Notice that the comparison tries to ignore a certain 
+number of differences that are usually harmless (e.g. the execution time 
+reported by ChronoStatSvc or the package versions and even in certain cases
+pointer addresses). This is currently done in a very naive fashion (using 
+diff -I option) but a more sophisticated "diff" script is in the plans
+
+\section initGaudi The initGaudi functions
+TestTools/initGaudi.h defines two functions in the namespace Athena_test 
+to initialize Gaudi ApplicationMgr 
+and be able to run using core Gaudi services. An optional string argument
+<jobOptsFile> instructs initGaudi to read in the job options file
+ $PKGROOT/share/<jobOptsFile>
+to configure your job
+
+\section scripts Scripts
+ - share/runUnitTests.sh is a sh script that cmt broadcasts gmake check
+ and filter its output. It is 
+installed in the run area. It accepts one or more arguments that it passes
+to cmt broadcast, for example
+<PRE>
+ ../run/%runUnitTests.sh -select=StoreGate
+</PRE>
+ - share/post.sh is a script used by the UnitTest_run pattern to 
+analize a job output 
+
+\section toys Toys 
+
+The TestTools component library provides toy implementations of a number of
+typical Gaudi classes, namely ToyConverter, ToyConversionSvc (and soon 
+ToyAlgorithm). These are made available via the job opts file
+ $TESTTOOLSROOT/share/ToyConversionOpts.txt
+
+
+
+\section Examples Examples
+
+The package AthenaTests/ControlTests contains several examples that use
+the initGaudi function.
+Control/StoreGate has a couple of non-Gaudi-based,
+very simple unit tests (e.g. KeyConcept) as well as more sophisticated ones
+that show 
+ - how to link the test program with an extra library (e.g. Clear_Store) 
+ - how to use the ToyConversionSvc provided by TestTools (ProxyProviderSvc)
+
+\section links More info
+The package can be browsed using LXR 
+(http://atlassw1.phy.bnl.gov/lxr/source/atlas/AtlasTest/TestTools/)
+
+To generate doxygen doc, run (from the cmt dir) gmake doxygen and point 
+your browser to .../doc/Doxygen/html/index.html
+
+\author Paolo Calafiura <Paolo.Calafiura@cern.ch>
+*/

File python/__init__.py

+# hook for the TestTools python module

File python/iobench.py

+# @file : iobench.py
+# @author: Sebastien Binet <binet@cern.ch>
+# @purpose: Measure the I/O performances of an application
+#
+# @date: July 2006
+#
+
+"""
+A set of python objects to measure the I/O performances of an application.
+"""
+
+__author__  = "$Author: binet $"
+__version__ = "$Revision: 1.4 $"
+
+import sys
+import resource
+import time
+import os
+
+###-----------------------------------------------------
+def getResources( usageMode = resource.RUSAGE_CHILDREN ):
+    """
+    A factory method to fetch the used resources at a given 't' time.
+    Default mode is 'resource.RUSAGE_CHILDREN'
+    """
+    return Resource( utime = resource.getrusage( usageMode ).ru_utime,
+                     stime = resource.getrusage( usageMode ).ru_stime,
+                     rtime = time.time() )
+
+class Resource(object):
+    """
+    A simple class to hold the resources used by a program:
+     - user   time
+     - system time
+     - real   time
+    """
+    
+    def __init__( self,
+                  utime, stime, rtime ):
+        object.__init__(self)
+
+        self.utime = utime
+        self.stime = stime
+        self.rtime = rtime
+
+        return
+
+    def __repr__(self):
+        s = os.linesep.join( [ "user : %s" % str( self.user() ),
+                               "sys  : %s" % str( self.sys()  ),
+                               "real : %s" % str( self.real() ) ] )
+        return s
+
+    def __add__(self, rhs):
+        return Resource( self.utime + rhs.utime,
+                         self.stime + rhs.stime,
+                         self.rtime + rhs.rtime )
+
+    def __iadd__(self, rhs):
+        self.utime += rhs.utime
+        self.stime += rhs.stime
+        self.rtime += rhs.rtime
+        return self
+
+    def __sub__(self, rhs):
+        return Resource( self.utime - rhs.utime,
+                         self.stime - rhs.stime,
+                         self.rtime - rhs.rtime )
+
+    def __isub__(self, rhs):
+        self.utime -= rhs.utime
+        self.stime -= rhs.stime
+        self.rtime -= rhs.rtime
+        return self
+    
+    def user( self ):
+        return self.utime
+
+    def sys( self ):
+        return self.stime
+
+    def real( self ):
+        return self.rtime
+
+    pass # Resource
+
+class Bench(object):
+
+    def __init__( self,
+                  nTimes = 1,
+                  stdout = sys.stdout,
+                  stderr = sys.stderr ):
+        object.__init__(self)
+
+        self.nTimes = nTimes
+        self.data = []
+
+    def run( self, fct, *args, **kwargs ):
+
+        self.data = []
+
+        for i in range(self.nTimes):
+            iStart = getResources()
+            out = fct( *args, **kwargs )
+            self.data.append( getResources() - iStart )
+            pass
+
+        return
+
+    def stats( self ):
+        
+        mean = Resource( 0., 0., 0. )
+        for d in self.data:
+            mean += d
+            pass
+
+        print ""
+        print "## stats : (nbenchs = %i)" % self.nTimes
+        print " time<User> = %8.3f s" % ( mean.user() /  float( self.nTimes ) )
+        print " time<Sys > = %8.3f s" % ( mean.sys()  /  float( self.nTimes ) )
+        print " time<Real> = %8.3f s" % ( mean.real() /  float( self.nTimes ) )
+        
+        return
+
+    def save( self, fileName = "iobench.log" ):
+        f = open( fileName, "w" )
+        for data in self.data:
+            f.writelines( "%s %s %s %s" % ( data.user(),
+                                            data.sys(),
+                                            data.real(),
+                                            os.linesep ) )
+            pass
+        f.close()
+        return
+    
+    pass # Bench
+
+##
+## ---- Athena specific part ----
+##
+
+import os
+import ConfigParser
+class ChronoStatsOutputParser( ConfigParser.ConfigParser ):
+    """Subclass and specialize ConfigParser to make it case-sensitive
+    """
+    def optionxform( self, optionStr ):
+        return optionStr
+
+class ChronoStat(object):
+    """
+    A class mirroring the one from the (Gaudi) ChronoStatSvc which models a
+    chrono measurement.
+    It holds the following informations:
+      - total time
+      - min
+      - mean
+      - RMS
+      - max
+      - number of 'events'
+    """
+    def __init__( self, nbr, min, max, mean, rms, total ):
+        object.__init__(self)
+        self.total = total
+        self.min   = min
+        self.mean  = mean
+        self.rms   = rms
+        self.max   = max
+        self.nbr   = nbr
+        pass
+
+    def __repr__(self):
+        return os.linesep.join( [
+            "min   = %s" % str( self.min   ),
+            "max   = %s" % str( self.max   ),
+            "mean  = %s" % str( self.mean  ),
+            "RMS   = %s" % str( self.RMS   ),
+            "total = %s" % str( self.total ),
+            "#evts = %s" % str( self.nbr   ),
+            ] )
+    
+class ChronoStatReport(object):
+
+    ReadKeyHdr  = "cObj_"
+    WriteKeyHdr = "cRep_"
+    KeySep      = "#"
+    
+    """
+    This class stores the report of the ChronoStatSvc dump from Athena/Gaudi.
+    """
+    def __init__( self, fileName ):
+        """
+        fileName is supposed to contain the output of the ChronoStatSvc which
+        has been configured with 'ChronoStatSvc.ChronoDestinationCout = True'
+        """
+        object.__init__( self )
+
+        self.logFile = ChronoStatsOutputParser()
+        self.logFile.read( fileName )
+
+        self.stats = { }
+        self.chronoStats = { }
+        self.buildStats()
+        pass
+
+    def buildStats( self ):
+
+        for hdr in self.logFile.sections():
+            stat = [
+                ChronoStat(
+                    nbr  = int  (self.logFile.get(hdr, "cpu_%s_nbr"   % item)),
+                    min  = float(self.logFile.get(hdr, "cpu_%s_min"   % item)),
+                    max  = float(self.logFile.get(hdr, "cpu_%s_max"   % item)),
+                    mean = float(self.logFile.get(hdr, "cpu_%s_mean"  % item)),
+                    rms  = float(self.logFile.get(hdr, "cpu_%s_RMS"   % item)),
+                    total= float(self.logFile.get(hdr, "cpu_%s_total" % item))
+                    ) \
+                for item in ['user', 'system', 'real']
+                ]
+                     
+            self.chronoStats[hdr] = {
+                'user'   : stat[0],
+                'system' : stat[1],
+                'real'   : stat[2],
+                }
+            del stat
+            self.stats[hdr] = Resource(
+                float(self.logFile.get(hdr, "cpu_user_mean")),
+                float(self.logFile.get(hdr, "cpu_system_mean")),
+                float(self.logFile.get(hdr, "cpu_real_mean"))
+                )
+        pass
+
+    def getStats(self, key):
+        return self.stats[key]
+
+    def getPoolStats(self, storeGateKey, ioMode = "r" ):
+        ioKey = storeGateKey
+        # 'normalize' key
+        if ioMode.lower() == "r":
+            ioKey = storeGateKey.replace(ChronoStatReport.ReadKeyHdr,"")
+            ioKey = ChronoStatReport.ReadKeyHdr + ioKey
+        elif ioMode.lower() == "w":
+            ioKey = storeGateKey.replace(ChronoStatReport.WriteKeyHdr,"")
+            ioKey = ChronoStatReport.WriteKeyHdr + ioKey
+        else:
+            pass
+
+        if not self.stats.has_key( ioKey ):
+            print "Warning: no such key [%s] in stats !" % ioKey
+            print "Available keys:",self.stats.keys()
+            pass
+        return self.stats[ ioKey ]
+
+    def getPoolKeys(self):
+        return [ k for k in self.stats.keys() \
+                 if k.count(ChronoStatReport.WriteKeyHdr) > 0 ]
+    
+    pass # ChronoStatReport
+
+            
+###-----------------------------------------------------
+## For compatibility with ATN tests
+def workDir( fileName ):
+    """Function to provide an automatic work dir, compatible with ATN tests
+    """
+    if os.environ.has_key('ATN_WORK_AREA'):
+        workArea = os.environ['ATN_WORK_AREA']
+    else:
+        workArea = "/tmp"
+        pass
+    if not os.path.exists(workArea):
+        os.makedirs(workArea)
+    return os.path.join( workArea, fileName )
+
+class ScOutput(object):
+
+    def __init__(self, statusCode = 0, outputLog = ""):
+        object.__init__(self)
+        self.sc  = statusCode
+        self.out = outputLog
+        return
+
+    pass # ScOutput
+
+###-----------------------------------------------------
+## Little helper to validate output of jobs
+def doValidation( dbFiles, key ):
+    """Helper function to validate output of jobs against 'registered' ASCII
+    files.
+    """
+    import commands
+    from TestTools.iobench import ScOutput
+    print "## Validation of ASCII files [%s]:" % key
+    print "## %15s : %s" % ( 'ref', dbFiles[key]['ref'] )
+    print "## %15s : %s" % ( 'chk', dbFiles[key]['chk'] )
+    sc,out = commands.getstatusoutput( "diff %s %s" %
+                                       ( dbFiles[key]['ref'],
+                                         dbFiles[key]['chk'] ) )
+    if sc == 0 and len(out) == 0:
+        print "==> Validation [OK]"
+    else:
+        print "==> Validation [ERROR]"
+        pass
+    return ScOutput(sc,out)
+
+###-----------------------------------------------------
+## Little helper to validate output of jobs
+def doPostCheck( validationName, refFileName, chkFileName, chkFilter ):
+    import commands
+    print "## Validation of [%s]" % validationName
+    print "## ref:    %s"   % refFileName
+    print "## chk:    %s"   % chkFileName
+    print "## filter: [%s]" % chkFilter
+    sc, out = commands.getstatusoutput( "cat %s | %s | diff -u %s -" % \
+                                        ( chkFileName, chkFilter,
+                                          refFileName ) )
+    if sc == 0 and len(out) == 0: print "==> Validation [OK]"
+    else:                         print "==> Validation [ERROR]\n",\
+                                        "*"*80,out,"*"*80
+    return ScOutput(sc, out)
+
+###-----------------------------------------------------
+from AthenaCommon import ChapPy
+from tempfile import NamedTemporaryFile
+class AthBench(object):
+
+    def __init__( self,
+                  athenaJob,
+                  logFile,
+                  nTimes = 1,
+                  stdout = sys.stdout,
+                  stderr = sys.stderr,
+                  ioStatsLogFile = workDir("ioStats.out") ):
+        object.__init__(self)
+
+        self.athena = athenaJob
+        self.logFileName = logFile
+        self.nTimes = nTimes
+        self.data = []
+        self.chronoStats= []
+        self.ioStatsFileName = ioStatsLogFile
+        
+    def run( self ):
+
+        self.data = []
+        self.chronoStats= []
+        self.athena.jobOptions += [
+            ChapPy.JobOptions( "TestTools/IoAuditor_fragment.py" ),
+            ChapPy.JobOptionsCmd( "svcMgr.ChronoStatSvc.AsciiStatsOutputFile = \"%s\"" % self.ioStatsFileName )
+            ]
+        for i in range(self.nTimes):
+            self.athena.logFile = open( "%s.%s" % (self.logFileName,i), "w" )
+            iStart = getResources()
+            out = self.athena.run()
+            self.data.append( getResources() - iStart )
+            self.chronoStats.append( ChronoStatReport(self.ioStatsFileName) )
+            pass
+
+        return
+
+    def __printStat(self, res, title="Overall", isIO = False, keyType = ""):
+        if isIO:
+            u = "us/evt"
+        else:
+            u = "s"
+            pass
+        if   keyType == ChronoStatReport.WriteKeyHdr: keyType = "[WRITE]"
+        elif keyType == ChronoStatReport.ReadKeyHdr:  keyType = "[READ]"
+        else:
+            pass
+        print ""
+        print "## stats : [%s] (nbenchs = %i) %s" % (title,
+                                                     self.nTimes,
+                                                     keyType)
+        print " time<User> = %12.3f %s" % (res.user() / float(self.nTimes), u)
+        print " time<Sys > = %12.3f %s" % (res.sys()  / float(self.nTimes), u)
+        print " time<Real> = %12.3f %s" % (res.real() / float(self.nTimes), u)
+        
+    def ioStats(self, ioKeys = [], ioMode = "r"):
+
+        if len(ioKeys) == 0:
+            ioKeys = self.chronoStats[0].getPoolKeys()
+            pass
+        keyHdr = ""
+        if ioMode.lower() == "r":
+            keyHdr = ChronoStatReport.ReadKeyHdr
+        elif ioMode.lower() == "w":
+            keyHdr = ChronoStatReport.WriteKeyHdr
+        for ioKey in ioKeys:
+            mean = Resource( 0., 0., 0. )
+            for d in self.chronoStats:
+                mean += d.getPoolStats(ioKey, ioMode)
+                pass
+            self.__printStat(mean,
+                             ioKey.replace(keyHdr,""),
+                             isIO = True,
+                             keyType = keyHdr)
+            pass
+        
+        return
+    
+    def stats( self, doIoStats = False ):
+
+        ## IO stats
+        if doIoStats:
+            self.ioStats()
+        
+        ## Overall stats
+        mean = Resource( 0., 0., 0. )
+        for d in self.data:
+            mean += d
+            pass
+        self.__printStat(mean)
+        return
+
+    def save( self, fileName = "iobench.log" ):
+        f = open( fileName, "w" )
+        for data in self.data:
+            f.writelines( "%s %s %s %s" % ( data.user(),
+                                            data.sys(),
+                                            data.real(),
+                                            os.linesep ) )
+            pass
+        f.close()
+        return
+    
+    pass # AthBench
+
+class BenchSequence(object):
+    """
+    Class which holds results of benchs (exit codes) and declares victory
+    when all the benchs returned successfully.
+    """
+
+    def __init__(self, name = "My Bench suite"):
+        object.__init__(self)
+        self.name   = name
+        self.benchs = []
+
+        return
+
+    def __iadd__(self, rhs):
+        if not isinstance( rhs, ScOutput ) and \
+           not isinstance( rhs, list ):
+            raise Exception, \
+                  "attempt to add a '%s' to the BenchSuite !" % \
+                  type(rhs).__name__
+        
+        if isinstance( rhs, ScOutput ):
+            self.benchs.append( rhs )
+            return self
+        
+        if isinstance( rhs, list ):
+            for i in rhs:
+                self += i
+                pass
+            return self
+
+        return self
+
+    def status(self):
+        import math
+        sc = 0
+        for i in self.benchs:
+            sc += math.fabs(i.sc)
+            pass
+        return sc == 0
+
+    def printStatus(self):
+        if self.status(): print "## [All tests SUCCESSFULLY completed]"
+        else:             print "## [ERROR in at least one test !!]"
+        return
+    
+    pass # BenchSequence

File scripts/nightlies/CppUnitSGServiceTestExample.sh

+#!/usr/bin/env bash
+# MAILTO : undrus@bnl.gov
+echo " ======================================================== "
+echo " Starting CppUnitTestExample "
+echo " ======================================================== "
+if [ "$CMTSTRUCTURINGSTYLE" = "without_version_directory" ]; then
+cd ${NIGHTLYAREA}/Atlas*Release/cmt
+else
+cd ${NIGHTLYAREA}/Atlas*Release/*/cmt
+fi
+cmt broadcast -select=CppUnitSGServiceExample make CppUnit
+stat=$? 
+if [ "$stat" != "0"  ]; then
+        echo " ------------------------------------------ "
+        echo " FAILURE : test CppUnitSGServiceTestExample "
+        echo " ------------------------------------------ "
+fi
+
+

File scripts/nightlies/CppUnitTestExample.sh

+#!/usr/bin/env bash
+# MAILTO : undrus@bnl.gov
+echo " ======================================================== "
+echo " Starting CppUnitTestExample "
+echo " ======================================================== "
+if [ "$CMTSTRUCTURINGSTYLE" = "without_version_directory" ]; then
+cd ${NIGHTLYAREA}/Atlas*Release/cmt
+else
+cd ${NIGHTLYAREA}/Atlas*Release/*/cmt
+fi
+cmt broadcast -select=CppUnitExample make CppUnit
+stat=$? 
+if [ "$stat" != "0"  ]; then
+        echo " -------------------------------- "
+        echo " FAILURE : test CppUnitTestExample "
+        echo " -------------------------------- "
+fi
+
+

File scripts/nightlies/TestHelloWorld.sh

+#!/usr/bin/env bash
+# ERROR_MESSAGE :FAILURE (ERROR)
+# SUCCESS_MESSAGE :FATAL A FATAL
+# MAILTO : undrus@bnl.gov
+
+# -----------------------------------------------------------
+# Author: Alex Undrus
+# -----------------------------------------------------------
+
+echo " ======================================================== "
+echo " Starting test with TestHelloWorld.py "
+echo " ======================================================== "
+athena.py AthExHelloWorld/HelloWorldOptions.py 
+stat=$? 
+if [ "$stat" != "0" ]; then
+        echo " -------------------------------- "
+        echo " FAILURE (ERROR) : test HelloWorld.py "
+        echo " -------------------------------- "
+fi

File scripts/nightlies/TestHelloWorld_XML.xml

+<?xml version="1.0"?>
+<atn>
+   <TEST name="HelloWorld" type="athena" suite="Examples">
+      <options_atn>AthExHelloWorld/HelloWorldOptions.py</options_atn>
+      <timelimit>2</timelimit>
+      <author> Atlas Developer </author> 
+      <mailto> somebody@somewhere.ch </mailto>   
+      <expectations>
+         <errorMessage>FAILURE (ERROR)</errorMessage>
+         <successMessage>FATAL A FATAL</successMessage>
+         <returnValue>0</returnValue>
+      </expectations>
+   </TEST>
+</atn>

File scripts/nightlies/TestHelloWorld_script.xml

+<?xml version="1.0"?>
+<atn>
+   <TEST name="HelloWorld" type="script" suite="Examples">
+      <options_atn>AtlasTest/TestTools/scripts/nightlies/TestHelloWorld.sh</options_atn>
+      <timelimit>2</timelimit>
+      <author> Atlas Developer </author> 
+      <mailto> somebody@somewhere.ch </mailto>   
+      <expectations>
+         <errorMessage>FAILURE (ERROR)</errorMessage>
+         <successMessage>FATAL A FATAL</successMessage>
+         <returnValue>0</returnValue>
+      </expectations>
+   </TEST>
+</atn>

File share/IoAuditor_fragment.py

+#
+# write out a summary of the time spent
+#
+from AthenaCommon.AppMgr import ServiceMgr as svcMgr
+theAuditorSvc = svcMgr.AuditorSvc
+theAuditorSvc.Auditors  += [ "ChronoAuditor"]
+
+svcMgr.ChronoStatSvc.ChronoDestinationCout = True
+
+svcMgr.ChronoStatSvc.PrintUserTime     = True
+svcMgr.ChronoStatSvc.PrintSystemTime   = True
+svcMgr.ChronoStatSvc.PrintEllapsedTime = True
+
+svcMgr.ChronoStatSvc.AsciiStatsOutputFile = "chronoStats.ascii"
+
+svcMgr.AthenaPoolCnvSvc.UseDetailChronoStat = True
+
+from AthenaCommon.AppMgr import theApp
+theApp.AuditAlgorithms = True

File share/post.sh

+#!/bin/sh
+#/** @file post.sh
+# @brief sh script that check the return code of an executable and compares
+# its output with a reference (if available).
+# @param test_name
+#
+# @author Scott Snyder <snyder@fnal.gov> - ATLAS Collaboration.
+# @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration.
+# $Id: post.sh,v 1.23 2007-11-10 00:00:07 calaf Exp $
+# **/
+test=$1
+extrapatterns="$2"
+#verbose="1"
+if [ "$POST_SH_NOCOLOR" = "" ]; then
+ GREEN=""
+ YELLOW=""
+ RED=""
+ RESET=""
+else
+ GREEN=""
+ YELLOW=""
+ RED=""
+ RESET=""
+fi
+
+# ignore diff annotations
+PP='^---|^[[:digit:]]+[acd,][[:digit:]]+'
+
+# ignore hex addresses
+PP="$PP"'|0x\w{4,}'
+
+# ignore package names e.g. Package-00-00-00
+PP="$PP"'|\w+-[[:digit:]]{2}-[[:digit:]]{2}-[[:digit:]]{2}'
+# ignore trunk package names e.g. Package-r123456
+PP="$PP"'|\w+-r[[:digit:]]+'
+# ignore cpu usage printouts
+PP="$PP"'|ChronoStatSvc +INFO Time'
+PP="$PP"'|Time left.+ Seconds'
+PP="$PP"'|Timeleft.+ sec'
+PP="$PP"'|INFO Time User'
+# ignore clid db file name
+PP="$PP"'|from CLIDDB file'
+# ignore slug machine printout
+PP="$PP"'| Machine: .* System and Processor Info'
+PP="$PP"'| Jobname = .* Machine ='
+# ignore slug pid printout
+PP="$PP"'|Atlas Detector Simulation, Reconstruction and Analysis Running on'
+PP="$PP"'|Program:  Slug-Dice-Arecon .+ pid +[[:digit:]]+'
+#ignore DllClassManager DEBUG messages
+PP="$PP"'|DllClassManager     DEBUG'
+# ignore slug Library printout
+PP="$PP"'|Library of +[[:digit:]]+ at +[[:digit:]]+'
+PP="$PP"'|Library compiled on +[[:digit:]]'
+# ignore ClassIDSvc "in memory db" printouts
+PP="$PP"'|CLID: .* - type name:'
+# ignore ClassIDSvc "already set" printouts
+PP="$PP"'|ClassIDSvc .* setTypeNameForID: .* already set for'
+# ignore ClassIDSvc finalize output
+PP="$PP"'|ClassIDSvc .* finalize: wrote .*'
+# ignore rcs version comments
+PP="$PP"'|Id: .+ Exp \$'
+# ignore plugin count
+PP="$PP"'|PluginMgr            INFO loaded plugin info for'
+# ignore HistorySvc registered count
+PP="$PP"'|HistorySvc           INFO Registered'
+# ignore clid registry entries count
+PP="$PP"'|ClassIDSvc           INFO  getRegistryEntries: read'
+# ignore existsDir path WARNINGS
+PP="$PP"'|DirSearchPath::existsDir: WARNING not a directory'
+# ignore warnings about duplicate services/converters.
+PP="$PP"'|Service factory for type [^ ]+ already declared'
+PP="$PP"'|Converter for class:[^ ]+ already exists'
+# Number of configurables read can vary from build to build.
+PP="$PP"'|INFO Read module info for'
+# ignore ApplicationMgr header.
+PP="$PP"'|^ApplicationMgr *SUCCESS *$'
+PP="$PP"'|^=+$'
+PP="$PP"'|^ *Welcome to ApplicationMgr'
+PP="$PP"'|^ *running on .* on '
+PP="$PP"'|//GP: '
+#ignore which malloc we are using
+PP="$PP"'|^Preloading tcmalloc'
+PP="$PP"'|^WARNING: TCMALLOCDIR not defined'
+#Sebastien says not to worry about this...
+PP="$PP"'|^Py:AthFile .*shutting down athfile-server'
+#ignore personal .athenarc files
+PP="$PP"'|including file \"\$HOME/.athenarc'
+#ignore known gaudi python warning
+PP="$PP"'|Bindings.py:660: DeprecationWarning'
+
+if [ "$extrapatterns" != "" ]; then
+ PP="$PP""|$extrapatterns"
+fi
+
+if [ -z "$testStatus" ]
+   then
+   echo "$YELLOW post.sh> Warning: athena exit status is not available $RESET"
+else
+   # check exit status
+   joblog=${test}.log
+   if [ "$testStatus" = 0 ]
+       then
+       if [ "$verbose" != "" ]; then
+         echo "$GREEN post.sh> OK: ${test} exited normally. Output is in $joblog $RESET"
+       fi
+       reflog=../share/${test}.ref
+       if [ -r $reflog ]
+           then
+           jobdiff=${joblog}-todiff
+           refdiff=`basename ${reflog}`-todiff
+           egrep -a -v "$PP" < $joblog > $jobdiff
+           egrep -a -v "$PP" < $reflog > $refdiff
+           diff -a -b -B -u $jobdiff $refdiff
+           diffStatus=$?
+           if [ $diffStatus != 0 ] ; then
+               echo "$RED post.sh> ERROR: $joblog and $reflog differ $RESET"
+           else
+               if [ "$verbose" != "" ]; then
+                 echo "$GREEN post.sh> OK: $joblog and $reflog identical $RESET"
+               fi
+           fi
+       else
+           tail $joblog
+           echo "$YELLOW post.sh> WARNING: reference output $reflog not available $RESET"
+           echo  " post.sh> Please check ${PWD}/$joblog"
+       fi
+   else
+       tail $joblog
+       echo  "$RED post.sh> ERROR: Athena exited abnormally! Exit code: $testStatus $RESET"
+       echo  " post.sh> Please check ${PWD}/$joblog"
+   fi
+fi
+exit $testStatus

File share/runUnitTests.sh

+#!/bin/sh
+#/** @file runUnitTests.sh
+# @brief sh script that cmt broadcasts gmake check and filters out its output
+# @param opts options to be passed to cmt (eg -select=Store)
+# @author Paolo Calafiura <pcalafiura@lbl.gov> - ATLAS Collaboration.
+# $Id: runUnitTests.sh,v 1.1 2003-04-04 01:31:24 calaf Exp $
+# **/
+#if [ "$#" = 0 ]
+#    then
+#    opts=-
+#else
+    opts="$@"
+#fi
+
+joblog=gmakecheck.log
+cmt bro "$opts" gmake check 2>&1 | tee $joblog | egrep "(post.sh>|Now trying)" 
+tail -1 $joblog | grep -q "check ok"
+rc=$?
+if [ "$rc" = 0 ]
+    then 
+    echo "OK: gmake check exited normally. Output is in $joblog"
+else
+    tail $joblog
+    echo  "ERROR: gmake check exited abnormally!"
+
+    echo  " Please check ${PWD}/$joblog"
+fi

File src/initGaudi.cxx

+/***************************************************************************
+ minimal gaudi initialization for AthenaServices unit testing
+ ------------------------------------------------------------
+ ATLAS Collaboration
+ ***************************************************************************/
+
+// $Id: initGaudi.cxx,v 1.5 2005-05-04 00:39:51 calaf Exp $
+
+//<<<<<< INCLUDES                                                       >>>>>>
+
+#include "TestTools/initGaudi.h"
+
+#include "GaudiKernel/Bootstrap.h"
+#include "GaudiKernel/IProperty.h"
+#include "GaudiKernel/ISvcManager.h"
+#include "GaudiKernel/ISvcLocator.h"
+#include "GaudiKernel/IAppMgrUI.h"
+#include "GaudiKernel/SmartIF.h"
+using std::cout;
+using std::endl;
+using std::string;
+
+namespace Athena_test {
+  bool initGaudi(ISvcLocator*& pSvcLoc) {
+    return initGaudi(string(), pSvcLoc); //wily hack
+  }
+  bool initGaudi(const std::string& jobOptsFile, ISvcLocator*& pSvcLoc) {
+    string jobOptsPath("../share/"+jobOptsFile);
+    bool noJobOpts(jobOptsFile.empty());
+    if (!noJobOpts) {
+      cout << "\n\nInitializing Gaudi ApplicationMgr using job opts " << jobOptsPath << endl;
+    }
+
+    // Create an instance of an application manager
+    IInterface* iface = Gaudi::createApplicationMgr();
+    if( 0 == iface ) {
+      cout << "Fatal error while creating the ApplicationMgr " << endl;
+      return false;
+    }
+
+    SmartIF<ISvcManager> svcMgr(iface);
+    SmartIF<IAppMgrUI> appMgr(iface);
+    SmartIF<IProperty> propMgr(iface);
+    SmartIF<ISvcLocator> svcLoc(iface);
+    if(!svcLoc.isValid() || !appMgr.isValid() || !svcMgr.isValid() || !propMgr.isValid()) {
+      cout << "Fatal error while creating the AppMgr smart if " << endl;
+      return false;
+    }
+
+    pSvcLoc = svcLoc.pRef();
+
+    (propMgr->setProperty( "EvtSel",         "NONE" )).ignore();
+    if (noJobOpts) {
+      (propMgr->setProperty( "JobOptionsType", "NONE" )).ignore();
+    } else {
+      (propMgr->setProperty( "JobOptionsType", "FILE" )).ignore();
+      (propMgr->setProperty( "JobOptionsPath", jobOptsPath )).ignore();
+    }
+
+    if ((appMgr->configure()).isSuccess() &&
+	(appMgr->initialize()).isSuccess()) {
+      cout<<"ApplicationMgr Ready"<<endl;
+      return true;
+    } else {
+      cout << "Fatal error while initializing the AppMgr" << endl;
+      return false;
+    }
+  }
+}
+
+

File test/test_iobench.py

+#!/usr/bin/env python
+
+# @file:    test_iobench.py
+# @purpose: unit test file for the iobench module
+# @author:  Sebastien Binet <binet@cern.ch>
+# @date:    July 2006
+
+import user
+import sys
+from TestTools    import iobench
+from AthenaCommon import ChapPy
+
+if __name__ == "__main__":
+    print "#"*80
+    print "## testing iobench ..."
+
+    jobOptions = [
+        ChapPy.JobOptionsCmd( "OUTPUT=\"/tmp/slimmed.aod.pool\"" ),
+        ChapPy.JobOptions( "McParticleAlgs/test_WriteMcAod_jobOptions.py" )
+        ]
+    athena = ChapPy.Athena( jobOptions = jobOptions,
+                            checkLeak  = True )
+    athena.EvtMax = 100
+
+    bench = iobench.AthBench( athena,
+                              nTimes = 10 )
+    print "## bench:"
+    print bench.athena
+    bench.run()
+
+    bench.ioStats( [ "GEN_AOD", "GEN_EVENT", "SpclMC" ], "w" )
+    bench.save( "iobench-%ievts.log" % athena.EvtMax )
+    bench.stats()
+
+    print ""
+    print "## Bye."
+    print "#"*80
+
+    # a possible output...
+    """
+    ## stats : [GEN_AOD] (nbenchs = 10)
+     time<User> =     1231.000 us/evt
+     time<Sys > =        2.000 us/evt
+     time<Real> =     1210.000 us/evt
+    
+    ## stats : [GEN_EVENT] (nbenchs = 10)
+     time<User> =     1553.000 us/evt
+     time<Sys > =        4.000 us/evt
+     time<Real> =     1577.000 us/evt
+    
+    ## stats : [SpclMC] (nbenchs = 10)
+     time<User> =     1457.000 us/evt
+     time<Sys > =        4.000 us/evt
+     time<Real> =     1560.000 us/evt
+
+    ## stats : [Overall] (nbenchs = 10)
+     time<User> =       26.931 s
+     time<Sys > =        0.749 s
+     time<Real> =       41.064 s
+    """