diff options
author | Simon Warta <[email protected]> | 2017-08-01 08:14:30 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2017-08-01 23:21:04 +0200 |
commit | 2ffb60e2ab66a05b4b9c46189aa3ebf7bce46ac3 (patch) | |
tree | af4de2c287081df36c919366137807e26088115b /src | |
parent | 04e403779881b208ff446bdb161e9d7358a1353a (diff) |
Add two digit clang version test from crystax ndk
Diffstat (limited to 'src')
-rwxr-xr-x | src/scripts/python_uniitests.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/scripts/python_uniitests.py b/src/scripts/python_uniitests.py index 0f41f3afa..fff32e03f 100755 --- a/src/scripts/python_uniitests.py +++ b/src/scripts/python_uniitests.py @@ -82,6 +82,20 @@ Candidate multilib: .;@m64 Selected multilib: .;@m64""" self.assertEqual(detector.version_from_compiler_output(compiler_out), "4.0") + def test_clang_version_two_digit(self): + # Output from Crystax NDK. Note: there is a trailing whitespace behind the version + # number for whatever reason. But let's keep the original output unchanged. + # pylint: disable=trailing-whitespace + detector = CompilerDetector("clang", "clang++", "android") + compiler_out = """clang version 3.7 +Target: i686-none-linux-android +Thread model: posix +Found candidate GCC installation: /foo/crystax-toolchains/x86/bin/../lib/gcc/i686-linux-android/4.9 +Selected GCC installation: /foo/crystax-toolchains/x86/bin/../lib/gcc/i686-linux-android/4.9 +Candidate multilib: .;@m32 +Selected multilib: .;@m32""" + self.assertEqual(detector.version_from_compiler_output(compiler_out), "3.7") + def test_msvc_version(self): detector = CompilerDetector("msvc", "cl.exe", "windows") compiler_out = """msvc_version.c |