# HG changeset patch # User Sebastien Decugis # Date 1363874698 -3600 # Node ID aeb202e2dbef7f62a6b2c42baf37091234c239b3 # Parent 0f71fc6c069f0fe41f68f9fd3dcabf48a5d7438c Cleanup test messages diff -r 0f71fc6c069f -r aeb202e2dbef tests/tests.h --- a/tests/tests.h Thu Mar 21 15:04:14 2013 +0100 +++ b/tests/tests.h Thu Mar 21 15:04:58 2013 +0100 @@ -68,13 +68,13 @@ /* Define the macro to fail a test with a message */ #define FAILTEST( message... ){ \ TRACE_ERROR(message); \ - TRACE_NOTICE("Test %s failed", __FILE__); \ + TRACE_ERROR("FAILED: %s ", __STRIPPED_FILE__); \ exit(FAIL); \ } /* Define the macro to pass a test */ #define PASSTEST( ){ \ - TRACE_NOTICE("Test %s passed", __FILE__); \ + TRACE_NOTICE("PASS: %s", __STRIPPED_FILE__); \ (void)fd_core_shutdown(); \ (void)fd_core_wait_shutdown_complete(); \ (void)fd_thr_term(&signal_thr); \ @@ -88,16 +88,14 @@ /* Define the standard check routines */ #define CHECK( _val, _assert ){ \ if (test_verbo > 0) { \ - TRACE_DEBUG(INFO, \ - "%s:%-4d: CHECK( " #_assert " == "\ - #_val " )", \ - __FILE__, \ - __LINE__); \ + TRACE_NOTICE("CHECK( %s == %s )", \ + #_assert, \ + #_val); \ }{ \ __typeof__ (_val) __ret = (_assert); \ if (__ret != (_val)) { \ FAILTEST( "%s:%d: CHECK FAILED : %s == %lx != %lx", \ - __FILE__, \ + __STRIPPED_FILE__, \ __LINE__, \ #_assert, \ (unsigned long)__ret, \ @@ -198,7 +196,7 @@ CHECK( 0, fd_libproto_init() ); - fd_log_threadname(basename(fname)); + fd_log_threadname(fname); /* Parse the command line */ parse_cmdline(argc, argv); @@ -228,6 +226,6 @@ return; } -#define INIT_FD() test_init(argc, argv, __FILE__); +#define INIT_FD() test_init(argc, argv, __STRIPPED_FILE__) #endif /* _TESTS_H */