Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Try to fix python tesh on Windows...
authordegomme <augustin.degomme@unibas.ch>
Tue, 6 Sep 2016 08:46:13 +0000 (10:46 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Tue, 6 Sep 2016 08:46:13 +0000 (10:46 +0200)
This adds a dirty bit for smpirun, as python popen struggles with executing scripts, so sh needs to be explicitely added in this case.

tools/cmake/Tests.cmake
tools/tesh/tesh.py

index f533ea4..4badb64 100644 (file)
@@ -7,10 +7,7 @@ IF(enable_smpi AND NOT WIN32)
 ENDIF()
 
 SET(TESH_OPTION "--ignore-jenkins")
-SET(TESH_COMMAND ${CMAKE_BINARY_DIR}/bin/tesh)
-IF(CMAKE_HOST_WIN32)
-  SET(TESH_OPTION ${TESH_OPTION} --timeout 50)
-ENDIF()
+SET(TESH_COMMAND "${PYTHON_EXECUTABLE}" ${CMAKE_BINARY_DIR}/bin/tesh)
 
 IF(enable_memcheck)
   INCLUDE(FindValgrind)
index f5d32b8..0beb5af 100755 (executable)
@@ -288,7 +288,9 @@ class Cmd(object):
         if TeshState().wrapper is not None:
             self.timeout *= 20
             self.args = TeshState().wrapper + self.args
-            
+        elif re.match(".*smpirun.*", self.args) is not None:
+            self.args = "sh " + self.args 
+
         self.args += TeshState().args_suffix
         
         print("["+FileReader().filename+":"+str(self.linenumber)+"] "+self.args)