CMS 3D CMS Logo

TestHelper.h
Go to the documentation of this file.
1 #ifndef Utilities_TestHelper
2 #define Utilities_TestHelper
3 // -*- C++ -*-
4 
5 //------------------------------------------------------------
6 //
7 // Function to drive test programs and scripts.
8 //
9 // Write your test program with whatever name you want; the
10 // implementation should be:
11 //
12 // int main(int argc, char* argv[]) { return ptomaine(argc, argv); }
13 //
14 //
15 // Asumming you call your program RunThis, invocation of this program
16 // should look like:
17 //
18 // RunThis <shell name> <command> [args ...]
19 // e.g.
20 // RunThis /bin/bash ls
21 // RunThis /bin/bash cmsRun -p somefile.cfg
22 // RunThis /bin/bash some_script.sh a b c
23 //
24 //
25 //------------------------------------------------------------
26 
27 int ptomaine(int argc, char* argv[], char** env);
28 
29 #define RUNTEST() \
30  extern "C" char** environ; \
31  int main(int argc, char* argv[]) { return ptomaine(argc, argv, environ); }
32 
33 #endif
int ptomaine(int argc, char *argv[], char **env)
Definition: TestHelper.cc:179