unittests: use os.environ.get for MESON_UNIT_TEST_BACKEND

Being unset shouldn't cause a ton of our tests to fail.
pull/13552/head
Dylan Baker 4 months ago committed by Eli Schwartz
parent 67b238d616
commit 5d32265956
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 2
      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]

Loading…
Cancel
Save