yams/tests/integration/search/meson.build
trvon ca944de51b
build: trim Meson options and build only the Boost libraries YAMS links
meson_options.txt had 47 options. Several were read but never set by
any workflow, script or doc, several only fed test-lane timeouts, and
enable-{tsan,asan,ubsan} duplicated b_sanitize. 47 -> 33.

Removed (behavior kept at the previous default everywhere):
- require-fts5 (configure now always errors on a SQLite without FTS5,
  the old default), conan-generators-dir, cli11-cmake-path,
  onnxruntime-cmake-path (Conan/CMake discovery under the build dir is
  unchanged), split-debug.
- unit-timeout, integration-timeout, integration-ui-timeout,
  integration-smoke-timeout, integration-daemon-timeout and stress-iters:
  replaced by the same constants at their call sites (smoke keeps its
  test-timeout-scale multiplier). Only meson/profiles/ci-fast.ini and
  nightly-soak.ini set them, and nothing used those profiles; both go.
- enable-integration-services/-smoke and enable-daemon-integration:
  folded into enable-integration-tests. Debug builds still register every
  integration suite; nothing set the sub-toggles.

Kept, because third_party/symspell's meson.build reads them:
bench-timeout, enable-tsan and enable-asan. YAMS itself now derives all
sanitizer handling (extra flags, TSan runtime links, test timeouts) from
b_sanitize; setup.sh still mirrors its choice into enable-tsan/asan for
the submodule, and the CI ASan lane keeps -Denable-asan=true for the
same reason. enable-ubsan is a deprecated no-op (a warning if it
disagrees with b_sanitize) so build dirs configured with it still
regenerate; the UBSan lane passes only -Db_sanitize=undefined and still
gets -fno-sanitize-recover=all (standalone UBSan aborts; ASan+UBSan stays
recoverable, as before).

Conan: the without_* Boost list was applied only to iOS/Android. YAMS
uses Boost.Asio (header-only) and links only boost_system/boost_thread
on every platform (asio/ssl uses OpenSSL directly; no spawn/context), so
the list now applies everywhere. Debug Boost package on grim: 45 static
libraries / 229 MiB -> 10 / 6.8 MiB (Release: 45 / 30 MiB before).

Verified on grim: ./setup.sh Debug --no-tsan --with-tests reconfigures
an existing build/debug and builds; an existing build/release (configured
with -Denable-tsan/-Denable-asan) regenerates.

Signed-off-by: trvon <me@trevon.dev>
2026-10-01 18:52:34 -06:00

96 lines
3.7 KiB
Meson

# Hybrid search integration tests - Catch2 tests requiring full daemon with embeddings
# Covers semantic search, hybrid search, RRF fusion with real infrastructure
if not catch2_dep.found()
message('Catch2 not found; skipping hybrid search integration tests.')
else
hybrid_search_integration_srcs = files(
'hybrid_search_integration_test.cpp',
)
fsm_tuning_integration_srcs = files(
'fsm_tuning_benchmark_integration_test.cpp',
)
corpus_relevance_srcs = files(
'corpus_relevance_test.cpp',
)
dbg = (get_option('buildtype') == 'debug')
if (get_option('enable-integration-tests') or dbg)
# Use the shared tests/support/catch2_main.cpp (catch2_main_dep from tests/meson.build).
# Meson variables are global: reassigning catch2_main_dep here to Catch2's own main used to
# leak into every test executable defined after this subdir, dropping the shared main's
# argument normalization and Windows CRT-report setup.
hybrid_search_integration_exe = executable('yams_hybrid_search_integration',
hybrid_search_integration_srcs,
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep, test_deps, catch2_trailing_link_deps],
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('hybrid_search_integration',
hybrid_search_integration_exe,
suite: ['integration', 'search', 'hybrid', 'semantic', 'catch2'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_DISABLE_SESSION_WATCHER': '1',
'TSAN_OPTIONS': _test_tsan_options,
# Note: Do NOT set YAMS_DISABLE_VECTORS - we need vector search for hybrid tests
},
is_parallel: false,
timeout: 300, # 5 minutes - allows time for daemon startup + embedding model load
# Allow exit 0 when all tests skip (Windows daemon shutdown not yet implemented)
args: ['--allow-running-no-tests'],
)
# FSM Tuning integration tests (Phase 4 of yams-7ez4)
fsm_tuning_integration_exe = executable('yams_fsm_tuning_integration',
fsm_tuning_integration_srcs,
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep, test_deps, catch2_trailing_link_deps],
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('fsm_tuning_integration',
fsm_tuning_integration_exe,
suite: ['integration', 'search', 'fsm', 'tuning', 'benchmark', 'catch2'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'TSAN_OPTIONS': _test_tsan_options,
# Some tests need embeddings for hybrid search validation
},
is_parallel: false,
timeout: 180, # 3 minutes - FSM tests run multiple search operations
# Allow exit 0 when all tests skip (Windows daemon shutdown not yet implemented)
args: ['--allow-running-no-tests'],
)
# Provable multi-corpus relevance gate (FTS completeness, collection isolation, path scoping)
corpus_relevance_exe = executable('yams_corpus_relevance',
corpus_relevance_srcs,
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep, test_deps, catch2_trailing_link_deps],
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('corpus_relevance',
corpus_relevance_exe,
suite: ['integration', 'search', 'relevance', 'fts', 'catch2'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_DISABLE_VECTORS': '1', # keyword/FTS + metadata scoping; no embeddings needed
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: 180,
args: ['--allow-running-no-tests'],
)
else
message('hybrid_search_integration test disabled (enable with -Denable-integration-tests=true).')
endif
endif