[all-commits] [llvm/llvm-project] db8420: [lldb/test] Replace ad-hoc server test choice with...

Pavel Labath via All-commits all-commits at lists.llvm.org
Thu Dec 10 07:22:02 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: db8420825073371ddc077b020634e71e315e38a1
      https://github.com/llvm/llvm-project/commit/db8420825073371ddc077b020634e71e315e38a1
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-12-10 (Thu, 10 Dec 2020)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/decorators.py
    M lldb/packages/Python/lldbsuite/test/dotest.py
    M lldb/packages/Python/lldbsuite/test/test_categories.py

  Log Message:
  -----------
  [lldb/test] Replace ad-hoc server test choice with test categories

This makes things consistent, and enables further simplifications down
the road.


  Commit: b505142fa5d301238796318d2d092d6fb3bd2d31
      https://github.com/llvm/llvm-project/commit/b505142fa5d301238796318d2d092d6fb3bd2d31
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2020-12-10 (Thu, 10 Dec 2020)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/lldbtest.py
    M lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

  Log Message:
  -----------
  [lldb/test] Change base class of lldb-server tests

lldb-server tests are a very special subclass of "api" tests. As they
communicate with lldb-server directly, they don't actually need most of
facilities provided by our TestBase class. In particular, they don't
need the ability to fork debug info flavours of tests (but they could
use debug server flavours).

This makes them inherit from "Base" instead. This avoids the need to
explicitly mark these tests as NO_DEBUG_INFO_TEST_CASE. Two additional
necessary tweaks were:
- move run_platform_command to the base (Base) class. This is used in
  one test, and can be generally useful when running tests remotely.
- add a "build" method, forwarding to buildDefault. This is to avoid
  updating each test case to use buildDefault (also, "build" sounds
  better). It might be interesting to refactor the (Test)Base classes so
  that all debug info flavour handling happens in TestBase, and the Base
  class provides a simple build method automatically.


Compare: https://github.com/llvm/llvm-project/compare/a7b2847216b4...b505142fa5d3


More information about the All-commits mailing list