[neomutt-devel] Building and running tests
Richard Russon
rich at flatcap.org
Thu Sep 11 12:00:13 CEST 2025
Hi Filippo,
> I checked a couple of other distros and they are not running these tests
I'm not sure which, if any, distros run `make test`, but we have tests running frequently on GitHub.
They run on: Ubuntu, Fedora, MacOS, FreeBSD
> but this fails to compile with a few errors like this one:
> 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
> test/color/ansi.c: In function ‘test_ansi_color’:
> test/color/ansi.c:50:15: error: lvalue required as left operand of assignment
> 50 | COLOR_PAIRS = 256;
> | ^
Hmm...
ncurses exports a handful of variables, like COLOR_PAIRS, that we use in NeoMutt.
They tell us the capabilities of the terminal.
According to the man page, curs_variables(3X):
> Depending on ncurses's build-time configuration, the variables may
> instead be macros that provide read-only access to the library's
> state. In either case, applications should treat them as read-only to
> avoid confusing the library.
hehe
It seems that your ncurses is built more-strictly than mine.
**In the tests**, we alter the values, to test various functions with an
artificially limited number of colours. The alternative would be to
mess with the terminal settings for each test.
However, NeoMutt **DOES NOT** attempt to change these varaibles.
> I tried compiling manually with ./configure and make test and I get the same
> errors.
OK
> Is there something obvious I'm missing?
No
Please can you run `make -k test` and raise a GitHub issue with all the
build errors.
Cheers,
FlatCap / Rich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20250911/baa7181d/attachment.sig>
More information about the neomutt-devel
mailing list