This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new d334c5eb6 apps/unity: Add printf configuration
d334c5eb6 is described below

commit d334c5eb67b685843826a99bbd9ed826980e5cc4
Author: Matteo Golin <matteo.go...@gmail.com>
AuthorDate: Wed Aug 6 10:10:33 2025 -0400

    apps/unity: Add printf configuration
    
    Allows the user to select whether or not they want access to the Unity
    ``TEST_PRINTF`` commands.
    
    Signed-off-by: Matteo Golin <matteo.go...@gmail.com>
---
 include/testing/unity_config.h | 6 ++++++
 testing/unity/Kconfig          | 8 +++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/include/testing/unity_config.h b/include/testing/unity_config.h
index 993399e01..adee96f8e 100644
--- a/include/testing/unity_config.h
+++ b/include/testing/unity_config.h
@@ -47,4 +47,10 @@
 #  define UNITY_OUTPUT_COLOR 1
 #endif
 
+/* Enable Unity TEST_PRINTF */
+
+#ifdef CONFIG_TESTING_UNITY_PRINT_FORMATTED
+#  define UNITY_INCLUDE_PRINT_FORMATTED 1
+#endif
+
 #endif /* UNITY_CONFIG_H */
diff --git a/testing/unity/Kconfig b/testing/unity/Kconfig
index 8e46422f0..fa6d501cd 100644
--- a/testing/unity/Kconfig
+++ b/testing/unity/Kconfig
@@ -29,6 +29,12 @@ config TESTING_UNITY_OUTPUT_COLOR
        bool "Output color"
        default n
        ---help---
-               Select this if your want to add some colors to your tests
+               Select this if you want to add some colors to your tests
+
+config TESTING_UNITY_PRINT_FORMATTED
+       bool "Unity printf"
+       default y
+       ---help---
+               Select this if you you want to use the Unity TEST_PRINTF macro.
 
 endif # TESTING_UNITY

Reply via email to