Date: Mon, 19 Apr 2021 14:04:31 +0100 From: Alexander Richardson <arichardson@freebsd.org> To: Enji Cooper <yaneurabeya@gmail.com> Cc: Gleb Popov <arrowd@freebsd.org>, Yoshihiro Ota <ota@j.email.ne.jp>, freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: How do I write test cases for interactive commands? Message-ID: <CA%2BZ_v8qWO11X=F8Hsuz-D8ORuGzbJ3V33WuCcHgMsDoZPNxwYA@mail.gmail.com> In-Reply-To: <E5A3270D-A5BC-48FE-86D7-CD74B4BD308A@gmail.com> References: <20210414190252.69d4bb503fafc73ca1721eb2@j.email.ne.jp> <CALH631mBgRtc2dQAYcp%2BJ=M=Vu1pYDdXLjC-OS3sojs9p0=2FA@mail.gmail.com> <E5A3270D-A5BC-48FE-86D7-CD74B4BD308A@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 17 Apr 2021 at 17:14, Enji Cooper <yaneurabeya@gmail.com> wrote: > > > > On Apr 14, 2021, at 10:40 PM, Gleb Popov <arrowd@freebsd.org> wrote: > > =E2=80=A6 > > > Take a look at LLVM testing infrastructure and specifically the llvm-li= t > > 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. Alex
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BZ_v8qWO11X=F8Hsuz-D8ORuGzbJ3V33WuCcHgMsDoZPNxwYA>