How do I write test cases for interactive commands?

Enji Cooper yaneurabeya at gmail.com
Mon Apr 19 21:22:59 UTC 2021


> On Apr 19, 2021, at 6:04 AM, Alexander Richardson <arichardson at freebsd.org> wrote:
> 
> On Sat, 17 Apr 2021 at 17:14, Enji Cooper <yaneurabeya at gmail.com> wrote:
>> 
>> 
>>> On Apr 14, 2021, at 10:40 PM, Gleb Popov <arrowd at freebsd.org> wrote:
>> 
>>>> 
>>> Take a look at LLVM testing infrastructure and specifically the llvm-lit
>>> tool.
>> 
>> Does their test infrastructure leverage GoogleTest? If so, then the bulk majority of the work would just be integrating it into Kyua.
>> Cheers,
>> -Enji
>> 
> 
> If you are interested in writing tests for llvm/clang/lldb those
> should be submitted upstream and not be part of the FreeBSD source
> tree. Therefore, Kyua is almost certainly not the right solution.
> https://www.llvm.org/docs/TestingGuide.html explains how to write
> tests for LLVM, however, it is quite stale. I would suggest looking at
> existing tests inside LLVM and adjusting those to match what you want
> to test.
> 
> The FreeBSD src contrib/ import does not include the extensive LLVM
> testsuite, so you could start by looking at
> https://github.com/llvm/llvm-project/tree/main/clang/test for clang
> and https://github.com/llvm/llvm-project/tree/main/lldb/test for LLDB.
> I have never looked at the LLDB tests, but as far as I know there are
> tests that use python to drive the interaction.

Hi Alex,
	My suggestion was more that kyua should be used to run/aggregate the test information, not be the actual test framework/infrastructure/payload.
	I really appreciate the references :).
Cheers!
-Enji
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20210419/4245822d/attachment.sig>


More information about the freebsd-hackers mailing list