Since bc872d91765d we omit assert()s if the NDEBUG preprocessor symbol is
defined, as is the case with the standard library assert(3). However,
none of our tests verify that we can actually build that way. Add an
extra test to test/build/build.py tto verify this.
Fixes: bc872d91765d ("treewide: Spell ASSERT() as assert()")
Signed-off-by: David Gibson
---
test/build/build.py | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/test/build/build.py b/test/build/build.py
index eeee5acc..59de014a 100755
--- a/test/build/build.py
+++ b/test/build/build.py
@@ -77,6 +77,20 @@ for bin in BINARIES:
exeter.register('make_all', test_make, 'all', BINARIES)
+@exeter.test
+def test_ndebug() -> None:
+ """Test build with -NDEBUG
+
+ Tests that we can build all binaries with -DNDEBUG (warnings are
+ expected, though). Doesn't test that they actually work.
+ """
+
+ with clone_sources():
+ sh('make all CPPFLAGS="-DNDEBUG" CFLAGS="-w"')
+ for b in BINARIES:
+ assert Path(b).exists(), f"{b} wasn't made"
+
+
@exeter.test
def test_install_uninstall() -> None:
"""Test `make install` and `make uninstall`
--
2.54.0