Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Apr 2021 08:17:03 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
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:  <76856.1618733823@critter.freebsd.dk>
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
--------
Enji Cooper writes:

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

Given that pretty much any software to come out of Google is usually
pretty overweight, in particular on dependencies:

In the V(arnish)Test tool we built a facility for interactive and
curses-based tests using teken, (which we got from FreeBSD):

	https://github.com/vtest/VTest

The code for that sub-part lives in:

	https://github.com/vtest/VTest/blob/master/src/vtc_process.c

Here is a typical test-case using it:

	https://github.com/varnishcache/varnish-cache/blob/master/bin/varnishtest=
/tests/u00008.vtc

The verbose output from that test can be seen here:

	http://phk.freebsd.dk/misc/u00008.txt

V(arnish)Test is a modular program, and if you leave out all the
HTTP related modules, and substitute 'sbuf' for 'vsb', and "TAILQ" for "VT=
AILQ"
it would fit nicely into FreeBSD.

-- =

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    =

Never attribute to malice what can adequately be explained by incompetence=
.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?76856.1618733823>