diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2018-12-29 22:57:27 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2018-12-29 23:56:21 +0100 |
commit | e5099357c2b558148220e5cfeabbbcaa3d87ae42 (patch) | |
tree | 7583372ea6ce5d05d624dd1adc37ea19fa4366d3 /run_unittests.py | |
parent | 64372d5cfc2da366f4638aaa027ab326a6f89ab3 (diff) | |
download | meson-e5099357c2b558148220e5cfeabbbcaa3d87ae42.zip meson-e5099357c2b558148220e5cfeabbbcaa3d87ae42.tar.gz meson-e5099357c2b558148220e5cfeabbbcaa3d87ae42.tar.bz2 |
Tests and docs
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/run_unittests.py b/run_unittests.py index ec1af0f..07e6bf9 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -1199,7 +1199,12 @@ class BasePlatformTests(unittest.TestCase): args = [args] out = subprocess.check_output(self.mintro_command + args + [directory], universal_newlines=True) - return json.loads(out) + try: + obj = json.loads(out) + except Exception as e: + print(out) + raise e + return obj def assertPathEqual(self, path1, path2): ''' @@ -3089,6 +3094,16 @@ recommended as it is not supported on some platforms''') self.assertEqual(Path(testfile).read_text(), Path(goodfile).read_text()) + def test_introspect_buildoptions_without_configured_build(self): + testdir = os.path.join(self.unit_test_dir, '51 introspect buildoptions') + testfile = os.path.join(testdir, 'meson.build') + res_nb = self.introspect_directory(testfile, ['--buildoptions'] + self.meson_args) + self.init(testdir, default_args=False) + res_wb = self.introspect('--buildoptions') + self.maxDiff = None + self.assertListEqual(res_nb, res_wb) + + class FailureTests(BasePlatformTests): ''' Tests that test failure conditions. Build files here should be dynamically |