1 #ifndef __TESTHELPER_HXX__
2 #define __TESTHELPER_HXX__
5 // WARN: this file is DEPRECATED and/or should be used for test
6 // purpose only. The PADDER configuration is now read in a
7 // configuration file (padder.cfg).
10 #include <stdlib.h> // Standard C include (for getenv)
15 * This function returns the module SMESH installation root directory
18 static std::string SMESH_ROOT_DIR() {
19 static std::string * smesh_root_dir;
20 if ( smesh_root_dir == NULL ) {
21 char * SMESH_ROOT_DIR = getenv("SMESH_ROOT_DIR");
22 if ( SMESH_ROOT_DIR == NULL ) {
23 smesh_root_dir = new std::string("<path_undefined>");
26 smesh_root_dir = new std::string(SMESH_ROOT_DIR);
29 return *smesh_root_dir;
32 /*! Relative path of the directory containing data and exe for tests */
33 static std::string PADDEREXE_RPATH("/share/salome/resources/smesh/padderexe");
34 /*! Absolute path of the directory containing data and exe for tests */
35 static std::string PADDEREXE_APATH(SMESH_ROOT_DIR()+PADDEREXE_RPATH);
36 /*! Absolute path of the exe shell script for tests */
37 static std::string PADDEREXE_SCRIPT_FILENAME(PADDEREXE_APATH+"/padder.sh");
40 static int testssh_using_system() {
41 const char * cmd = "/usr/bin/ssh claui2p1 -l boulant 'cd /tmp && ./runCommand_padder_Mon_Feb_28_14_28_36_2011.sh'";
42 int result = system(cmd);
46 #endif // __TESTHELPER_HXX__