diff options
author | Jakub Hrozek <jakub.hrozek@posteo.se> | 2015-02-04 18:01:02 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-02-08 10:29:16 +0100 |
commit | 3e3d6be03d7c596e3ded99061ff70e2bed2a4b2a (patch) | |
tree | 8a5c1b606219b5b691c62a5e54044575aa635243 /include | |
parent | 3e8d86a7adedd0645e4edb2954f045cb93fa82cc (diff) | |
download | cmocka-3e3d6be03d7c596e3ded99061ff70e2bed2a4b2a.tar.gz cmocka-3e3d6be03d7c596e3ded99061ff70e2bed2a4b2a.tar.bz2 cmocka-3e3d6be03d7c596e3ded99061ff70e2bed2a4b2a.zip |
cmocka: Add a function to select the message output type
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Diffstat (limited to 'include')
-rw-r--r-- | include/cmocka.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/cmocka.h b/include/cmocka.h index 5eef82f..efadd59 100644 --- a/include/cmocka.h +++ b/include/cmocka.h @@ -1952,6 +1952,23 @@ void print_error(const char* const format, ...) CMOCKA_PRINTF_ATTRIBUTE(1, 2); void vprint_message(const char* const format, va_list args) CMOCKA_PRINTF_ATTRIBUTE(1, 0); void vprint_error(const char* const format, va_list args) CMOCKA_PRINTF_ATTRIBUTE(1, 0); +enum cm_message_output { + CM_OUTPUT_STDOUT, +}; + +/** + * @brief Function to set the output format for a test. + * + * The ouput format for the test can either be set globally using this + * function or overriden with environment variable CMOCKA_MESSAGE_OUTPUT. + * + * The environment variable can be set to either STDOUT or SUBUNIT. + * + * @param[in] output The output format to use for the test. + * + */ +void cmocka_set_message_output(enum cm_message_output output); + /** @} */ #endif /* CMOCKA_H_ */ |