From b33ac93c9d1075342d19847482b22c7c8c606b2c Mon Sep 17 00:00:00 2001
From: Florian Fischer <florian.fl.fischer@fau.de>
Date: Fri, 20 Nov 2020 13:07:49 +0100
Subject: [PATCH] [tests] don't undef NDEBUG for test executables

The explicit -UNDEBUG was introduced in the CMake to meson migration (62900cd1)
but as far as I can tell it was not present in the CMake tests definition.

It makes tests less reliable because it enables only some debug messages but not
all.
For example if emper is build with NDEBUG a test using a Semaphore
will output debug messages from the Semaphore but not from the Runtime.
---
 tests/meson.build | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tests/meson.build b/tests/meson.build
index e1c2f709..913a99ca 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -40,7 +40,6 @@ tests = {
 		  },
 		}
 
-undef_ndebug = '-UNDEBUG'
 test_env = environment(
   {
 	# Set glibc's MALLOC_PERTURB to 1. This means that newly allocated
@@ -66,8 +65,6 @@ foreach source, test_dict : tests
   test_exe = executable(test_name,
 						source,
 						include_directories: emper_all_include,
-						c_args: undef_ndebug,
-						cpp_args: undef_ndebug,
 						dependencies: emper_dependencies + test_dep,
 						link_with: [emper, emper_c],
 					   )
-- 
GitLab