diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 92c8a28e75..619d3a6234 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -151,6 +151,7 @@ cmake -G "${CMAKE_GENERATOR:-Ninja}" \ -Dvt_tests_num_nodes="${VT_TESTS_NUM_NODES:-}" \ -Dvt_external_fmt="${VT_EXTERNAL_FMT:-0}" \ -Dvt_no_color_enabled="${VT_NO_COLOR_ENABLED:-0}" \ + -Dvt_test_lb_schema="${TEST_LB_SCHEMA:-0}" \ -DCMAKE_CXX_STANDARD="${CMAKE_CXX_STANDARD:-17}" \ -DBUILD_SHARED_LIBS="${BUILD_SHARED_LIBS:-0}" \ "$VT" diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake index edf15845bf..8927d0873b 100644 --- a/cmake/configure_options.cmake +++ b/cmake/configure_options.cmake @@ -150,6 +150,7 @@ define_option(vt_werror_enabled "-Werror" "Build VT with -Werror enabled" OFF em define_option(vt_build_tests "tests" "Build VT tests" ON empty_feature) define_option(vt_build_tools "tools" "Build VT tools" ON empty_feature) define_option(vt_build_examples "examples" "Build VT examples" ON empty_feature) +define_option(vt_test_lb_schema "lb schema tests" "Enable testing of LBDatafile schema" OFF empty_feature) option(vt_external_fmt "Build VT with external fmt" OFF) if(${vt_external_fmt}) diff --git a/cmake/test_vt.cmake b/cmake/test_vt.cmake index 8412dcc412..2fb7af5ce1 100644 --- a/cmake/test_vt.cmake +++ b/cmake/test_vt.cmake @@ -17,16 +17,20 @@ function(run_executable_with_mpi) WRAPPER_EXECUTABLE ) set( - multiValueArg + multiValueArgs TARGET_ARGS WRAPPER_ARGS ) - set(allKeywords ${noValOption} ${singleValArg} ${multiValueArg}) cmake_parse_arguments( ARG "${noValOption}" "${singleValArg}" "${multiValueArgs}" ${ARGN} ) + # Stop the configurtion if there are any unparsed arguments + if (ARG_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "found unparsed arguments: ${ARG_UNPARSED_ARGUMENTS}") + endif() + if (NOT DEFINED ARG_EXECUTE_WITH_WRAPPER) set(ARG_WRAPPER_EXECUTABLE "") set(ARG_WRAPPER_ARGS "") @@ -108,6 +112,16 @@ macro(add_test_for_example_vt test_target test_exec test_list) list(APPEND EXEC_ARGS "--vt_trace") endif() + # Append parameters required for the examples to output LBDatafiles. + if (vt_test_lb_schema) + list(APPEND EXEC_ARGS + "--vt_lb_interval=1" + "--vt_lb_data" + "--vt_lb_data_compress=false" + "--vt_lb_data_file=${test_name}_${PROC}_LBDatafile.%p.json" + "--vt_lb_data_dir=.") + endif() + run_executable_with_mpi( TARGET_EXECUTABLE ${test_name} TARGET_ARGS ${EXEC_ARGS}