[Xapian-devel] TestCases Failure

Olly Betts olly at survex.com
Mon Jan 26 22:02:36 GMT 2015


On Tue, Jan 27, 2015 at 01:49:37AM +0500, Saad Ahmed wrote:
> On 26 January 2015 at 06:56, Olly Betts <olly at survex.com> wrote:
> 
> > On Sun, Jan 25, 2015 at 06:46:26PM +0500, Saad Ahmed wrote:
> > > I have been able to successfully build the code. But when I run the
> > > existing testcases (to verify everthing is working fine), It says 3 out
> > of
> > > the six testcases fails. Here is the report of the test cases.
> >
> > > Running tests with backend "inmemory"...
> > > Running test: topercent2...FAIL: apitest
> >
> > > Running test './queryparsertest' under eatmydata and valgrind
> > > Running test: qp_spell1...FAIL: queryparsertest
> >
> > > Running test './termgentest' under eatmydata and valgrind
> > > Running test: tg_spell1...FAIL: termgentest
> >
> > Is this with git master (if not, what version of Xapian)?
> >
> No its not with git master. Xapian's version is 1.3.2 (development
> version).

The script which automates most of the release process runs "make
distcheck", which runs the testsuite, so these tests didn't fail for me
when I made the 1.3.2 release.

> > You can get more information about the failure by running the testcases
> > by hand like so:
> >
> > ./runtest ./apitest --verbose topercent2
> 
> This command gives following output
> 
> "
> Running test './apitest --verbose topercent2' under eatmydata and valgrind
> Running tests with backend "none"...
> Running tests with backend "inmemory"...
> Running test: topercent2... DatabaseOpeningError: Couldn't detect type of
> database

topercent2 opens a local disk-based database as well as the one of the
backend type requested, so it can check the same results are given.
It must be the disk-based database which fails, but I can't see why.

I suspect you've ended up with a corrupt cached database, and this
exception isn't actually the same as the original problem (if a test
fails with an exception, the exception type should be reported even
in non-verbose mode, which it wasn't in your original log).

Can you run "make remove-cached-databases" in "tests", and then try
rerunning "./runtest ./apitest --verbose topercent2"?

> This shows that "apitest" is unable to find the test database. Am I missing
> any step?

For the disk-based backends, the test databases are created on demand by
the test harness if a suitable one doesn't exist, so no, you aren't
missing a step.

Cheers,
    Olly



More information about the Xapian-devel mailing list