diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2018-11-29 14:21:07 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-01-06 12:19:29 +0100 |
commit | b91c5aad854bff3a13c27aa1a6ade85ded216207 (patch) | |
tree | 134cb258adb2103751e47c0c50ff4c850f3c33d2 /run_unittests.py | |
parent | c4eb5c79fe89ca49dd9d9f5bd72be99d919dd2a0 (diff) | |
download | meson-b91c5aad854bff3a13c27aa1a6ade85ded216207.zip meson-b91c5aad854bff3a13c27aa1a6ade85ded216207.tar.gz meson-b91c5aad854bff3a13c27aa1a6ade85ded216207.tar.bz2 |
Update intro dump on meson configure
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/run_unittests.py b/run_unittests.py index 811df6b..492a22c 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -3256,6 +3256,32 @@ recommended as it is not supported on some platforms''') self.assertEqual(res_all, res_file) + def test_introspect_config_update(self): + testdir = os.path.join(self.unit_test_dir, '49 introspection') + introfile = os.path.join(self.builddir, 'meson-introspection.json') + self.init(testdir) + self.assertPathExists(introfile) + with open(introfile, 'r') as fp: + res1 = json.load(fp) + + self.setconf('-Dcpp_std=c++14') + self.setconf('-Dbuildtype=release') + + for idx, i in enumerate(res1['buildoptions']): + if i['name'] == 'cpp_std': + res1['buildoptions'][idx]['value'] = 'c++14' + if i['name'] == 'buildtype': + res1['buildoptions'][idx]['value'] = 'release' + if i['name'] == 'optimization': + res1['buildoptions'][idx]['value'] = '3' + if i['name'] == 'debug': + res1['buildoptions'][idx]['value'] = False + + with open(introfile, 'r') as fp: + res2 = json.load(fp) + + self.assertDictEqual(res1, res2) + class FailureTests(BasePlatformTests): ''' Tests that test failure conditions. Build files here should be dynamically |