diff options
| author | Xavier Claessens <xavier.claessens@collabora.com> | 2023-03-30 09:29:27 -0400 |
|---|---|---|
| committer | Xavier Claessens <xclaesse@gmail.com> | 2023-08-25 09:43:24 -0400 |
| commit | e3a71a7b58ac559f8669ca6fa95617a537b47f98 (patch) | |
| tree | b75a9a8c65ea3196bd743bb85b7d1a879c3d0c6a /unittests/baseplatformtests.py | |
| parent | 1bb29b1b329ec056c61a54070024b6b003cf5ca4 (diff) | |
| download | meson-e3a71a7b58ac559f8669ca6fa95617a537b47f98.tar.gz | |
msetup: Update options when builddir is already configured
`meson setup -Dfoo=bar builddir` command was returning success ignoring
new option values.
This now also update options. It is useful because it means
`meson setup -Dfoo=bar builddir && ninja -C builddir` works regardless
whether builddir already exists or not, and when done in a script,
changing options in the script will automatically trigger a reconfigure
if needed. This was already possible by always passing --reconfigure
argument, but that triggers a reconfigure even when options did not
change.
Diffstat (limited to 'unittests/baseplatformtests.py')
| -rw-r--r-- | unittests/baseplatformtests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/baseplatformtests.py b/unittests/baseplatformtests.py index 03ab1c521..514f3b759 100644 --- a/unittests/baseplatformtests.py +++ b/unittests/baseplatformtests.py @@ -303,6 +303,13 @@ class BasePlatformTests(TestCase): ensure_backend_detects_changes(self.backend) self._run(self.mconf_command + arg + [self.builddir]) + def getconf(self, optname: str): + opts = self.introspect('--buildoptions') + for x in opts: + if x.get('name') == optname: + return x.get('value') + self.fail(f'Option {optname} not found') + def wipe(self): windows_proof_rmtree(self.builddir) |
