mirror of
https://github.com/clearml/wexpect-venv
synced 2025-03-03 18:51:55 +00:00
minimal 12
This commit is contained in:
parent
4fc226b3d9
commit
9829f37245
@ -31,7 +31,7 @@ test_script:
|
|||||||
- cmd: C:\\Python37\\python issues\appveyor.py
|
- cmd: C:\\Python37\\python issues\appveyor.py
|
||||||
|
|
||||||
after_test:
|
after_test:
|
||||||
- python dump_logs.py
|
- C:\\Python37\\python dump_logs.py
|
||||||
|
|
||||||
#on_failure:
|
#on_failure:
|
||||||
# - python dump_logs.py
|
# - python dump_logs.py
|
||||||
|
27
dump_logs.py
27
dump_logs.py
@ -1,30 +1,17 @@
|
|||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
|
|
||||||
read_files = glob.glob("*.log")
|
read_files = []
|
||||||
|
|
||||||
|
read_files += glob.glob("*.log")
|
||||||
|
read_files += glob.glob(".wlog/*.log")
|
||||||
|
read_files += glob.glob("tests/.wlog/*.log")
|
||||||
|
|
||||||
|
read_files.sort(key=lambda x: os.path.getmtime(x))
|
||||||
|
|
||||||
for f in read_files:
|
for f in read_files:
|
||||||
print()
|
print()
|
||||||
print(f)
|
print(f)
|
||||||
print()
|
print()
|
||||||
with open(f, "r") as infile:
|
with open(f, "r") as infile:
|
||||||
print(infile.read())
|
|
||||||
|
|
||||||
read_files = glob.glob(".wlog/*.log")
|
|
||||||
|
|
||||||
for f in read_files:
|
|
||||||
print()
|
|
||||||
print(f)
|
|
||||||
print()
|
|
||||||
with open(f, "r") as infile:
|
|
||||||
print(infile.read())
|
|
||||||
|
|
||||||
|
|
||||||
read_files = glob.glob("tests/.wlog/*.log")
|
|
||||||
|
|
||||||
for f in read_files:
|
|
||||||
print()
|
|
||||||
print(f)
|
|
||||||
print()
|
|
||||||
with open(f, "rb") as infile:
|
|
||||||
print(infile.read())
|
print(infile.read())
|
@ -15,4 +15,5 @@ p=wexpect.legacy_wexpect.spawn(cmd)
|
|||||||
time.sleep(.5)
|
time.sleep(.5)
|
||||||
p.expect('app')
|
p.expect('app')
|
||||||
print(p.before)
|
print(p.before)
|
||||||
|
time.sleep(5)
|
||||||
|
|
||||||
|
@ -120,6 +120,7 @@ class ConsoleReaderBase:
|
|||||||
logger.info(e)
|
logger.info(e)
|
||||||
|
|
||||||
if just_init:
|
if just_init:
|
||||||
|
logger.info(f'just_init')
|
||||||
self.initConsole()
|
self.initConsole()
|
||||||
si = win32process.GetStartupInfo()
|
si = win32process.GetStartupInfo()
|
||||||
self.__childProcess, _, self.child_pid, self.__tid = win32process.CreateProcess(None, path, None, None, False,
|
self.__childProcess, _, self.child_pid, self.__tid = win32process.CreateProcess(None, path, None, None, False,
|
||||||
@ -127,7 +128,7 @@ class ConsoleReaderBase:
|
|||||||
self.child_process = psutil.Process(self.child_pid)
|
self.child_process = psutil.Process(self.child_pid)
|
||||||
|
|
||||||
logger.info(f'Child pid: {self.child_pid} Console pid: {self.console_pid}')
|
logger.info(f'Child pid: {self.child_pid} Console pid: {self.console_pid}')
|
||||||
time.sleep(5)
|
time.sleep(3)
|
||||||
|
|
||||||
self.readConsole(self.getCoord(0), self.getCoord(50))
|
self.readConsole(self.getCoord(0), self.getCoord(50))
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user