diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-07-13 11:03:46 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-07-17 19:20:33 +0300 |
commit | 3b3f53ab55f3f232c195f070b36f433bb8c5c60c (patch) | |
tree | da33a5762a6380059443927be0a70174d113827b /run_unittests.py | |
parent | 341d245e6841bbdadddb89450731a6dbae8b7fe2 (diff) | |
download | meson-3b3f53ab55f3f232c195f070b36f433bb8c5c60c.zip meson-3b3f53ab55f3f232c195f070b36f433bb8c5c60c.tar.gz meson-3b3f53ab55f3f232c195f070b36f433bb8c5c60c.tar.bz2 |
mintro: Fix section key in buildoptions
This reverts the changes to the `section` key for the
buildoptions and moves the machine choice into it's
own `machine` key.
With this commit the __undocumented__ breaking change
to the introspection format (introduced in 0.51.0) is
reverted and a new key is added instead.
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 93c9083..58f1854 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -2630,6 +2630,7 @@ int main(int argc, char **argv) { 'section': 'user', 'type': 'array', 'value': ['foo', 'bar'], + 'machine': 'any', } tdir = os.path.join(self.unit_test_dir, '19 array option') self.init(tdir) @@ -2655,6 +2656,7 @@ int main(int argc, char **argv) { 'section': 'user', 'type': 'array', 'value': ['foo', 'bar'], + 'machine': 'any', } tdir = os.path.join(self.unit_test_dir, '19 array option') self.init(tdir) @@ -2680,6 +2682,7 @@ int main(int argc, char **argv) { 'section': 'user', 'type': 'array', 'value': [], + 'machine': 'any', } tdir = os.path.join(self.unit_test_dir, '19 array option') self.init(tdir, extra_args='-Dlist=') @@ -3496,6 +3499,7 @@ recommended as it is not supported on some platforms''') ('section', str), ('type', str), ('description', str), + ('machine', str), ] buildoptions_typelist = [ @@ -3506,6 +3510,9 @@ recommended as it is not supported on some platforms''') ('array', list, []), ] + buildoptions_sections = ['core', 'backend', 'base', 'compiler', 'directory', 'user', 'test'] + buildoptions_machines = ['any', 'build', 'host'] + dependencies_typelist = [ ('name', str), ('compile_args', list), @@ -3561,6 +3568,8 @@ recommended as it is not supported on some platforms''') valid_type = True break + self.assertIn(i['section'], buildoptions_sections) + self.assertIn(i['machine'], buildoptions_machines) self.assertTrue(valid_type) if i['name'] in buildopts_to_find: self.assertEqual(i['value'], buildopts_to_find[i['name']]) |