[all-commits] [llvm/llvm-project] c15c29: [lldb/test] Reduce boilerplate in lldb-server tests

Pavel Labath via All-commits all-commits at lists.llvm.org
Fri Dec 18 04:17:29 PST 2020


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

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/decorators.py
    M lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
    M lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
    M lldb/test/API/tools/lldb-server/TestAppleSimulatorOSType.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteAttach.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteExitCode.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteExpeditedRegisters.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteHostInfo.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteKill.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteModuleInfo.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteProcessInfo.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteRegisterState.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteSingleStep.py
    M lldb/test/API/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
    M lldb/test/API/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
    M lldb/test/API/tools/lldb-server/TestGdbRemote_vCont.py
    M lldb/test/API/tools/lldb-server/TestGdbRemote_vContThreads.py
    M lldb/test/API/tools/lldb-server/TestLldbGdbServer.py
    M lldb/test/API/tools/lldb-server/commandline/TestGdbRemoteConnection.py
    M lldb/test/API/tools/lldb-server/commandline/TestStubSetSID.py
    M lldb/test/API/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
    M lldb/test/API/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
    M lldb/test/API/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
    M lldb/test/API/tools/lldb-server/memory-allocation/TestGdbRemoteMemoryAllocation.py
    M lldb/test/API/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py
    M lldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
    M lldb/test/API/tools/lldb-server/registers-target-xml-reading/TestGdbRemoteTargetXmlPacket.py
    M lldb/test/API/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
    M lldb/test/API/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py

  Log Message:
  -----------
  [lldb/test] Reduce boilerplate in lldb-server tests

Nearly all of our lldb-server tests have two flavours (lldb-server and
debugserver). Each of them is tagged with an appropriate decorator, and
each of them starts with a call to a matching "init" method. The init
calls are mandatory, and it's not possible to meaningfully combine them
with a different decorator.

This patch leverages the existing decorators to also tag the tests with
the appropriate debug server tag, similar to how we do with debug info
flavours. This allows us to make the "init" calls from inside the common
setUp method.




More information about the All-commits mailing list