[elbe-devel] [PATCH 6/6] tests: provide compatibility with pytest

Thomas Weißschuh thomas.weissschuh at linutronix.de
Tue Mar 5 16:36:13 CET 2024


The test parameter discovery uses elbe_dir and elbe_exe.
Make sure they are also set correctly when run via pytest.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 conftest.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/conftest.py b/conftest.py
new file mode 100644
index 000000000000..91a531725f76
--- /dev/null
+++ b/conftest.py
@@ -0,0 +1,9 @@
+import os
+import pytest
+
+import elbepack.directories
+
+
+def pytest_sessionstart(session):
+    elbepack.directories.elbe_exe = os.path.join(os.path.dirname(__file__), 'elbe')
+    elbepack.directories.elbe_dir = os.path.dirname(__file__)

-- 
2.44.0



More information about the elbe-devel mailing list