Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:20

0001 #ifndef Utilities_TestHelper
0002 #define Utilities_TestHelper
0003 // -*- C++ -*-
0004 
0005 //------------------------------------------------------------
0006 //
0007 // Function to drive test programs and scripts.
0008 //
0009 // Write your test program with whatever name you want; the
0010 // implementation should be:
0011 //
0012 //    int main(int argc, char* argv[]) { return ptomaine(argc, argv); }
0013 //
0014 //
0015 // Asumming you call your program RunThis, invocation of this program
0016 // should look like:
0017 //
0018 //   RunThis <shell name> <command> [args ...]
0019 // e.g.
0020 //   RunThis /bin/bash ls
0021 //   RunThis /bin/bash cmsRun -p somefile.cfg
0022 //   RunThis /bin/bash some_script.sh a b c
0023 //
0024 //
0025 //------------------------------------------------------------
0026 
0027 int ptomaine(int argc, char* argv[], char** env);
0028 
0029 #define RUNTEST()            \
0030   extern "C" char** environ; \
0031   int main(int argc, char* argv[]) { return ptomaine(argc, argv, environ); }
0032 
0033 #endif