This is an archive of the discontinued LLVM Phabricator instance.

[lit] Add back LitTestCase
ClosedPublic

Authored by yln on Oct 15 2019, 1:32 PM.

Details

Summary

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
[2] https://github.com/apple/swift-llbuild/blob/master/utils/Xcode/LitXCTestAdaptor/LitTests.py#L16

Diff Detail

Event Timeline

yln created this revision.Oct 15 2019, 1:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptOct 15 2019, 1:32 PM
ddunbar accepted this revision.Oct 15 2019, 1:40 PM
This revision is now accepted and ready to land.Oct 15 2019, 1:40 PM
This revision was automatically updated to reflect the committed changes.