[Lldb-commits] [PATCH] D34853: Fix (benignly) incorrect GoogleTest specs in various lit configs.

David L. Jones via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 29 17:52:28 PDT 2017


dlj created this revision.
dlj added projects: lld, clang.
Herald added subscribers: mehdi_amini, sanjoy.

The GoogleTest lit format accepts two parameters to its constructor: a subdirectory to find test binaries, and a required suffix for the test filenames. Typically, the config should look like this:

  config.test_format = lit.formats.GoogleTest('.', 'Tests')

This will search the current directory for filenames ending with 'Tests', and run the matching binaries it finds as GoogleTests. It appears that several lit configs pass a different value for the subdirectory, however. They use "config.llvm_build_mode", which would be set by @LLVM_BUILD_MODE@, but never is. Fortunately, this means that the Python lookup passes and finds an empty string, which means that lit searches the current directory.

I can imagine cases where looking for a build-specific subdirectory might have worked in the paste, but I suspect it is no longer the right behaviour to check with cmake. So, I'm removing the (somewhat confusing) LLVM_BUILD_MODE logic altogether.


Repository:
  rL LLVM

https://reviews.llvm.org/D34853

Files:
  cfe/trunk/test/Unit/lit.cfg
  cfe/trunk/test/Unit/lit.site.cfg.in
  compiler-rt/trunk/test/lit.common.configured.in
  compiler-rt/trunk/unittests/lit.common.unit.cfg
  compiler-rt/trunk/unittests/lit.common.unit.configured.in
  lld/trunk/test/Unit/lit.cfg
  lld/trunk/test/Unit/lit.site.cfg.in
  lldb/trunk/lit/Unit/lit.site.cfg.in
  llvm/trunk/test/Unit/lit.site.cfg.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34853.104798.patch
Type: text/x-patch
Size: 6950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20170630/da0fe72e/attachment-0001.bin>


More information about the lldb-commits mailing list