[neomutt-devel] Building and running tests

Carlos Henrique Lima Melara charlesmelara at riseup.net
Thu Sep 11 14:42:29 CEST 2025


Hi,

On Wed, Sep 10, 2025 at 06:28:50PM +0200, Filippo Bonazzi wrote:
> I am trying to build and run tests as part of the neomutt build for openSUSE
> Tumbleweed on OBS [0].
> 
> I thought it would be as easy as adding this in the spec file:
> > %check
> > %make_build test
> as sort of described on [1], but this fails to compile with a few errors like
> this one:
> 
> > [   33s] ccache cc -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -std=c11 -fno-delete-null-pointer-checks -D_ALL_SOURCE=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__ -D_XOPEN_SOURCE_EXTENDED -I/usr/include/lua5.4 -I/usr/include -I/usr/include -I/usr/include -DNCURSES_WIDECHAR -I/usr/include -I/usr/include/p11-kit-1 -I/usr/include -O2 -I. -I. -Wall  -I./test -MT test/color/ansi.o -MD -MP -MF test/color/ansi.Tpo -c -o test/color/ansi.o test/color/ansi.c
> > [   33s] test/color/ansi.c: In function ‘test_ansi_color’:
> > [   33s] test/color/ansi.c:50:15: error: lvalue required as left operand of assignment
> > [   33s]    50 |   COLOR_PAIRS = 256;
> > [   33s]       |               ^
> > [   33s] make: *** [Makefile:789: test/color/ansi.o] Error 1
> 
> I tried compiling manually with ./configure and make test and I get the same
> errors.
> 
> Is there something obvious I'm missing? Are these not the right tests to run?
> I checked a couple of other distros and they are not running these tests as
> part of their build, so maybe I'm the one doing something wrong.

Debian is running the unit tests [1] and they are all passing. As Stuart
mentioned, you need neomutt-test-files in the source tree and a bit of
setup described in the Readme, I added that to Debian's build
instructions [2].

Cheers,
Charles

[1] https://salsa.debian.org/charles/neomutt/-/jobs/8191709#L1380
[2] https://salsa.debian.org/charles/neomutt/-/blob/master/debian/rules?ref_type=heads#L44


More information about the neomutt-devel mailing list