tests: logging: log_api: Fix test suite setup

After switching to new ztest suite was wrongly setup and
no tests were run. Replaced ## with macro that resolves
and concatenates.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
This commit is contained in:
Krzysztof Chruscinski 2022-01-17 10:56:44 +01:00 committed by Anas Nashif
commit 1e74821896

View file

@ -660,7 +660,7 @@ static void log_api_suite_before(void *data)
} }
#define WRAP_TEST(test_name, suffix) \ #define WRAP_TEST(test_name, suffix) \
ZTEST(test_log_api_##suffix, test_name##_##suffix) \ ZTEST(UTIL_CAT(test_log_api_, suffix), UTIL_CAT(test_name, UTIL_CAT(_,suffix))) \
{ \ { \
test_name(); \ test_name(); \
} }
@ -670,7 +670,7 @@ static void log_api_suite_before(void *data)
#else #else
#define TEST_SUFFIX cc #define TEST_SUFFIX cc
#endif #endif
#define TEST_SUITE_NAME test_log_api_ ## TEST_SUFFIX #define TEST_SUITE_NAME UTIL_CAT(test_log_api_, TEST_SUFFIX)
ZTEST_SUITE(TEST_SUITE_NAME, NULL, log_api_suite_setup, ZTEST_SUITE(TEST_SUITE_NAME, NULL, log_api_suite_setup,
log_api_suite_before, NULL, log_api_suite_teardown); log_api_suite_before, NULL, log_api_suite_teardown);