mirror of
https://github.com/clearml/wexpect-venv
synced 2025-03-03 10:41:37 +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
|
||||
|
||||
after_test:
|
||||
- python dump_logs.py
|
||||
- C:\\Python37\\python dump_logs.py
|
||||
|
||||
#on_failure:
|
||||
# - python dump_logs.py
|
||||
|
27
dump_logs.py
27
dump_logs.py
@ -1,30 +1,17 @@
|
||||
import os
|
||||
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:
|
||||
print()
|
||||
print(f)
|
||||
print()
|
||||
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())
|
@ -15,4 +15,5 @@ p=wexpect.legacy_wexpect.spawn(cmd)
|
||||
time.sleep(.5)
|
||||
p.expect('app')
|
||||
print(p.before)
|
||||
time.sleep(5)
|
||||
|
||||
|
@ -120,6 +120,7 @@ class ConsoleReaderBase:
|
||||
logger.info(e)
|
||||
|
||||
if just_init:
|
||||
logger.info(f'just_init')
|
||||
self.initConsole()
|
||||
si = win32process.GetStartupInfo()
|
||||
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)
|
||||
|
||||
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))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user