Skip to content
Commit 2a64fe66 authored by Inaky Perez-Gonzalez's avatar Inaky Perez-Gonzalez Committed by Anas Nashif
Browse files

ztest: prints newline after failure message



Most calls to ztest_assert() contain a message with no trailing
newline. So when it fails, we get (eg:):

  starting test - test_multilib

      Assertion failed at multilib.c:19: test_multilib: (c not equal to 323)
  smoke-test failed: wrong multilib selectedFAIL - test_multilib.

when we'd like to get:

  smoke-test failed: wrong multilib selected
  FAIL - test_multilib.

among other things, because it is easier to parse for correctness.

So this patch adds a trailing newline to the message instead of going
around trying to police every call site to do it.

print[kf]() is used vs k_str_out() as we need something that is
available also for unit tests. As this is not in any hot path,
performance wise is not such a big deal.

Signed-off-by: default avatarInaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
parent 27d34926
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment