diff --git a/src/cli/CMakeLists.txt b/src/cli/CMakeLists.txt index 179c35f7a0..a264c4711f 100644 --- a/src/cli/CMakeLists.txt +++ b/src/cli/CMakeLists.txt @@ -270,6 +270,63 @@ if(BUILD_TESTING) PASS_REGULAR_EXPRESSION "HI FROM ERB PYTHON PLUGIN[\r\n\t ]*HI FROM JINJA PYTHON PLUGIN" ) + # ======================== Workflows should fail ======================== + add_test(NAME OpenStudioCLI.Run_Validate.MissingAMeasure + COMMAND $ run --show-stdout -w missing_a_measure.osw + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/resources/workflow/invalid_measures/" + ) + set_tests_properties(OpenStudioCLI.Run_Validate.MissingAMeasure PROPERTIES + WILL_FAIL TRUE + RESOURCE_LOCK "invalid_measures" + ) + + add_test(NAME OpenStudioCLI.Run_Validate.UnloadableMeasure + COMMAND $ run --show-stdout -w unloadable_measure.osw + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/resources/workflow/invalid_measures/" + ) + set_tests_properties(OpenStudioCLI.Run_Validate.UnloadableMeasure PROPERTIES + WILL_FAIL TRUE + RESOURCE_LOCK "invalid_measures" + ) + + add_test(NAME OpenStudioCLI.Run_Validate.WrongMeasureTypeOrder + COMMAND $ run --show-stdout -w wrong_measure_type_order.osw + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/resources/workflow/invalid_measures/" + ) + set_tests_properties(OpenStudioCLI.Run_Validate.WrongMeasureTypeOrder PROPERTIES + WILL_FAIL TRUE + RESOURCE_LOCK "invalid_measures" + ) + + # Classic + add_test(NAME OpenStudioCLI.Classic.Run_Validate.MissingAMeasure + COMMAND $ classic run --show-stdout -w missing_a_measure.osw + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/resources/workflow/invalid_measures/" + ) + set_tests_properties(OpenStudioCLI.Classic.Run_Validate.MissingAMeasure PROPERTIES + WILL_FAIL TRUE + RESOURCE_LOCK "invalid_measures" + ) + + add_test(NAME OpenStudioCLI.Classic.Run_Validate.UnloadableMeasure + COMMAND $ run --show-stdout -w unloadable_measure.osw + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/resources/workflow/invalid_measures/" + ) + set_tests_properties(OpenStudioCLI.Classic.Run_Validate.UnloadableMeasure PROPERTIES + WILL_FAIL TRUE + RESOURCE_LOCK "invalid_measures" + ) + + add_test(NAME OpenStudioCLI.Classic.Run_Validate.WrongMeasureTypeOrder + COMMAND $ run --show-stdout -w wrong_measure_type_order.osw + WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/resources/workflow/invalid_measures/" + ) + set_tests_properties(OpenStudioCLI.Classic.Run_Validate.WrongMeasureTypeOrder PROPERTIES + WILL_FAIL TRUE + RESOURCE_LOCK "invalid_measures" + ) + # ====================== End Workflows should fail ====================== + if (Pytest_AVAILABLE) add_test(NAME OpenStudioCLI.test_loglevel COMMAND ${Python_EXECUTABLE} -m pytest --verbose ${Pytest_XDIST_OPTS} --os-cli-path $ "${CMAKE_CURRENT_SOURCE_DIR}/test/test_loglevel.py"