summaryrefslogtreecommitdiff
path: root/gerbonara/tests/conftest.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/tests/conftest.py')
-rw-r--r--gerbonara/tests/conftest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gerbonara/tests/conftest.py b/gerbonara/tests/conftest.py
index 7d4e996..25e8014 100644
--- a/gerbonara/tests/conftest.py
+++ b/gerbonara/tests/conftest.py
@@ -40,6 +40,11 @@ def pytest_sessionstart(session):
def pytest_configure(config):
+ os.nice(20)
+ # Resvg can sometimes consume a lot of memory. Make sure we don't kill the user's session.
+ if (oom_adj := Path('/proc/self/oom_adj')).is_file():
+ oom_adj.write_text('15\n')
+
if 'PYTEST_XDIST_WORKER' in os.environ: # only run this on the controller
return