Commit fa99ff75 authored by Brian Kearns's avatar Brian Kearns

merge heads

parents 9cecd173 2c187766
......@@ -27,4 +27,21 @@ if __name__ == '__main__':
sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
import pytest
import pytest_cov
if sys.platform == 'win32':
#Try to avoid opeing a dialog box if one of the tests causes a system error
# We do this in runner.py, but buildbots run twisted which ruins inheritance
# in windows subprocesses.
import ctypes
winapi = ctypes.windll.kernel32
SetErrorMode = winapi.SetErrorMode
SetErrorMode.argtypes=[ctypes.c_int]
SEM_FAILCRITICALERRORS = 1
SEM_NOGPFAULTERRORBOX = 2
SEM_NOOPENFILEERRORBOX = 0x8000
flags = SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX | SEM_NOOPENFILEERRORBOX
#Since there is no GetErrorMode, do a double Set
old_mode = SetErrorMode(flags)
SetErrorMode(old_mode | flags)
sys.exit(pytest.main(plugins=[pytest_cov]))
......@@ -407,7 +407,8 @@ def main(args):
run_param.dry_run = opts.dry_run
if run_param.dry_run:
print >>out, run_param.__dict__
print >>out, '\n'.join([str((k, getattr(run_param, k))) \
for k in dir(run_param) if k[:2] != '__'])
res = execute_tests(run_param, testdirs, logfile, out)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment