1 #ifndef __TESTHELPER_HXX__
2 #define __TESTHELPER_HXX__
4 #include <stdlib.h> // Standard C include (for getenv)
9 * This function returns the module SPADDER installation root
10 * directory as a string.
12 static std::string SPADDER_ROOT_DIR() {
13 static std::string * spadder_root_dir;
14 if ( spadder_root_dir == NULL ) {
15 char * SPADDER_ROOT_DIR = getenv("SPADDER_ROOT_DIR");
16 spadder_root_dir = new std::string(SPADDER_ROOT_DIR);
18 return *spadder_root_dir;
21 /*! Relative path of the directory containing data and exe for tests */
22 static std::string PADDEREXE_RPATH("/share/salome/resources/spadder/padderexe");
23 /*! Absolute path of the directory containing data and exe for tests */
24 static std::string PADDEREXE_APATH(SPADDER_ROOT_DIR()+PADDEREXE_RPATH);
25 /*! Absolute path of the exe shell script for tests */
26 static std::string PADDEREXE_SCRIPT_FILENAME(PADDEREXE_APATH+"/padder.sh");
29 static int testssh_using_system() {
30 const char * cmd = "/usr/bin/ssh claui2p1 -l boulant 'cd /tmp && ./runCommand_padder_Mon_Feb_28_14_28_36_2011.sh'";
31 int result = system(cmd);
35 #endif // __TESTHELPER_HXX__