Use cmocka_set_message_output as test function for cmocka presence

(cherry picked from commit 0158c1a4)
19 jobs for 351-fix-with-cmocka=path-build-v9_11 in 12 minutes and 30 seconds (queued for 10 seconds)