diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-26 10:22:17 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-06-18 21:33:19 +0300 |
| commit | dc2d141b21179e9e2cedff175d247bfa6f9d776f (patch) | |
| tree | 9d260df5701da2c75c1306ace24d08313a3a9f2e /unittests | |
| parent | fe407c2f7e844514f950550db471386291206d55 (diff) | |
| download | meson-dc2d141b21179e9e2cedff175d247bfa6f9d776f.tar.gz | |
options: print option name before "as_root()" in errors
Starting with Meson 1.8.0, "meson configure" prints some options as
":foo" instead of "foo". Print the option as it was passed by the
user.
While at it, make errors more consistent and/or correct (e.g.
"Unknown option" instead of "Unknown options").
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'unittests')
| -rw-r--r-- | unittests/platformagnostictests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/platformagnostictests.py b/unittests/platformagnostictests.py index 75071d9da..579de98ef 100644 --- a/unittests/platformagnostictests.py +++ b/unittests/platformagnostictests.py @@ -175,7 +175,7 @@ class PlatformAgnosticTests(BasePlatformTests): with self.subTest('Changing the backend'): with self.assertRaises(subprocess.CalledProcessError) as cm: self.setconf('-Dbackend=none') - self.assertIn("ERROR: Tried to modify read only option 'backend'", cm.exception.stdout) + self.assertIn('ERROR: Tried to modify read only option "backend"', cm.exception.stdout) # Check that the new value was not written in the store. with self.subTest('option is stored correctly'): @@ -451,7 +451,7 @@ class PlatformAgnosticTests(BasePlatformTests): f.write(line) with self.assertRaises(subprocess.CalledProcessError) as e: self.setconf('-Dneg_int_opt=0') - self.assertIn('Unknown options: ":neg_int_opt"', e.exception.stdout) + self.assertIn('Unknown option: "neg_int_opt"', e.exception.stdout) def test_reconfigure_option(self) -> None: testdir = self.copy_srcdir(os.path.join(self.common_test_dir, '40 options')) @@ -501,7 +501,7 @@ class PlatformAgnosticTests(BasePlatformTests): os.unlink(os.path.join(testdir, 'meson_options.txt')) with self.assertRaises(subprocess.CalledProcessError) as e: self.setconf('-Dneg_int_opt=0') - self.assertIn('Unknown options: ":neg_int_opt"', e.exception.stdout) + self.assertIn('Unknown option: "neg_int_opt"', e.exception.stdout) def test_configure_options_file_added(self) -> None: """A new project option file should be detected.""" |
