[all-commits] [llvm/llvm-project] 3f2fb0: [lldb] Make the lit configuration values optional ...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Fri Aug 28 18:08:37 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f2fb0132f7b09e1309e8f7e0b5ba8ea471b17e7
      https://github.com/llvm/llvm-project/commit/3f2fb0132f7b09e1309e8f7e0b5ba8ea471b17e7
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2020-08-28 (Fri, 28 Aug 2020)

  Changed paths:
    M lldb/test/API/lit.cfg.py
    M lldb/test/API/lldbtest.py

  Log Message:
  -----------
  [lldb] Make the lit configuration values optional for the API tests

LIT uses a model where the test suite is configurable trough a
lit.site.cfg file. Most of the time we use the lit.site.cfg with values
that match the current build configuration, generated by CMake.

Nothing prevents you from running the test suite with a different
configuration, either by overriding some of these values from the
command line, or by passing a different lit.site.cfg.

The latter is currently tedious. Many configuration values are optional
but they still need to be set because lit.cfg.py is accessing them
directly. This patch changes the code to use getattr to return the
attribute if it exists. This makes it possible to specify a minimal
lit.site.cfg with only the mandatory/desired configuration values.

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




More information about the All-commits mailing list