Skip to content

Commit e87e4c7

Browse files
FiveTechSoftclaude
andcommitted
test(smoke): idxprobe — AdsConnect for /ads local mode
ADSCDX local-mode USE needs an AdsConnect first (ADSCDX/4097 unknown connection otherwise); idxprobe could not run /ads. Adds idxcheck_build.bat as the build+run driver. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cdea2d3 commit e87e4c7

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@echo off
2+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" >nul
3+
set ACE=C:\OpenADS\build\release-x64\src\Release
4+
set PATH=c:\harbour\bin\win\msvc64;%ACE%;%PATH%
5+
cd /d "%~dp0"
6+
echo [idx] hbmk2 build...
7+
hbmk2 -comp=msvc64 -gtcgi -I"c:\harbour\contrib\rddads" -lrddads -L"%ACE%" -lace64 -llegacy_stdio_definitions -loldnames idxprobe.prg
8+
if errorlevel 1 goto :err
9+
echo.
10+
echo [idx] === DBFCDX baseline ===
11+
.\idxprobe.exe
12+
echo.
13+
echo [idx] === ADSCDX -^> OpenADS ===
14+
.\idxprobe.exe /ads
15+
goto :eof
16+
:err
17+
echo BUILD FAILED %errorlevel%
18+
exit /b %errorlevel%

tests/smoke/harbour/idxprobe.prg

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ PROCEDURE Main( cMode )
2424
StageDbf( cDir, cDbf, aNames )
2525

2626
IF lAds
27-
AdsSetServerType( 1 )
28-
AdsSetFileType( 2 )
27+
AdsSetFileType( 2 ) // ADS_CDX / FoxPro
28+
AdsSetServerType( 1 ) // ADS_LOCAL_SERVER
29+
IF ! AdsConnect( cDir )
30+
? "AdsConnect failed for " + cDir
31+
RETURN
32+
ENDIF
2933
RddSetDefault( "ADSCDX" )
30-
USE ( cDbf ) VIA "ADSCDX" ALIAS T SHARED NEW
34+
USE ( "idx" ) VIA "ADSCDX" ALIAS T SHARED NEW
3135
ELSE
3236
RddSetDefault( "DBFCDX" )
3337
USE ( cDbf ) ALIAS T SHARED NEW

0 commit comments

Comments
 (0)