Commit bbe732ec authored by Chris Lamb's avatar Chris Lamb
Browse files

Make the build reproducible

branch : 1.6
parent 47df0ccda368
......@@ -164,13 +164,13 @@ class MemorySentinel(Thread):
"""A class checking a process don't use too much memory in a separated
daemonic thread
def __init__(self, interval, memory_limit, gpid=os.getpid()):
def __init__(self, interval, memory_limit, gpid=None):
Thread.__init__(self, target=self._run, name="Test.Sentinel")
self.memory_limit = memory_limit
self._stop = Event()
self.interval = interval
self.gpid = gpid
self.gpid = gpid if gpid is not None else os.getpid()
def stop(self):
"""stop ap"""
......@@ -174,8 +174,10 @@ def load_pytest_conf(path, parser):
return namespace.get('CustomPyTester', PyTester)
def project_root(parser, projdir=os.getcwd()):
def project_root(parser, projdir=None):
"""try to find project's root and add it to sys.path"""
if projdir is None:
projdir = os.getcwd()
previousdir = curdir = osp.abspath(projdir)
testercls = PyTester
conf_file_path = osp.join(curdir, CONF_FILE)
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