summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-05-26 10:15:34 +0200
committerJussi Pakkanen <jussi.pakkanen@mailbox.org>2025-06-18 21:33:19 +0300
commit3317afe72da7798cbbefa55bf41f92f45e0fc91d (patch)
tree786ba1b4f3112ed9115c6be05198f54c8ecd95e9 /unittests
parent7c3354a7f41036e828d5a83f274952bf54811906 (diff)
downloadmeson-3317afe72da7798cbbefa55bf41f92f45e0fc91d.tar.gz
options: accept backend options as pending on first invocation
They must be there when running re-configuring, because the backend cannot be changed, but they can be pending on the first invocation. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'unittests')
-rw-r--r--unittests/optiontests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/optiontests.py b/unittests/optiontests.py
index 25cebba49..b2ca5e026 100644
--- a/unittests/optiontests.py
+++ b/unittests/optiontests.py
@@ -224,6 +224,12 @@ class OptionTests(unittest.TestCase):
self.assertTrue(optstore.accept_as_pending_option(OptionKey('b_ndebug')))
self.assertFalse(optstore.accept_as_pending_option(OptionKey('b_whatever')))
+ def test_backend_option_pending(self):
+ optstore = OptionStore(False)
+ # backend options are known after the first invocation
+ self.assertTrue(optstore.accept_as_pending_option(OptionKey('backend_whatever'), set(), True))
+ self.assertFalse(optstore.accept_as_pending_option(OptionKey('backend_whatever'), set(), False))
+
def test_reconfigure_b_nonexistent(self):
optstore = OptionStore(False)
optstore.set_from_configure_command(['b_ndebug=true'], [])