aboutsummaryrefslogtreecommitdiff
path: root/run_unittests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-xrun_unittests.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py
index dcd3ced..32c7875 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3226,6 +3226,7 @@ recommended as it is not supported on some platforms''')
expected = {
'descriptive_name': 'proj',
'version': 'undefined',
+ 'subproject_dir': 'subprojects',
'subprojects': [
{
'descriptive_name': 'sub',
@@ -3251,6 +3252,19 @@ recommended as it is not supported on some platforms''')
name = entry['name']
self.assertEquals(entry['subproject'], expected[name])
+ def test_introspect_projectinfo_subproject_dir(self):
+ testdir = os.path.join(self.common_test_dir, '79 custom subproject dir')
+ self.init(testdir)
+ res = self.introspect('--projectinfo')
+
+ self.assertEqual(res['subproject_dir'], 'custom_subproject_dir')
+
+ def test_introspect_projectinfo_subproject_dir_from_source(self):
+ testfile = os.path.join(self.common_test_dir, '79 custom subproject dir', 'meson.build')
+ res = self.introspect_directory(testfile, '--projectinfo')
+
+ self.assertEqual(res['subproject_dir'], 'custom_subproject_dir')
+
@skipIfNoExecutable('clang-format')
def test_clang_format(self):
if self.backend is not Backend.ninja:
@@ -3404,7 +3418,7 @@ recommended as it is not supported on some platforms''')
self.assertListEqual(dependencies_to_find, [])
# Check projectinfo
- self.assertDictEqual(res['projectinfo'], {'version': '1.2.3', 'descriptive_name': 'introspection', 'subprojects': []})
+ self.assertDictEqual(res['projectinfo'], {'version': '1.2.3', 'descriptive_name': 'introspection', 'subproject_dir': 'subprojects', 'subprojects': []})
# Check targets
targets_to_find = {