From fdc09f15d2d9ea0e9ebadb926a5a6b00d4f52b3b Mon Sep 17 00:00:00 2001 From: degomme Date: Tue, 6 Sep 2016 10:46:13 +0200 Subject: [PATCH] Try to fix python tesh on Windows... 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 | 5 +---- tools/tesh/tesh.py | 4 +++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/cmake/Tests.cmake b/tools/cmake/Tests.cmake index f533ea4754..4badb641ea 100644 --- a/tools/cmake/Tests.cmake +++ b/tools/cmake/Tests.cmake @@ -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) diff --git a/tools/tesh/tesh.py b/tools/tesh/tesh.py index f5d32b8cb3..0beb5af2c5 100755 --- a/tools/tesh/tesh.py +++ b/tools/tesh/tesh.py @@ -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) -- 2.20.1