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)
Change History (11)
comment:1 by , 16 years ago
Owner: | changed from | to
---|
comment:2 by , 16 years ago
Status: | new → assigned |
---|
comment:3 by , 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?
comment:5 by , 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 , 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.
comment:7 by , 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:9 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Excellent, thanks for testing. Committed in r11568.
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).