diff options
author | Chad Elliott <elliottc@objectcomputing.com> | 2019-06-06 09:15:02 -0500 |
---|---|---|
committer | Chad Elliott <elliottc@objectcomputing.com> | 2019-06-06 09:15:02 -0500 |
commit | 4c69b74225cf6d9479caa7a31ab38fa6d70ad669 (patch) | |
tree | d2d2f9fb0d357c58063bc310c2c82d4f200b9321 /ACE/tests | |
parent | a580273d5fc7a820ab23b1aa40faf23e97063000 (diff) | |
download | ATCD-4c69b74225cf6d9479caa7a31ab38fa6d70ad669.tar.gz |
- Use ACE_OS::send and ACE_OS::recv on MQX, instead of write and read.
- Added static casts where pid_t is assumed to be an int.
- Use configurable macro for the "use_select" parameter.
- MQX does not follow conventional standards when it comes to HTONS and NTOHS and must be configured accordingly.
- Modified ACE_Handle_Set so that the use of fd_array is not conditional upon ACE_WIN32. It is now enabled through ACE_HANDLE_SET_USES_FD_ARRAY.
- Implement UNIX File IO Functions for MQX in MQX_Filesystem.*
- Use the existing implementation to simulate condition variables.
- Use emulation for diropen on MQX as is done for Windows.
- Convert from MQX error to standard error number.
- Use _mqx_exit in ACE_OS::_exit for MQX.
- Added a nop in ACE_OS::ioctl for MQX.
- Added a definition of ACE_TMAIN for MQX so that MQX is initialized and RTCS and the MQX Filesystem code is initialized before calling ace_main_i().
- Fixed a compile error in SOCK_Dgram.cpp introduced months ago.
- Use struct initialization to avoid using the l_linger member directly.
- Modified ACE_Select_Reactor_Base to use a hash map for handle storage based on ACE_SELECT_REACTOR_BASE_USES_HASH_MAP instead of ACE_WIN32.
- Added the IAR compiler to define ACE_NOTREACHED(a) as empty.
- Made ACE_IPPROTO_TCP conditionally defined.
- Added error values required for ACE.
- Skip the wide-character strtok test if ACE_LACKS_WCSTOK is defined in ACE/tests/OS_Test.cpp.
- Added the ability to compile tests so that they output to stderr instead of a file.
Diffstat (limited to 'ACE/tests')
-rw-r--r-- | ACE/tests/OS_Test.cpp | 4 | ||||
-rw-r--r-- | ACE/tests/test_config.h | 39 |
2 files changed, 27 insertions, 16 deletions
diff --git a/ACE/tests/OS_Test.cpp b/ACE/tests/OS_Test.cpp index bf1101c1c77..65115e9b27b 100644 --- a/ACE/tests/OS_Test.cpp +++ b/ACE/tests/OS_Test.cpp @@ -548,6 +548,9 @@ string_emulation_test (void) // ======================================================================== // Test strtok (wchar_t version) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Testing strtok (wchar_t version)\n"))); +# ifdef ACE_LACKS_WCSTOK + ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" Skipped because platform lacks wcstok\n"))); +# else //FUZZ: enable check_for_lack_ACE_OS wchar_t strtok_r1[] = ACE_TEXT_WIDE ("A string of tokens"); @@ -565,6 +568,7 @@ string_emulation_test (void) ACE_TEXT_WIDE (" ")), ACE_TEXT_WIDE ("tokens") ) == 0); THIS_IS_NOT_AN_ASSERT_IT_IS_A_NON_DEBUG_TEST_AS_WELL (ACE_OS::strtok (0, ACE_TEXT_WIDE (" ")) == 0); +# endif /* ACE_LACKS_WCSTOK */ } diff --git a/ACE/tests/test_config.h b/ACE/tests/test_config.h index 1d1feaa3547..e606f048a21 100644 --- a/ACE/tests/test_config.h +++ b/ACE/tests/test_config.h @@ -88,36 +88,43 @@ size_t const ACE_MAX_THREADS = 4; #endif /* ACE_END_TEST */ #endif /* ACE_HAS_CONSOLE_TEST_OUTPUT */ -#ifndef ACE_START_TEST -#define ACE_START_TEST(NAME) \ +#ifdef ACE_TEST_LOG_TO_STDERR +# define ACE_TEST_LOG_MSG_FLAGS ACE_Log_Msg::STDERR | ACE_Log_Msg::VERBOSE_LITE +# define ACE_TEST_SET_OUTPUT(APPEND) +# define ACE_CLOSE_TEST_LOG +#else +# define ACE_TEST_LOG_MSG_FLAGS ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE +# define ACE_TEST_SET_OUTPUT(APPEND) \ + if (ace_file_stream::instance ()->set_output (program, APPEND) != 0) \ + ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); +# define ACE_CLOSE_TEST_LOG ace_file_stream::instance ()->close () +#endif + +#define ACE_START_TEST_TEMPLATE(NAME, APPEND) \ const ACE_TCHAR *program = NAME; \ - if (ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE) != 0) \ + if (ACE_LOG_MSG->open (program, ACE_TEST_LOG_MSG_FLAGS) != 0) \ ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("open log_msg failed")), -1); \ - if (ace_file_stream::instance()->set_output (program) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ + ACE_TEST_SET_OUTPUT (APPEND); \ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)) + +#ifndef ACE_START_TEST +# define ACE_START_TEST(NAME) ACE_START_TEST_TEMPLATE (NAME, 0) #endif /* ACE_START_TEST */ #ifndef ACE_END_TEST #define ACE_END_TEST \ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Ending %s test at %D\n"), program)); \ - ace_file_stream::instance()->close () + ACE_CLOSE_TEST_LOG; #endif /* ACE_END_TEST */ -#define ACE_CLOSE_TEST_LOG ace_file_stream::instance()->close () - -#define ACE_APPEND_LOG(NAME) \ - const ACE_TCHAR *program = NAME; \ - if (ACE_LOG_MSG->open (program, ACE_Log_Msg::OSTREAM | ACE_Log_Msg::VERBOSE_LITE) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("open log_msg failed")), -1); \ - if (ace_file_stream::instance()->set_output (program, 1) != 0) \ - ACE_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("%p\n"), ACE_TEXT ("set_output failed")), -1); \ - ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Starting %s test at %D\n"), program)); +#ifndef ACE_APPEND_LOG +# define ACE_APPEND_LOG(NAME) ACE_START_TEST_TEMPLATE (NAME, 1) +#endif /* ACE_APPEND_LOG */ #define ACE_END_LOG \ ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Ending %s test at %D\n\n"), program)); \ ACE_LOG_MSG->set_flags(ACE_Log_Msg::SILENT); \ - ace_file_stream::instance()->close (); + ACE_CLOSE_TEST_LOG; #if defined (ACE_VXWORKS) // This is the only way I could figure out to avoid an error |