Test compilation, documentation, submission format!

Andreas Schneider asn at samba.org
Fri Aug 18 09:44:12 UTC 2017


On Friday, 18 August 2017 10:56:52 CEST Dimitris Gravanis wrote:
> Hi,
> 
> This e-mail addresses a couple of issues that need to be solved in the
> next few days!
> 
> - My main issue is that I have trouble compiling the cmocka test .c
> files to run my tests. I get fatal errors (no such file or directory) on
> Samba headers (e.g replace.h), apparently the linker path needs to be
> set properly.

The test nees to be linked to the same libs as the orginal C file you want to 
test ...

> 
> How would I properly link with GCC? Let's say that I want to compile
> libcli/dns/cmocka-tests/dns_tcp_test.c, how will the command below be
> changed?

in the wscript_build file you need:

bld.SAMBA_BINARY('dns_tcp_test', deps='LIBTSOCKET tevent-util cmocka', ...)


	Andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org



More information about the samba-technical mailing list