Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
logilab-common
Commits
af9e4aef3473
Commit
cf3e14f5
authored
Jul 20, 2020
by
Chris Lamb
Browse files
Make the build reproducible
parent
d500fa9023e5
Pipeline
#10391
passed with stages
in 1 minute and 34 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
logilab/common/proc.py
View file @
af9e4aef
...
...
@@ -171,13 +171,13 @@ class MemorySentinel(Thread):
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
.
setDaemon
(
True
)
self
.
gpid
=
gpid
self
.
gpid
=
gpid
if
gpid
is
not
None
else
os
.
getpid
()
def
stop
(
self
):
"""stop ap"""
...
...
logilab/common/pytest.py
View file @
af9e4aef
...
...
@@ -209,8 +209,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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment