[Lldb-commits] [PATCH] D15318: Get rid of global variables in dotest.py

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 7 16:38:49 PST 2015


zturner created this revision.
zturner added reviewers: tfiala, clayborg.
zturner added a subscriber: lldb-commits.
Herald added subscribers: srhines, danalbert, tberghammer.

Since this is a big patch, you may just want to apply it locally and verify that nothing breaks.  I've tested both the old and new result formatter paths, and everything seems fine.  But unfortunately with Python you need 100% code coverage to be sure.  So let me know if this breaks anything.

    Get rid of global variables in dotest.py

    This moves all the global variables into a separate module called
    `configuration`.  This has a number of advantages:

    1. Configuration data is centrally maintained so it's easy to get
       a high level overview of what configuration data the test suite
       makes use of.
    2. The method of sharing configuration data among different parts
       of the test suite becomes standardized.  Previously we would
       put some things into the `lldb` module, some things into the
       `lldbtest_config` module, and some things would not get shared.
       Now everything is shared through one module and is available to
       the entire test suite.
    3. It opens the door to moving some of the initialization code into
       the `configuration` module, simplifying the implementation of
       `dotest.py`.

    There are a few stragglers that didn't get converted over to using
    the `configuration` module in this patch, because it would have grown
    the size of the patch unnecessarily.  This includes everything
    currently in the `lldbtest_config` module, as well as the
    `lldb.remote_platform` variable.  We can address these in the future.

http://reviews.llvm.org/D15318

Files:
  packages/Python/lldbsuite/test/__init__.py
  packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
  packages/Python/lldbsuite/test/benchmarks/disassembly/TestDisassembly.py
  packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py
  packages/Python/lldbsuite/test/benchmarks/disassembly/TestXcode41Vs42GDBDisassembly.py
  packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py
  packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py
  packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py
  packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py
  packages/Python/lldbsuite/test/benchmarks/stepping/TestRunHooksThenSteppings.py
  packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py
  packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
  packages/Python/lldbsuite/test/configuration.py
  packages/Python/lldbsuite/test/dotest.py
  packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py
  packages/Python/lldbsuite/test/functionalities/stop-hook/TestStopHookMechanism.py
  packages/Python/lldbsuite/test/functionalities/stop-hook/multiple_threads/TestStopHookMultipleThreads.py
  packages/Python/lldbsuite/test/lldbtest.py
  packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
  packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15318.42127.patch
Type: text/x-patch
Size: 105503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20151208/e6c1d1b2/attachment-0001.bin>


More information about the lldb-commits mailing list