how to set HAVE_CMOCKA
abartlet at samba.org
Tue Feb 20 23:01:12 UTC 2018
On Wed, 2018-02-21 at 10:13 +1300, Douglas Bagnall via samba-technical
> I am sure I am missing something obvious, but I can't seem to get
> HAVE_CMOCKA set in ./bin/default/include/config.h, which means cmocka
> tests in selftest/tests.py don't get run:
> selftest/tests.py:with_cmocka = ("HAVE_CMOCKA" in config_hash)
> if with_cmocka:
> plantestsuite("samba.unittests.krb5samba", "none",
> [os.path.join(bindir(), "default/testsuite/unittests/test_krb5samba")])
> I mean, I have cmocka. It is right there in third_party, and I
> installed the system one for good measure. The tests compile and run
> from the command line. What do I need to do to make
> configure.developer notice?
> Is the issue that selftest won't recognise cmocka output as results
> without some extra something?
Clearly this shows that we must avoid having tests conditional in this
way, it is just too easy to think we are testing when we don't. Also,
this is a really good argument for having patches create tests with a
knownfail and then remove it, because it shows the tests actually did
something in the first place.
Douglas has a patch for this under test, he will send it in once he is
happy with it.
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
More information about the samba-technical