Skip to content

Commit

Permalink
Always install tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemartinlogan committed Dec 22, 2024
1 parent dc2acdf commit 437c48c
Show file tree
Hide file tree
Showing 23 changed files with 210 additions and 122 deletions.
52 changes: 25 additions & 27 deletions test/unit/hermes_adapters/mpiio/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# MPI adapter tests without hermes
add_executable(mpiio_adapter_test
mpiio_adapter_test.cc
mpiio_adapter_basic_test.cc)
mpiio_adapter_test.cc
mpiio_adapter_basic_test.cc)
target_link_libraries(mpiio_adapter_test
hermes_client)
hermes_client)
add_dependencies(mpiio_adapter_test
hermes_client)
hermes_client)
target_compile_definitions(mpiio_adapter_test PUBLIC
HERMES_MPI_TESTS=true)
HERMES_MPI_TESTS=true)
jarvis_test(mpiio test_mpiio_basic)

# MPI adapter tests with hermes
add_executable(hermes_mpiio_adapter_test
mpiio_adapter_test.cc
mpiio_adapter_basic_test.cc)
mpiio_adapter_test.cc
mpiio_adapter_basic_test.cc)
target_link_libraries(hermes_mpiio_adapter_test
hermes_mpiio)
hermes_mpiio)
add_dependencies(hermes_mpiio_adapter_test
hermes_mpiio)
hermes_mpiio)
target_compile_definitions(hermes_mpiio_adapter_test PUBLIC
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=true)
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=true)
jarvis_test(mpiio test_hermes_mpiio_basic_sync)
jarvis_test(mpiio test_hermes_mpiio_basic_async)

Expand All @@ -34,27 +34,25 @@ foreach(program ${MPIIO_TESTS})
target_link_libraries(${program} Catch2::Catch2 -lstdc++fs -lc MPI::MPI_CXX)
endforeach()

if(HERMES_INSTALL_TESTS)
foreach(program ${MPIIO_TESTS})
install(
TARGETS
${program}
LIBRARY DESTINATION ${HERMES_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${HERMES_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${HERMES_INSTALL_BIN_DIR}
)
endforeach()
endif()
foreach(program ${MPIIO_TESTS})
install(
TARGETS
${program}
LIBRARY DESTINATION ${HERMES_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${HERMES_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${HERMES_INSTALL_BIN_DIR}
)
endforeach()

add_executable(mpi_parallel parallel.cc)
add_dependencies(mpi_parallel hermes_mpiio)
target_link_libraries(mpi_parallel hermes_mpiio Catch2::Catch2 -lstdc++fs -lc MPI::MPI_CXX)
target_link_libraries(mpi_parallel hermes_mpiio Catch2::Catch2 -lstdc++fs -lc MPI::MPI_CXX)
set_target_properties(mpi_parallel PROPERTIES COMPILE_FLAGS "-DHERMES_INTERCEPT=1")

install(
TARGETS
mpi_parallel
LIBRARY DESTINATION ${HERMES_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${HERMES_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${HERMES_INSTALL_BIN_DIR}
TARGETS
mpi_parallel
LIBRARY DESTINATION ${HERMES_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${HERMES_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${HERMES_INSTALL_BIN_DIR}
)
20 changes: 9 additions & 11 deletions test/unit/hermes_adapters/posix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,12 @@ foreach(program ${POSIX_TESTS})
MPI::MPI_CXX OpenMP::OpenMP_CXX)
endforeach()

if(HERMES_INSTALL_TESTS)
foreach(program ${POSIX_TESTS})
install(
TARGETS
${program}
LIBRARY DESTINATION ${HERMES_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${HERMES_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${HERMES_INSTALL_BIN_DIR}
)
endforeach()
endif()
foreach(program ${POSIX_TESTS})
install(
TARGETS
${program}
LIBRARY DESTINATION ${HERMES_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${HERMES_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${HERMES_INSTALL_BIN_DIR}
)
endforeach()
126 changes: 62 additions & 64 deletions test/unit/hermes_adapters/stdio/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,113 +1,113 @@
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src)
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/src)

#------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# STDIO Adapter Internal tests
#------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
add_executable(hermes_stdio_adapter_mapper_test
stdio_adapter_test.cc
stdio_adapter_mapper_test.cc)
stdio_adapter_test.cc
stdio_adapter_mapper_test.cc)
add_dependencies(hermes_stdio_adapter_mapper_test
hermes_stdio)
hermes_stdio)
target_link_libraries(hermes_stdio_adapter_mapper_test
hermes_stdio)
hermes_stdio)
target_compile_definitions(hermes_stdio_adapter_mapper_test PUBLIC
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=false)
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=false)
jarvis_test(stdio test_hermes_stdio_mapper)

#------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# STDIO Adapter End to End tests
#------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# Non-Hermes, None-MPI STDIO basic
add_executable(stdio_adapter_test
stdio_adapter_test.cc
stdio_adapter_basic_test.cc
stdio_adapter_func_test.cc
stdio_adapter_rs_test.cc)
stdio_adapter_test.cc
stdio_adapter_basic_test.cc
stdio_adapter_func_test.cc
stdio_adapter_rs_test.cc)
add_dependencies(stdio_adapter_test
hermes_client)
hermes_client)
target_link_libraries(stdio_adapter_test
hermes_client)
hermes_client)
target_compile_definitions(stdio_adapter_test PUBLIC
HERMES_MPI_TESTS=false)
HERMES_MPI_TESTS=false)
jarvis_test(stdio test_stdio_basic)

# Hermes, None-MPI STDIO basic
add_executable(hermes_stdio_adapter_test
stdio_adapter_test.cc
stdio_adapter_basic_test.cc
stdio_adapter_rs_test.cc)
stdio_adapter_test.cc
stdio_adapter_basic_test.cc
stdio_adapter_rs_test.cc)
add_dependencies(hermes_stdio_adapter_test
hermes_stdio)
hermes_stdio)
target_link_libraries(hermes_stdio_adapter_test
hermes_stdio)
hermes_stdio)
target_compile_definitions(hermes_stdio_adapter_test PUBLIC
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=false)
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=false)
jarvis_test(stdio test_hermes_stdio_basic_small)
jarvis_test(stdio test_hermes_stdio_basic_large)

# Non-Hermes, MPI STDIO basic
add_executable(stdio_adapter_mpi_test
stdio_adapter_test.cc
stdio_adapter_basic_test.cc
stdio_adapter_rs_test.cc
stdio_adapter_shared_test.cc)
stdio_adapter_test.cc
stdio_adapter_basic_test.cc
stdio_adapter_rs_test.cc
stdio_adapter_shared_test.cc)
add_dependencies(stdio_adapter_mpi_test
hermes_client)
hermes_client)
target_link_libraries(stdio_adapter_mpi_test
hermes_client)
hermes_client)
target_compile_definitions(stdio_adapter_mpi_test PUBLIC
HERMES_MPI_TESTS=true)
HERMES_MPI_TESTS=true)
jarvis_test(stdio test_stdio_basic_mpi)

# Hermes, MPI STDIO basic
add_executable(hermes_stdio_adapter_mpi_test
stdio_adapter_test.cc
stdio_adapter_basic_test.cc
stdio_adapter_rs_test.cc
stdio_adapter_shared_test.cc)
stdio_adapter_test.cc
stdio_adapter_basic_test.cc
stdio_adapter_rs_test.cc
stdio_adapter_shared_test.cc)
target_link_libraries(hermes_stdio_adapter_mpi_test
hermes_stdio)
hermes_stdio)
add_dependencies(hermes_stdio_adapter_mpi_test
hermes_stdio)
hermes_stdio)
target_compile_definitions(hermes_stdio_adapter_mpi_test PUBLIC
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=true)
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=true)
jarvis_test(stdio test_hermes_stdio_basic_mpi_small)
jarvis_test(stdio test_hermes_stdio_basic_mpi_large)

# Hermes, Low buffer space
add_executable(hermes_stdio_low_buf_adapter_test
stdio_adapter_test.cc
stdio_adapter_low_buffer_space_test.cc)
stdio_adapter_test.cc
stdio_adapter_low_buffer_space_test.cc)
target_link_libraries(hermes_stdio_low_buf_adapter_test hermes_stdio)
add_dependencies(hermes_stdio_low_buf_adapter_test hermes_stdio)
target_compile_definitions(hermes_stdio_low_buf_adapter_test PUBLIC
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=false)
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=false)
jarvis_test(stdio test_hermes_stdio_low_buf)

# Hermes, Adapter mode
add_executable(hermes_stdio_adapter_mode_test
stdio_adapter_test.cc
stdio_adapter_mode_test.cc)
stdio_adapter_test.cc
stdio_adapter_mode_test.cc)
target_link_libraries(hermes_stdio_adapter_mode_test
hermes_stdio)
hermes_stdio)
add_dependencies(hermes_stdio_adapter_mode_test
hermes_stdio)
hermes_stdio)
target_compile_definitions(hermes_stdio_adapter_mode_test PUBLIC
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=false)
HERMES_INTERCEPT=1 HERMES_MPI_TESTS=false)
jarvis_test(stdio test_hermes_stdio_adapter_bypass)
jarvis_test(stdio test_hermes_stdio_adapter_default)
jarvis_test(stdio test_hermes_stdio_adapter_scratch)

set(STDIO_TESTS
stdio_adapter_test
hermes_stdio_adapter_test
hermes_stdio_low_buf_adapter_test
hermes_stdio_adapter_mapper_test
hermes_stdio_adapter_mode_test
stdio_adapter_mpi_test
hermes_stdio_adapter_mpi_test
stdio_adapter_test
hermes_stdio_adapter_test
hermes_stdio_low_buf_adapter_test
hermes_stdio_adapter_mapper_test
hermes_stdio_adapter_mode_test
stdio_adapter_mpi_test
hermes_stdio_adapter_mpi_test
)

foreach(program ${STDIO_TESTS})
Expand All @@ -116,14 +116,12 @@ foreach(program ${STDIO_TESTS})
target_link_libraries(${program} Catch2::Catch2 -lstdc++fs -lc MPI::MPI_CXX)
endforeach()

if(HERMES_INSTALL_TESTS)
foreach(program ${STDIO_TESTS})
install(
TARGETS
${program}
LIBRARY DESTINATION ${HERMES_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${HERMES_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${HERMES_INSTALL_BIN_DIR}
)
endforeach()
endif()
foreach(program ${STDIO_TESTS})
install(
TARGETS
${program}
LIBRARY DESTINATION ${HERMES_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${HERMES_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${HERMES_INSTALL_BIN_DIR}
)
endforeach()
1 change: 0 additions & 1 deletion test/unit/pipelines/hermes/test_hermes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pkgs:
do_dbg: true
dbg_port: 4000
modules: ['hermes_core']
worker_cpus: [0, 1, 1]
- pkg_type: hermes_run
pkg_name: hermes_run
do_dbg: true
Expand Down
7 changes: 6 additions & 1 deletion test/unit/pipelines/mpiio/test_hermes_mpiio_basic_async.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: hermes_unit_hermes_mpiio_basic_large
env: hermes
pkgs:
- pkg_type: chimaera_run
pkg_name: chimaera_run
sleep: 5
do_dbg: false
dbg_port: 4000
modules: ['hermes_core']
- pkg_type: hermes_run
pkg_name: hermes_run
sleep: 5
- pkg_type: hermes_mpiio_tests
pkg_name: hermes_mpiio_tests
test_file: mpiio_basic
Expand Down
7 changes: 6 additions & 1 deletion test/unit/pipelines/mpiio/test_hermes_mpiio_basic_sync.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: hermes_unit_hermes_mpiio_basic_async
env: hermes
pkgs:
- pkg_type: chimaera_run
pkg_name: chimaera_run
sleep: 5
do_dbg: false
dbg_port: 4000
modules: ['hermes_core']
- pkg_type: hermes_run
pkg_name: hermes_run
sleep: 2
- pkg_type: hermes_mpiio_tests
pkg_name: hermes_mpiio_tests
test_file: mpiio_basic
Expand Down
7 changes: 6 additions & 1 deletion test/unit/pipelines/posix/test_hermes_posix_basic_large.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: hermes_unit_hermes_posix_basic_large
env: hermes
pkgs:
- pkg_type: chimaera_run
pkg_name: chimaera_run
sleep: 5
do_dbg: false
dbg_port: 4000
modules: ['hermes_core']
- pkg_type: hermes_run
pkg_name: hermes_run
sleep: 5
- pkg_type: hermes_posix_tests
pkg_name: hermes_posix_tests
test_file: posix_basic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: hermes_unit_hermes_posix_basic_mpi_large
env: hermes
pkgs:
- pkg_type: chimaera_run
pkg_name: chimaera_run
sleep: 5
do_dbg: false
dbg_port: 4000
modules: ['hermes_core']
- pkg_type: hermes_run
pkg_name: hermes_run
sleep: 2
- pkg_type: hermes_posix_tests
pkg_name: hermes_posix_tests
test_file: posix_basic_mpi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: hermes_unit_hermes_posix_basic_mpi_small
env: hermes
pkgs:
- pkg_type: chimaera_run
pkg_name: chimaera_run
sleep: 5
do_dbg: false
dbg_port: 4000
modules: ['hermes_core']
- pkg_type: hermes_run
pkg_name: hermes_run
sleep: 2
- pkg_type: hermes_posix_tests
pkg_name: hermes_posix_tests
test_file: posix_basic_mpi
Expand Down
7 changes: 6 additions & 1 deletion test/unit/pipelines/posix/test_hermes_posix_basic_small.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: hermes_unit_hermes_posix_basic_small
env: hermes
pkgs:
- pkg_type: chimaera_run
pkg_name: chimaera_run
sleep: 5
do_dbg: false
dbg_port: 4000
modules: ['hermes_core']
- pkg_type: hermes_run
pkg_name: hermes_run
sleep: 2
- pkg_type: hermes_posix_tests
pkg_name: hermes_posix_tests
test_file: posix_basic
Expand Down
Loading

0 comments on commit 437c48c

Please sign in to comment.