[all-commits] [llvm/llvm-project] 307b7a: [lldb/test] Clean up version checking.

Jordan Rupprecht via All-commits all-commits at lists.llvm.org
Mon Sep 21 16:20:36 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 307b7a1d665898d0e980461919996b6a670a4847
      https://github.com/llvm/llvm-project/commit/307b7a1d665898d0e980461919996b6a670a4847
  Author: Jordan Rupprecht <rupprecht at google.com>
  Date:   2020-09-21 (Mon, 21 Sep 2020)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/lldbtest.py

  Log Message:
  -----------
  [lldb/test] Clean up version checking.

A few fixes while trying to figure out why tests are being skipped for arsenm:

- We check `$compiler -v`, but `-v` is `--verbose`, not `--version`. Use the long flag name.
- We check all lines matching `version ...`, but we should exit early for the first version string we see (which should be the main one). I'm not sure if this is the issue, but perhaps this is causing some users to skip some tests if another "version ..." is showing up later.
- Having `\.` in a python string is triggering pylint warnings, because it should be escaped as a regex string, e.g. `r'\.' However, `.` in a character class does not need to be escaped, as it matches only a literal `.` in that context.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D88051




More information about the All-commits mailing list