[clangd-dev] Replacing -lit-test with a test utility?
Sam McCall via clangd-dev
clangd-dev at lists.llvm.org
Mon Aug 20 12:13:48 PDT 2018
It also doesn't seem to me that the benefits outweigh the costs. (Arguments
below). Not strongly opposed if others like it, but please make it C++
rather than python. (Happy to elaborate if that's controversial).
The divergence in code is small and isolated, and the production code *is*
covered by lit tests. This change to the tests seems unlikely to catch any
actual bugs. It seems just as likely we'll have bugs in the transcoder.
In addition to a more maintainable input format, -lit-test triggers a
couple more behaviors that are important for testing but not particularly
relevant to any particular test. One of the (IMO) antipatterns of lit tests
is they accumulate flags and noise that aren't particularly related to the
current test and obscure intent. Splitting out the transcoder would make it
harder to bundle our generic test behavior this way, as well as adding
noise to each test for pipeline mechanics.
On Tue, Aug 14, 2018, 14:52 Jan Korous via clangd-dev <
clangd-dev at lists.llvm.org> wrote:
> We were discussing https://reviews.llvm.org/D50641 over lunch and an idea
> to replace -lit-test by an utility appeared (shoutout to Dan Liew!).
> I don’t particularly like to have specific code path for testing but I see
> the value it provides. How about I implement a small python script or a
> binary that would read JSON strings separated by triple-dash from stdin and
> write proper LSP messages to stdout (with LSP headers prepended)?
> What do you think?
> clangd-dev mailing list
> clangd-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the clangd-dev