mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
test runner
This commit is contained in:
parent
942a30daf9
commit
4e6ea0fc42
46
winbuild/test.py
Normal file
46
winbuild/test.py
Normal file
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess, os, multiprocessing
|
||||
|
||||
from config import *
|
||||
|
||||
def test_one(params):
|
||||
python, architecture = params
|
||||
try:
|
||||
print ("Running: %s, %s" %params)
|
||||
command = [r'%s\%s%s\Scripts\python.exe' % (VIRT_BASE, python, architecture),
|
||||
'Tests/run.py',
|
||||
'--installed']
|
||||
proc = subprocess.Popen(command,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE)
|
||||
proc.stdin.close()
|
||||
status = proc.wait()
|
||||
print ("Waiting on read: %s, %s" % params)
|
||||
trace = proc.stdout.read()
|
||||
proc.stdout.close()
|
||||
print ("Done with %s, %s -- %s" % (python, architecture, status ))
|
||||
return (python, architecture, status, trace)
|
||||
except Exception as msg:
|
||||
print ("Error with %s, %s: %s" % (python, architecture, msg))
|
||||
return (python, architecture, -1, str(msg))
|
||||
|
||||
|
||||
if __name__=='__main__':
|
||||
|
||||
os.chdir('..')
|
||||
#pool = multiprocessing.Pool()
|
||||
matrix = [(python, architecture) for python in pythons
|
||||
for architecture in ('', 'x64')]
|
||||
results = map(test_one, matrix)
|
||||
|
||||
for (python, architecture, status, trace) in results:
|
||||
print ("%s%s: %s" % (python, architecture, status))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user