[lldb/test] Support git commit version ids for clang.
authorJordan Rupprecht <rupprecht@google.com>
Wed, 5 Aug 2020 20:16:01 +0000 (13:16 -0700)
committerJordan Rupprecht <rupprecht@google.com>
Wed, 5 Aug 2020 20:16:01 +0000 (13:16 -0700)
commit1dbac09dd6ec8587ae7e16ed669bf73889a21957
treebb51b9a04a7848b4d08ff6f47da9cbfda7c5b9c9
parent7d057efddc00ba7d03e6e684f23dd9b09fbd0527
[lldb/test] Support git commit version ids for clang.

`getCompilerVersion` assumes that `clang --version` prints out a string like `version [0-9\.]+`.
If clang is built from trunk, the version line might look like `clang version trunk (123abc)`.

Since there isn't any way of knowing by the commit id alone whether one commit is newer or older than another git commit (or clang version), assume that clang with a version id like this is very close to trunk. For example, any tests with `@skipIf(compiler="clang", compiler_version=['<', '8'])` should be run.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D85248
lldb/packages/Python/lldbsuite/test/lldbtest.py