Some checks failed
Fuzz Smoke / libFuzzer smoke (push) Has been cancelled
* test(build): register standard Catch2 tests from a table 165 of the 224 test executables in tests/meson.build were the same nine-line executable() block plus a test() call placed far away. Each one is now a row in catch2_test_table, and one loop at the end of the file builds and registers them. Rows keep their place, so the branches around them still gate them. A pair was folded only when the executable used the standard kwargs, exactly one test() used it, and both calls sat under the same if/else branch. Tests with extra env, cpp_args or more than one registration stay hand-written. meson introspect --tests --targets is identical before and after for Debug and TSan (351 tests, 369 targets). It is identical for ASan (262 tests) except for the order of meson's generated DYLD_LIBRARY_PATH entries. Signed-off-by: trvon <me@trevon.dev> * test(build): one suite vocabulary and a concurrency label Suite labels were a mix of tiers, subsystems, ticket IDs (yams-3s4, pbi-009) and spelling variants (connection_pool and connection-pool, plugin and plugins). Ticket IDs are gone, yams-<x> is now <x>, labels are kebab-case, and synonyms are merged. 54 tests now carry 'concurrency': their own sources start threads, spawn coroutines or wait on condition variables. When several tests share one executable, only those whose names point at concurrent behaviour get the label. 47 of them run in the TSan lane. Only labels changed. Tests, commands, env, timeouts and targets are identical in meson introspect, and every tier suite (unit, integration, slow, bench, stress, mobile, ...) selects the same tests under TSan and ASan. Signed-off-by: trvon <me@trevon.dev> --------- Signed-off-by: trvon <me@trevon.dev>
156 lines
5.7 KiB
Meson
156 lines
5.7 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', 'concurrency'],
|
|
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', _test_timeout_cpp_arg],
|
|
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
|