Facing problems with tests

Olly Betts olly at survex.com
Sat Jun 18 09:31:11 BST 2016


On Sat, Jun 18, 2016 at 10:50:04AM +0530, Richhiey Thomas wrote:
> api_cluster.cc: In function ‘bool test_round_robin1()’:
> ./harness/testsuite.h:285:38: warning: no previous declaration for ‘bool
> test_round_robin1()’ [-Wmissing-declarations]
>  #define DEFINE_TESTCASE(S,COND) bool test_##S()
>                                       ^
> api_cluster.cc:69:1: note: in expansion of macro ‘DEFINE_TESTCASE’
>  DEFINE_TESTCASE(round_robin1, backend)
>  ^
> 
> If I'm not wrong, the collate-test perl script specified in makefile.am is
> supposed to expand the macro and add it to the header file, api_all.h and
> api_collated.h. But that doesn't seem to happen in my case.

That's about right (the perl script just searches for uses of the macro
- it doesn't expand it).

Is your tree configured in maintainer mode?  If you use the top-level
configure, this is automatic.  If you use the xapian-core-level
configure, then it won't be.

You can pass --enable-maintainer-mode by hand, but don't do this unless
you have a very good reason to - use the top-level configure, as it also
hooks up omega and the bindings to build against the in-tree
xapian-core, and installs the same versions of some key tools as we use
to bootstrap snapshots and releases, which can avoid some frustrating
problems.

If not that, have you added the new api_cluster.cc file to
the collated_apitest_sources list in tests/Makefile.am?

Cheers,
    Olly



More information about the Xapian-devel mailing list