testproc: Pass through full system environment
Let's just rely on tox for environment isolation, otherwise we just break stuff on Windows.
This commit is contained in:
parent
393178262e
commit
e51b763c93
@ -251,20 +251,11 @@ class Process(QObject):
|
||||
if args is None:
|
||||
args = self._default_args()
|
||||
|
||||
if env is None:
|
||||
procenv = QProcessEnvironment.systemEnvironment()
|
||||
else:
|
||||
procenv = QProcessEnvironment()
|
||||
procenv = QProcessEnvironment.systemEnvironment()
|
||||
if env is not None:
|
||||
for k, v in env.items():
|
||||
procenv.insert(k, v)
|
||||
|
||||
# so --no-xvfb and Qt on Windows works
|
||||
passthrough_vars = ['DISPLAY', 'HOME',
|
||||
'QT_QPA_PLATFORM_PLUGIN_PATH']
|
||||
for var in passthrough_vars:
|
||||
if var in os.environ:
|
||||
procenv.insert(var, os.environ[var])
|
||||
|
||||
self.proc.readyRead.connect(self.read_log)
|
||||
self.proc.setProcessEnvironment(procenv)
|
||||
self.proc.start(executable, exec_args + args)
|
||||
|
Loading…
Reference in New Issue
Block a user