ublox-cellular-driver-gen Fork
Fork of ublox-cellular-driver-gen by
Diff: TESTS/unit_tests/file-system/main.cpp
- Revision:
- 3:027c9eaec52c
- Parent:
- 1:458e1b3d460c
- Child:
- 5:b935404dcf7c
--- a/TESTS/unit_tests/file-system/main.cpp Thu Jun 08 14:40:16 2017 +0100 +++ b/TESTS/unit_tests/file-system/main.cpp Tue Jun 13 00:29:44 2017 +0100 @@ -4,9 +4,15 @@ #include "utest.h" #include "UbloxCellularDriverGen.h" #include "UDPSocket.h" -#include "FEATURE_COMMON_PAL/nanostack-libservice/mbed-client-libservice/common_functions.h" +#ifdef FEATURE_COMMON_PAL #include "mbed_trace.h" #define TRACE_GROUP "TEST" +#else +#define tr_debug(format, ...) debug(format "\n", ## __VA_ARGS__) +#define tr_info(format, ...) debug(format "\n", ## __VA_ARGS__) +#define tr_warn(format, ...) debug(format "\n", ## __VA_ARGS__) +#define tr_error(format, ...) debug(format "\n", ## __VA_ARGS__) +#endif using namespace utest::v1; @@ -33,7 +39,7 @@ // The size of file to use. #ifndef MBED_CONF_APP_FILE_SIZE -# define MBED_CONF_APP_FILE_SIZE 42000 +# define MBED_CONF_APP_FILE_SIZE 12000 #endif // The name of the file to use. @@ -61,6 +67,7 @@ // PRIVATE FUNCTIONS // ---------------------------------------------------------------- +#ifdef FEATURE_COMMON_PAL // Locks for debug prints static void lock() { @@ -71,6 +78,7 @@ { mtx.unlock(); } +#endif // ---------------------------------------------------------------- // TESTS @@ -138,10 +146,13 @@ // ---------------------------------------------------------------- int main() { + +#ifdef FEATURE_COMMON_PAL mbed_trace_init(); mbed_trace_mutex_wait_function_set(lock); mbed_trace_mutex_release_function_set(unlock); +#endif // Run tests return !Harness::run(specification);