yams/tests/integration/services/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

156 lines
5.6 KiB
Meson

# Meson-native registration for services integration tests (no shell globs)
# Explicit file list keeps configuration deterministic and fast
dbg = (get_option('buildtype') == 'debug')
services_stress_iters = yams_sanitize_thread ? '20' : '100'
services_timeout = 600
services_ui_timeout = 1200
# integration_services is now Catch2-only; legacy GTest suite removed.
# Catch2 migration: Retrieval and Ingestion service tests (uses DaemonHarness)
if (get_option('enable-integration-tests') or dbg) and tests_has_cli and catch2_dep.found()
catch2_retrieval_ingestion_exe = executable('catch2_retrieval_ingestion',
files('retrieval_and_ingestion_catch2_test.cpp'),
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep] + test_deps,
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('retrieval_ingestion_catch2', catch2_retrieval_ingestion_exe,
suite: ['catch2', 'integration', 'services', 'isolated'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_STRESS_ITERS': services_stress_iters,
'LD_LIBRARY_PATH': _test_env_ld_library_path,
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: services_timeout,
# Allow exit 0 when all tests skip (Windows daemon shutdown not yet implemented)
args: ['--allow-running-no-tests'],
)
endif
# Catch2 migration: Sync Indexing tests
if (get_option('enable-integration-tests') or dbg) and tests_has_cli and catch2_dep.found()
catch2_sync_indexing_exe = executable('catch2_sync_indexing',
files('sync_indexing_catch2_test.cpp'),
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep] + test_deps,
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('sync_indexing_catch2', catch2_sync_indexing_exe,
suite: ['catch2', 'integration', 'sync', 'indexing'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'LD_LIBRARY_PATH': _test_env_ld_library_path,
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: 120,
args: ['--allow-running-no-tests'],
)
endif
# Catch2 migration: UI/CLI expectations service tests
if (get_option('enable-integration-tests') or dbg) and tests_has_cli and catch2_dep.found()
catch2_ui_cli_expectations_exe = executable('catch2_ui_cli_expectations',
files('ui_cli_expectations_catch2_test.cpp'),
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep] + test_deps,
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
foreach ui_batch : ['batch1', 'batch2', 'batch3a', 'batch3b', 'batch3c', 'batch3d']
test('ui_cli_expectations_catch2_' + ui_batch, catch2_ui_cli_expectations_exe,
suite: ['catch2', 'integration', 'services', 'ui'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_STRESS_ITERS': services_stress_iters,
'LD_LIBRARY_PATH': _test_env_ld_library_path,
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: services_ui_timeout,
args: ['[ui-cli][' + ui_batch + ']', '--allow-running-no-tests'],
)
endforeach
endif
# Catch2 migration: grep service expectations
if (get_option('enable-integration-tests') or dbg) and tests_has_cli and catch2_dep.found()
catch2_grep_service_expectations_exe = executable('catch2_grep_service_expectations',
files('grep_service_expectations_catch2_test.cpp'),
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep] + test_deps,
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('grep_service_expectations_catch2', catch2_grep_service_expectations_exe,
suite: ['catch2', 'integration', 'services', 'grep'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_DISABLE_SESSION_WATCHER': '1',
'YAMS_STRESS_ITERS': services_stress_iters,
'LD_LIBRARY_PATH': _test_env_ld_library_path,
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: services_ui_timeout,
args: ['--allow-running-no-tests'],
)
endif
# Catch2 migration: content extraction service tests
if (get_option('enable-integration-tests') or dbg) and tests_has_cli and catch2_dep.found()
catch2_content_extraction_exe = executable('catch2_content_extraction',
files('content_extraction_catch2_test.cpp'),
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep] + test_deps,
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('content_extraction_catch2', catch2_content_extraction_exe,
suite: ['catch2', 'integration', 'services', 'content'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_STRESS_ITERS': services_stress_iters,
'LD_LIBRARY_PATH': _test_env_ld_library_path,
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: services_ui_timeout,
args: ['--allow-running-no-tests'],
)
endif
# Catch2 migration: IPC conformance service tests
if (get_option('enable-integration-tests') or dbg) and tests_has_cli and catch2_dep.found()
catch2_ipc_conformance_exe = executable('catch2_ipc_conformance',
files('ipc_conformance_catch2_test.cpp'),
include_directories: incs,
dependencies: [catch2_dep, catch2_main_dep] + test_deps,
cpp_args: ['-DYAMS_TESTING=1'],
install: false,
)
test('ipc_conformance_catch2', catch2_ipc_conformance_exe,
suite: ['catch2', 'integration', 'services', 'ipc'],
env: {
'YAMS_TEST_SAFE_SINGLE_INSTANCE': '1',
'YAMS_STRESS_ITERS': services_stress_iters,
'LD_LIBRARY_PATH': _test_env_ld_library_path,
'TSAN_OPTIONS': _test_tsan_options,
},
is_parallel: false,
timeout: services_ui_timeout,
args: ['--allow-running-no-tests'],
)
endif