aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mtest.py
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-07-07 17:50:02 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-07-07 18:00:37 +0200
commit5215f4fa9898b5f56227cac6548857937adda8d1 (patch)
treeff6d50619ae8480ea0687f13a2316ec8399b849a /mesonbuild/mtest.py
parentb44a51d0fdd48089d2cc3864d34a3ccad77ec52d (diff)
downloadmeson-5215f4fa9898b5f56227cac6548857937adda8d1.zip
meson-5215f4fa9898b5f56227cac6548857937adda8d1.tar.gz
meson-5215f4fa9898b5f56227cac6548857937adda8d1.tar.bz2
cleanup self.options.wd
It is never None and always an absolute path
Diffstat (limited to 'mesonbuild/mtest.py')
-rw-r--r--mesonbuild/mtest.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py
index 8d002f6..4c1d00e 100644
--- a/mesonbuild/mtest.py
+++ b/mesonbuild/mtest.py
@@ -1486,8 +1486,7 @@ class TestHarness:
startdir = os.getcwd()
try:
- if self.options.wd:
- os.chdir(self.options.wd)
+ os.chdir(self.options.wd)
self.build_data = build.load(os.getcwd())
if not self.options.setup:
self.options.setup = self.build_data.test_setup_default_name
@@ -1657,8 +1656,7 @@ class TestHarness:
self.name_max_len = max([uniwidth(self.get_pretty_suite(test)) for test in tests])
startdir = os.getcwd()
try:
- if self.options.wd:
- os.chdir(self.options.wd)
+ os.chdir(self.options.wd)
runners = [] # type: T.List[SingleTestRunner]
for i in range(self.options.repeat):
runners.extend(self.get_test_runner(test) for test in tests)