Skip to content

Commit

Permalink
add app tests for command line options
Browse files Browse the repository at this point in the history
  • Loading branch information
burlen committed Feb 25, 2021
1 parent 4942a06 commit 21f502d
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMake/teca_app.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function (teca_add_app app_name)
teca_system teca_core teca_data teca_io teca_alg
${APP_LIBS})
endif()
set_target_properties(${app_name} PROPERTIES APP_TYPE C++)
install(TARGETS ${app_name} RUNTIME DESTINATION ${BIN_PREFIX})
else()
message(STATUS "command line application ${app_name} -- disabled")
Expand Down
1 change: 1 addition & 0 deletions CMake/teca_python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ function (teca_add_python_app app_name)
set(APP_SOURCES "${app_name}.in")
endif()
add_custom_target(${app_name})
set_target_properties(${app_name} PROPERTIES APP_TYPE Python)
teca_py_install_apps(${APP_SOURCES})
else()
message(STATUS "command line application ${app_name} -- disabled")
Expand Down
33 changes: 33 additions & 0 deletions test/apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -442,3 +442,36 @@ teca_add_app_test(test_cf_restripe_app_mpi teca_cf_restripe
${MPIEXEC} ${TEST_CORES}
FEATURES ${TECA_HAS_NETCDF_MPI} ${TECA_HAS_MPI}
REQ_TECA_DATA)

set(app_names
teca_bayesian_ar_detect
teca_cf_restripe
teca_convert_table
teca_deeplab_ar_detect
teca_event_filter
teca_integrated_vapor_transport
teca_metadata_probe
teca_profile_explorer
teca_tc_detect
teca_tc_stats
teca_tc_trajectory
teca_tc_trajectory_scalars
teca_tc_wind_radii
teca_tc_wind_radii_stats
teca_temporal_reduction)

foreach (app_name ${app_names})
teca_add_app_test(${app_name}_help ${app_name}
COMMAND ${CMAKE_BINARY_DIR}/${BIN_PREFIX}/${app_name} --help)

get_target_property(app_type ${app_name} APP_TYPE)
if ("${app_type}" STREQUAL "C++")

teca_add_app_test(${app_name}_full_help ${app_name}
COMMAND ${CMAKE_BINARY_DIR}/${BIN_PREFIX}/${app_name} --full_help)

teca_add_app_test(${app_name}_advanced_help ${app_name}
COMMAND ${CMAKE_BINARY_DIR}/${BIN_PREFIX}/${app_name} --advanced_help)

endif()
endforeach()

0 comments on commit 21f502d

Please sign in to comment.