Date: Wed, 14 Apr 2021 18:50:09 -0600 From: Alan Somers <asomers@freebsd.org> To: Yoshihiro Ota <ota@j.email.ne.jp> Cc: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org> Subject: Re: How do I write test cases for interactive commands? Message-ID: <CAOtMX2gMyy6=ZG2K2FaJPfSLUKn9WnFrCFPb7SFQMn9UaGz_FA@mail.gmail.com> In-Reply-To: <20210414190252.69d4bb503fafc73ca1721eb2@j.email.ne.jp> References: <20210414190252.69d4bb503fafc73ca1721eb2@j.email.ne.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 14, 2021 at 6:24 PM Yoshihiro Ota <ota@j.email.ne.jp> wrote: > Hi, > > I'm interested in writing some test cases for lldb and clang. > > How can I write interactive command in/out in Kyua? > Does anyone have some examples? > > I'm also interested in writing test programs to compile again clang to > find compiler/linker bugs. > Where do we use for temporary files and how do we clean up? > > Thanks, > Hiro > Interactive commands like those that print a prompt and wait for user input? Use lang/expect from ports. As for temporary files, Kyua creates a fresh temporary directory for every test. So you can write files to $PWD, and Kyua will automatically clean it up. -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2gMyy6=ZG2K2FaJPfSLUKn9WnFrCFPb7SFQMn9UaGz_FA>