From 56987fdda403fbb280e63b471e5d73f8d520d821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Thu, 6 Apr 2023 16:27:07 +0200 Subject: [PATCH] Test: make run/test_mount.py not depend on installed osbuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the unit test depended on osbuild modules being installed on the system. As a result, this made the test not work in CI where we do not install osbuild when running unit tests. In addition, the stage executed by the unit test would use different version of osbuild internals than the version that is being tests, which could result in issues or not testing the intended code. Signed-off-by: Tomáš Hozza --- test/run/test_mount.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/run/test_mount.py b/test/run/test_mount.py index 95a304af..634fba1c 100755 --- a/test/run/test_mount.py +++ b/test/run/test_mount.py @@ -70,8 +70,11 @@ def create_image(tmpdir): } with make_arguments(mkfsopts): + env = os.environ.copy() + env["PYTHONPATH"] = os.curdir subprocess.run( [os.path.join(os.curdir, "stages", "org.osbuild.mkfs.fat")], + env=env, check=True, stdout=sys.stdout, stderr=sys.stderr)