Commit 7479fa63 authored by Jérome Perrin's avatar Jérome Perrin

ERP5TypeFunctionalTestCase: set $XORG_LOCK_DIR

By setting XORG_LOCK_DIR, we can isolate processes when running on slapos test
nodes, so that instead of having all test runners used the shared /tmp, which
eventually fail with

    EnvironmentError: All displays locked : [':123', ':124', ':125', ...

errors when too many testnodes are currently running or too many testnodes have
left some stale lock files. Eventhough since fbdb4ec9 (test: Do not check
presence of lockfile in /tmp/ to assume Xvfb is running for this display, 2017-06-07)
things have improved, it happens that the lock files are owned by a different
unix user (because it was left by another testnode), then Xvfb is not able to
remove the stale lock file.
parent 8ecececb
Pipeline #16067 failed with stage
...@@ -145,6 +145,9 @@ class Xvfb(Process): ...@@ -145,6 +145,9 @@ class Xvfb(Process):
""" """
def run(self): def run(self):
# set XORG_LOCK_DIR which is used by slapos pathed xorg, so that Xvfb and
# firefox don't use the system /tmp
os.environ['XORG_LOCK_DIR'] = os.environ['TMPDIR']
for display_try in self.display_list: for display_try in self.display_list:
self._runCommand(display_try) self._runCommand(display_try)
if self.process.poll() is None: if self.process.poll() is None:
......
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