aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-02-25 14:56:35 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-02-26 09:05:30 -0800
commite0795539598c8dd21756158d0687b461712f0a21 (patch)
tree1f93a5ffa2688f2696c20d96a71b971e1b7ce68d /run_unittests.py
parentec5fe58e6dd0f42f126b48d1ebd191deeea38541 (diff)
downloadmeson-e0795539598c8dd21756158d0687b461712f0a21.zip
meson-e0795539598c8dd21756158d0687b461712f0a21.tar.gz
meson-e0795539598c8dd21756158d0687b461712f0a21.tar.bz2
interpreter: correctly track whether a subproject is initialized
The way the tracking is currently done it works if no new subprojects are added to a configured build directory. For cases where we want to add a new subproject, it fails because we don't initialize builtins for that subproject. This corrects that by checking to see if the subproject already exists, and if it doesn't initializes the bultins for it. Fixes: #8421
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py
index f7f9fd5..acd775c 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -5544,6 +5544,13 @@ class AllPlatformTests(BasePlatformTests):
check_installed_files(['--skip-subprojects', 'bar'], main_expected)
check_installed_files(['--skip-subprojects', 'another'], all_expected)
+ def test_adding_subproject_to_configure_project(self) -> None:
+ srcdir = os.path.join(self.unit_test_dir, '92 new subproject in configured project')
+ self.init(srcdir)
+ self.build()
+ self.setconf('-Duse-sub=true')
+ self.build()
+
class FailureTests(BasePlatformTests):
'''