[rtems commit] testsuites: Add TESTS_USE_PRINTF
Sebastian Huber
sebh at rtems.org
Wed Feb 12 08:12:10 UTC 2014
Module: rtems
Branch: master
Commit: e11d9287cf6f8e2ed0a0e0a2577a0e72c7db8e49
Changeset: http://git.rtems.org/rtems/commit/?id=e11d9287cf6f8e2ed0a0e0a2577a0e72c7db8e49
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Feb 10 12:37:26 2014 +0100
testsuites: Add TESTS_USE_PRINTF
Make it possible to use normal printf() if requested to allow output of
floating point numbers.
---
testsuites/support/include/buffer_test_io.h | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/testsuites/support/include/buffer_test_io.h b/testsuites/support/include/buffer_test_io.h
index e0eb24d..03d5419 100644
--- a/testsuites/support/include/buffer_test_io.h
+++ b/testsuites/support/include/buffer_test_io.h
@@ -136,6 +136,22 @@ extern "C" {
}
#endif
+
+#elif defined(TESTS_USE_PRINTF)
+
+ #include <stdio.h>
+ #include <stdlib.h>
+
+ #define rtems_test_exit(_s) \
+ do { \
+ exit(_s); \
+ } while (0)
+
+ #define FLUSH_OUTPUT() \
+ do { \
+ fflush(stdout); \
+ } while (0)
+
/*
* USE IPRINT
*/
More information about the vc
mailing list