CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/FWCore/Utilities/interface/TestHelper.h

Go to the documentation of this file.
00001 #ifndef Utilities_TestHelper
00002 #define Utilities_TestHelper
00003 // -*- C++ -*-
00004 
00005 //------------------------------------------------------------
00006 //
00007 // Function to drive test programs and scripts.
00008 //
00009 // Write your test program with whatever name you want; the 
00010 // implementation should be:
00011 //
00012 //    int main(int argc, char* argv[]) { return ptomaine(argc, argv); }
00013 //    
00014 //
00015 // Asumming you call your program RunThis, invocation of this program
00016 // should look like:
00017 //
00018 //   RunThis <shell name> <command> [args ...]
00019 // e.g.
00020 //   RunThis /bin/bash ls
00021 //   RunThis /bin/bash cmsRun -p somefile.cfg
00022 //   RunThis /bin/bash some_script.sh a b c
00023 //
00024 //
00025 // $Id: TestHelper.h,v 1.2 2008/11/11 15:57:35 dsr Exp $
00026 //------------------------------------------------------------
00027 
00028 int ptomaine(int argc, char* argv[], char** env);
00029 
00030 #define RUNTEST() extern "C" char** environ; int main(int argc, char* argv[]) { return ptomaine(argc, argv, environ); }
00031 
00032 #endif