|
|
@ -3226,6 +3226,7 @@ recommended as it is not supported on some platforms''') |
|
|
|
expected = { |
|
|
|
expected = { |
|
|
|
'descriptive_name': 'proj', |
|
|
|
'descriptive_name': 'proj', |
|
|
|
'version': 'undefined', |
|
|
|
'version': 'undefined', |
|
|
|
|
|
|
|
'subproject_dir': 'subprojects', |
|
|
|
'subprojects': [ |
|
|
|
'subprojects': [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
'descriptive_name': 'sub', |
|
|
|
'descriptive_name': 'sub', |
|
|
@ -3251,6 +3252,19 @@ recommended as it is not supported on some platforms''') |
|
|
|
name = entry['name'] |
|
|
|
name = entry['name'] |
|
|
|
self.assertEquals(entry['subproject'], expected[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') |
|
|
|
@skipIfNoExecutable('clang-format') |
|
|
|
def test_clang_format(self): |
|
|
|
def test_clang_format(self): |
|
|
|
if self.backend is not Backend.ninja: |
|
|
|
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, []) |
|
|
|
self.assertListEqual(dependencies_to_find, []) |
|
|
|
|
|
|
|
|
|
|
|
# Check projectinfo |
|
|
|
# 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 |
|
|
|
# Check targets |
|
|
|
targets_to_find = { |
|
|
|
targets_to_find = { |
|
|
|