aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Hostettler <textshell@uchuujin.de>2019-04-15 23:13:50 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2019-05-02 23:55:53 +0300
commited109801c6ac37d77ddb10ad6d1fa73c5482b7fa (patch)
tree0eec469e1bfc8eeed60a2ee4d01125ba10c63665
parentedb1229a48a4009bde5e04c5324ef86f1e2957bb (diff)
downloadmeson-ed109801c6ac37d77ddb10ad6d1fa73c5482b7fa.zip
meson-ed109801c6ac37d77ddb10ad6d1fa73c5482b7fa.tar.gz
meson-ed109801c6ac37d77ddb10ad6d1fa73c5482b7fa.tar.bz2
munstable_coredata: Adapt to coredata changes.
-rw-r--r--mesonbuild/munstable_coredata.py11
-rwxr-xr-xrun_unittests.py6
2 files changed, 13 insertions, 4 deletions
diff --git a/mesonbuild/munstable_coredata.py b/mesonbuild/munstable_coredata.py
index 7957222..f16468c 100644
--- a/mesonbuild/munstable_coredata.py
+++ b/mesonbuild/munstable_coredata.py
@@ -31,9 +31,12 @@ def dump_compilers(compilers):
print(' ' + lang + ':')
print(' Id: ' + compiler.id)
print(' Command: ' + ' '.join(compiler.exelist))
- print(' Full version: ' + compiler.full_version)
- print(' Detected version: ' + compiler.version)
- print(' Detected type: ' + repr(compiler.compiler_type))
+ if compiler.full_version:
+ print(' Full version: ' + compiler.full_version)
+ if compiler.version:
+ print(' Detected version: ' + compiler.version)
+ if hasattr(compiler, 'compiler_type'):
+ print(' Detected type: ' + repr(compiler.compiler_type))
#pprint.pprint(compiler.__dict__)
@@ -97,7 +100,7 @@ def run(options):
native = []
cross = []
for dep_key, dep in sorted(v.items()):
- if dep_key[2]:
+ if dep_key[1]:
cross.append((dep_key, dep))
else:
native.append((dep_key, dep))
diff --git a/run_unittests.py b/run_unittests.py
index 2683e01..3a473ea 100755
--- a/run_unittests.py
+++ b/run_unittests.py
@@ -3642,6 +3642,12 @@ recommended as it is not supported on some platforms''')
self.maxDiff = None
self.assertListEqual(res_nb, expected)
+ def test_unstable_coredata(self):
+ testdir = os.path.join(self.common_test_dir, '1 trivial')
+ self.init(testdir)
+ # just test that the command does not fail (e.g. because it throws an exception)
+ self._run([*self.meson_command, 'unstable-coredata', self.builddir])
+
class FailureTests(BasePlatformTests):
'''
Tests that test failure conditions. Build files here should be dynamically