[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:

> Hi,
>
> 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?
>
> Cheers,
>
> Jan
>
>
> _______________________________________________
> clangd-dev mailing list
> clangd-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/clangd-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20180820/af61dfb1/attachment.html>


More information about the clangd-dev mailing list