From d4b5e32a1950cec0ac68e0d8776ae9bf118db181 Mon Sep 17 00:00:00 2001 From: azv Date: Mon, 22 Apr 2019 11:36:48 +0300 Subject: [PATCH] Print debug info while testing HDF (debug Jenkins hang) --- test.hdfs/test.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/test.hdfs/test.py b/test.hdfs/test.py index 69b88b668..969ac2ffc 100644 --- a/test.hdfs/test.py +++ b/test.hdfs/test.py @@ -17,7 +17,17 @@ if __name__ == '__main__': except: pass + # =========================================== + dbgFile = open(os.getcwd() + "/dbgfile", 'w') + print("TEST start", file=dbgFile) + dbgFile.close() + # =========================================== proc = Popen([salomeKernelDir + "/bin/salome/runSalome.py", "--modules", "SHAPER,GEOM", "--gui", "--ns-port-log=" + portlogfile, sourceDir + "/test_hdf.py", "args:" + testfile + "," + portlogfile + "," + testlogfile + "," + salomeKernelDir + "," + sourceDir]) + # =========================================== + dbgFile = open(os.getcwd() + "/dbgfile", 'a') + print("TEST Salome started", file=dbgFile) + dbgFile.close() + # =========================================== iter = 0 while not os.path.exists(portlogfile) and iter < 100: @@ -27,6 +37,11 @@ if __name__ == '__main__': while os.path.exists(portlogfile): sleep(0.1) + # =========================================== + dbgFile = open(os.getcwd() + "/dbgfile", 'a') + print("TEST process log file", file=dbgFile) + dbgFile.close() + # =========================================== isOk = True with open(testlogfile, 'r') as inputFile: s = inputFile.read() @@ -38,4 +53,9 @@ if __name__ == '__main__': except: pass + # =========================================== + dbgFile = open(os.getcwd() + "/dbgfile", 'a') + print("TEST finished {}".format(isOk), file=dbgFile) + dbgFile.close() + # =========================================== assert isOk, "Test failed" -- 2.39.2