From 5d322659567f004a444e0133ec40a61df5a46775 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 16 Jul 2024 11:14:06 -0700 Subject: [PATCH] unittests: use os.environ.get for MESON_UNIT_TEST_BACKEND Being unset shouldn't cause a ton of our tests to fail. --- unittests/baseplatformtests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py index 597633514..7ba2aaed4 100644 --- a/unittests/baseplatformtests.py +++ b/unittests/baseplatformtests.py @@ -52,7 +52,7 @@ class BasePlatformTests(TestCase): src_root = str(PurePath(__file__).parents[1]) self.src_root = src_root # Get the backend - self.backend_name = os.environ['MESON_UNIT_TEST_BACKEND'] + self.backend_name = os.environ.get('MESON_UNIT_TEST_BACKEND', 'ninja') backend_type = 'vs' if self.backend_name.startswith('vs') else self.backend_name self.backend = getattr(Backend, backend_type) self.meson_args = ['--backend=' + self.backend_name]