Skip to content

Commit

Permalink
Merge 'build: cmake: fix the build of some tests' from Kefu Chai
Browse files Browse the repository at this point in the history
this series addresses the FTBFS of tests with CMake, and also checks for the unknown parameters in `add_scylla_test()`

Closes #14650

* github.com:scylladb/scylladb:
  build: cmake: build SEASTAR tests as SEASTAR tests
  build: cmake: error out if found unknown keywords
  build: cmake: link tests against necessary libraries
  • Loading branch information
denesb committed Jul 18, 2023
2 parents 4c1a26c + cca8db5 commit f03efd7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ function(add_scylla_test name)
"KIND"
"LIBRARIES;SOURCES"
${ARGN})
if(parsed_args_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unknown keywords given to 'add_scylla_test()': \"${parsed_args_UNPARSED_ARGUMENTS}\"")
endif()

if(parsed_args_KIND)
set(kind ${parsed_args_KIND})
else()
Expand Down
10 changes: 6 additions & 4 deletions test/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ add_scylla_test(allocation_strategy_test
add_scylla_test(anchorless_list_test
KIND BOOST)
add_scylla_test(alternator_unit_test
KIND BOOST)
KIND BOOST
LIBRARIES alternator)
add_scylla_test(auth_test
KIND SEASTAR)
add_scylla_test(auth_passwords_test
Expand Down Expand Up @@ -275,7 +276,8 @@ add_scylla_test(schema_change_test
add_scylla_test(schema_changes_test
KIND SEASTAR)
add_scylla_test(schema_loader_test
KIND SEASTAR)
KIND SEASTAR
LIBRARIES tools)
add_scylla_test(schema_registry_test
KIND SEASTAR)
add_scylla_test(sstable_conforms_to_mutation_source_test
Expand Down Expand Up @@ -304,9 +306,9 @@ add_scylla_test(string_format_test
add_scylla_test(summary_test
KIND BOOST)
add_scylla_test(tablets_test
KIND BOOST)
KIND SEASTAR)
add_scylla_test(tagged_integer_test
KIND BOOST)
KIND SEASTAR)
add_scylla_test(top_k_test
KIND BOOST)
add_scylla_test(tracing_test
Expand Down

0 comments on commit f03efd7

Please sign in to comment.