Opened 16 years ago

Closed 16 years ago

#301 closed defect (fixed)

Test failure: apitest, cursordelbug1

Reported by: Charlie Hull Owned by: Richard Boulton
Priority: normal Milestone: 1.0.9
Component: Test Suite Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Microsoft Windows

Description

Test fails as follows:

Running test: cursordelbug1...'..' is not recognized as an internal or external command, operable program or batch file.

FAILED

Quick look at the code indicates this is probably because it's using a Unixy path.

Attachments (2)

patch3.patch (589 bytes ) - added by Charlie Hull 16 years ago.
patch to fix test on windows
patch (565 bytes ) - added by Richard Boulton 16 years ago.
Backport of fix to 1.0 branch

Download all attachments as: .zip

Change History (11)

comment:1 by Richard Boulton, 16 years ago

Owner: changed from Olly Betts to Richard Boulton

Which bit of code has a "Unixy path" in it? Not quite sure why that would be a problem (if it's just a "/" separator or something) because the windows C library handles either '/' or '\' separators).

comment:2 by Richard Boulton, 16 years ago

Status: newassigned

comment:3 by Richard Boulton, 16 years ago

I'm guessing you mean the line in api_wrdb.cc where it says:

string cmd = "../bin/xapian-check .flint/dbwcursordelbug1";

This is later passed to system, and maybe the unix style separator causes problems here, somehow.

if you change the code in api_wrdb.cc (around line 1959 in SVN HEAD in the 1.0 branch) to read:

#ifdef WIN32

string cmd = "..
bin
xapian-check .flint
dbwcursordelbug1 >nul";

#else

string cmd = "../bin/xapian-check .flint/dbwcursordelbug1 >/dev/null";

#endif

(instead of the previous line, and the lines in the existing #ifdef), does that help?

by Charlie Hull, 16 years ago

Attachment: patch3.patch added

patch to fix test on windows

comment:4 by Charlie Hull, 16 years ago

OK, managed to fix it now. Patch attached.

comment:5 by Richard Boulton, 16 years ago

Underscores around WIN32 got lost in that patch attached by Charlie, but aren't important particularly (both are defined, but we probably want to keep the form with the underscores).

I've applied this patch (with the underscores retained) to the 1.0 branch, and an equivalent to trunk. This doesn't break compilation on linux, and will hopefully fix it on windows.

comment:6 by Olly Betts, 16 years ago

I've changed the patch on trunk to reuse existing machinery,

Can we resist backporting untested fixes to 1.0 branch please? I'm going to back that change out until we've had confirmation this is actually fixed.

by Richard Boulton, 16 years ago

Attachment: patch added

Backport of fix to 1.0 branch

comment:7 by Richard Boulton, 16 years ago

Charlie - please test that applying the fix attached to this bug as "patch" fixes the issue on windows; it's a backport of the updated fix Olly did on trunk using the XAPIAN_BIN_PATH machinery.

comment:8 by Charlie Hull, 16 years ago

Verified for 1.0 branch.

comment:9 by Olly Betts, 16 years ago

Resolution: fixed
Status: assignedclosed

Excellent, thanks for testing. Committed in r11568.

Note: See TracTickets for help on using tickets.