[PATCH] D69002: [lit] Add back LitTestCase

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 13:37:29 PDT 2019


yln created this revision.
yln added a reviewer: ddunbar.
Herald added subscribers: llvm-commits, delcypher.
Herald added a project: LLVM.

This essentially reverts a commit [1] that removed the adaptor for
Python unittests.  The code has been slightly refactored to make it more
additive: all code is contained in LitTestCase.py.

Usage sites will require a small adaption:

  [old]
    import lit.discovery
    ...
    test_suite = lit.discovery.load_test_suite(...)
  
  [new]
    import lit.LitTestCase
    ...
    test_suite = lit.LitTestCase.load_test_suite(...)

This was put back on request by Daniel Dunbar, since I wrongly assumed
that the functionality is unused.  At least llbuild still uses this [2].

[1] 70ca752ccf6a8f362aea25ccd3ee2bbceca93b20 <https://reviews.llvm.org/rG70ca752ccf6a8f362aea25ccd3ee2bbceca93b20>
[2] https://github.com/apple/swift-llbuild/blob/master/utils/Xcode/LitXCTestAdaptor/LitTests.py#L16


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69002

Files:
  llvm/utils/lit/lit/LitTestCase.py
  llvm/utils/lit/tests/Inputs/unittest-adaptor/lit.cfg
  llvm/utils/lit/tests/Inputs/unittest-adaptor/test-one.txt
  llvm/utils/lit/tests/Inputs/unittest-adaptor/test-two.txt
  llvm/utils/lit/tests/unittest-adaptor.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69002.225105.patch
Type: text/x-patch
Size: 3357 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191015/20f90bc5/attachment.bin>


More information about the llvm-commits mailing list