[all-commits] [llvm/llvm-project] f8f4d8: [lldb] Improve CPUInfo test predicate

David Spickett via All-commits all-commits at lists.llvm.org
Tue Apr 6 02:47:05 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8f4d8f87ba4c1fbb18a4e7f4a5ea03a8b8ec061
      https://github.com/llvm/llvm-project/commit/f8f4d8f87ba4c1fbb18a4e7f4a5ea03a8b8ec061
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2021-04-06 (Tue, 06 Apr 2021)

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

  Log Message:
  -----------
  [lldb] Improve CPUInfo test predicate

Use a with block for reading the cpuinfo file.

When loading the file fails (or we're not on Linux)
return an empty string. Since all the callers are
going to do "x in self.getCPUInfo()".

Reviewed By: omjavaid

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




More information about the All-commits mailing list