-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1383 from NVIDIA/exec-tests
move the `exec/` tests into their own target
- Loading branch information
Showing
3 changed files
with
107 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
#============================================================================= | ||
# Copyright 2023 NVIDIA Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
#============================================================================= | ||
|
||
set(exec_test_sources | ||
../test_main.cpp | ||
test_bwos_lifo_queue.cpp | ||
test_any_sender.cpp | ||
test_task.cpp | ||
test_timed_thread_scheduler.cpp | ||
test_variant_sender.cpp | ||
test_type_async_scope.cpp | ||
test_create.cpp | ||
test_env.cpp | ||
test_finally.cpp | ||
test_into_tuple.cpp | ||
test_on.cpp | ||
test_on2.cpp | ||
test_on3.cpp | ||
test_repeat_effect_until.cpp | ||
test_repeat_n.cpp | ||
async_scope/test_dtor.cpp | ||
async_scope/test_spawn.cpp | ||
async_scope/test_spawn_future.cpp | ||
async_scope/test_start_now.cpp | ||
async_scope/test_empty.cpp | ||
async_scope/test_stop.cpp | ||
test_when_any.cpp | ||
test_at_coroutine_exit.cpp | ||
test_materialize.cpp | ||
$<$<BOOL:${STDEXEC_ENABLE_IO_URING_TESTS}>:test_io_uring_context.cpp> | ||
test_trampoline_scheduler.cpp | ||
test_sequence_senders.cpp | ||
sequence/test_any_sequence_of.cpp | ||
sequence/test_empty_sequence.cpp | ||
sequence/test_ignore_all_values.cpp | ||
sequence/test_iterate.cpp | ||
sequence/test_transform_each.cpp | ||
$<$<BOOL:${STDEXEC_ENABLE_TBB}>:../tbbexec/test_tbb_thread_pool.cpp> | ||
test_system_context.cpp | ||
$<$<BOOL:${STDEXEC_ENABLE_LIBDISPATCH}>:test_libdispatch.cpp> | ||
) | ||
|
||
add_executable(test.exec ${exec_test_sources}) | ||
target_link_libraries(test.exec | ||
PUBLIC | ||
STDEXEC::stdexec | ||
$<TARGET_NAME_IF_EXISTS:STDEXEC::tbbexec> | ||
stdexec_executable_flags | ||
Catch2::Catch2 | ||
PRIVATE | ||
common_test_settings) | ||
|
||
add_executable(test.system_context_replaceability ../test_main.cpp test_system_context_replaceability.cpp) | ||
target_link_libraries(test.system_context_replaceability | ||
PUBLIC | ||
STDEXEC::stdexec | ||
STDEXEC::system_context | ||
stdexec_executable_flags | ||
Catch2::Catch2 | ||
PRIVATE | ||
common_test_settings) | ||
|
||
# Discover the Catch2 test built by the application | ||
catch_discover_tests(test.exec) | ||
if(NOT STDEXEC_ENABLE_CUDA) | ||
catch_discover_tests(test.system_context_replaceability) | ||
endif() | ||
|
||
# Test which parses a source file for an expected error message | ||
icm_add_build_failure_test( | ||
NAME test_repeat_effect_until_fail | ||
TARGET test_repeat_effect_until_fail | ||
SOURCES PARSE test_repeat_effect_until_fail.cpp | ||
LIBRARIES stdexec | ||
FOLDER test | ||
) | ||
|
||
icm_add_build_failure_test( | ||
NAME test_repeat_n_fail | ||
TARGET test_repeat_n_fail | ||
SOURCES PARSE test_repeat_n_fail.cpp | ||
LIBRARIES stdexec | ||
FOLDER test | ||
) |
File renamed without changes.