[all-commits] [llvm/llvm-project] 146334: [lldb/Test] Fix substrs order in self.expect for t...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Fri Jan 31 13:36:41 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1463341f4bd7a584bfb07ad13c1c84ecfc7cb664
      https://github.com/llvm/llvm-project/commit/1463341f4bd7a584bfb07ad13c1c84ecfc7cb664
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-01-31 (Fri, 31 Jan 2020)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py
    M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
    M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
    M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py
    M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py
    M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSError.py
    M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
    M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
    M lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py

  Log Message:
  -----------
  [lldb/Test] Fix substrs order in self.expect for the remaining tests (NFC)

Currently the substrs parameter takes a list of strings that need to be
found but the ordering isn't checked. D73766 might change that so this
changes a several tests so that the order of the strings in the substrs
list is in the order in which they appear in the output.


  Commit: d02fb002dd6b57e2ecbc3a4c3df91f5ed3a6054e
      https://github.com/llvm/llvm-project/commit/d02fb002dd6b57e2ecbc3a4c3df91f5ed3a6054e
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-01-31 (Fri, 31 Jan 2020)

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

  Log Message:
  -----------
  [lldb/Test] Make substrs argument to self.expect ordered.

This patch changes the behavior of the substrs argument to self.expect.
Currently, the elements of substrs are unordered and as long as the
string appears in the output, the assertion passes.

We can be more precise by requiring that the substrings be ordered in
the way they appear. My hope is that this will make it harder to
accidentally pass a check because a string appears out of order.

Differential revision: https://reviews.llvm.org/D73766


Compare: https://github.com/llvm/llvm-project/compare/75c328179e00...d02fb002dd6b


More information about the All-commits mailing list