[M6] tests: levenshtein + pc_scan + brute_scan + findmodule_scan + last_failure_dir + cmd_linkdb_add + codegen PkgConfig/brute-force

This commit is contained in:
2026-05-15 14:41:17 +00:00
parent 94e658fdf1
commit 65a749f088
9 changed files with 557 additions and 0 deletions

View File

@@ -91,6 +91,15 @@ target_link_libraries(cargoxx_bin PRIVATE
# ----- tests -----
enable_testing()
include(Catch)
add_executable(test_brute_scan_parse ../tests/brute_scan_parse.cpp)
target_link_libraries(test_brute_scan_parse PRIVATE
cargoxx
reproc
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
catch_discover_tests(test_brute_scan_parse)
add_executable(test_cmd_add ../tests/cmd_add.cpp)
target_link_libraries(test_cmd_add PRIVATE
cargoxx
@@ -118,6 +127,15 @@ target_link_libraries(test_cmd_clean PRIVATE
Catch2::Catch2WithMain
)
catch_discover_tests(test_cmd_clean)
add_executable(test_cmd_linkdb_add ../tests/cmd_linkdb_add.cpp)
target_link_libraries(test_cmd_linkdb_add PRIVATE
cargoxx
reproc
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
catch_discover_tests(test_cmd_linkdb_add)
add_executable(test_cmd_new ../tests/cmd_new.cpp)
target_link_libraries(test_cmd_new PRIVATE
cargoxx
@@ -208,6 +226,24 @@ target_link_libraries(test_exec_run PRIVATE
Catch2::Catch2WithMain
)
catch_discover_tests(test_exec_run)
add_executable(test_findmodule_scan_live ../tests/findmodule_scan_live.cpp)
target_link_libraries(test_findmodule_scan_live PRIVATE
cargoxx
reproc
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
catch_discover_tests(test_findmodule_scan_live)
add_executable(test_last_failure_dir ../tests/last_failure_dir.cpp)
target_link_libraries(test_last_failure_dir PRIVATE
cargoxx
reproc
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
catch_discover_tests(test_last_failure_dir)
add_executable(test_layout_discovery ../tests/layout_discovery.cpp)
target_link_libraries(test_layout_discovery PRIVATE
cargoxx
@@ -217,6 +253,15 @@ target_link_libraries(test_layout_discovery PRIVATE
Catch2::Catch2WithMain
)
catch_discover_tests(test_layout_discovery)
add_executable(test_levenshtein ../tests/levenshtein.cpp)
target_link_libraries(test_levenshtein PRIVATE
cargoxx
reproc
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
catch_discover_tests(test_levenshtein)
add_executable(test_linkdb_lookup ../tests/linkdb_lookup.cpp)
target_link_libraries(test_linkdb_lookup PRIVATE
cargoxx
@@ -307,6 +352,15 @@ target_link_libraries(test_nixpkgs_probe_parse PRIVATE
Catch2::Catch2WithMain
)
catch_discover_tests(test_nixpkgs_probe_parse)
add_executable(test_pc_scan_parse ../tests/pc_scan_parse.cpp)
target_link_libraries(test_pc_scan_parse PRIVATE
cargoxx
reproc
SQLite::SQLite3
Catch2::Catch2
Catch2::Catch2WithMain
)
catch_discover_tests(test_pc_scan_parse)
add_executable(test_semver_satisfies ../tests/semver_satisfies.cpp)
target_link_libraries(test_semver_satisfies PRIVATE
cargoxx