From 1822e22bd7e569453559b0ba8d1f980b1950a0d4 Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Mon, 13 Jan 2025 12:10:57 -0800 Subject: [PATCH] CTest: Skip Analysis/Plot if Run Failed ... to produce output --- examples/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index acf1d00a1..4ee39f675 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -131,6 +131,11 @@ function(add_impactx_test name input is_mpi analysis_script plot_script) # make HDF5 I/O more robust on various filesystems set_property(TEST ${name}.analysis APPEND PROPERTY ENVIRONMENT "HDF5_USE_FILE_LOCKING=FALSE") + + # run test failed? Mark this as skipped + set_property(TEST ${name}.analysis PROPERTY SKIP_REGULAR_EXPRESSION + "Supplied directory is not valid: diags" + ) endif() if(plot_script) add_test(NAME ${name}.plot @@ -141,6 +146,11 @@ function(add_impactx_test name input is_mpi analysis_script plot_script) # make HDF5 I/O more robust on various filesystems set_property(TEST ${name}.plot APPEND PROPERTY ENVIRONMENT "HDF5_USE_FILE_LOCKING=FALSE") + + # run test failed? Mark this as skipped + set_property(TEST ${name}.plot PROPERTY SKIP_REGULAR_EXPRESSION + "ValueError: No objects to concatenate" + ) endif() endfunction() @@ -1125,4 +1135,3 @@ add_impactx_test(pytorch_surrogate_model examples/pytorch_surrogate_model/visualize_ml_surrogate_15_stage.py ) label_impactx_test(pytorch_surrogate_model slow) -label_impactx_test(pytorch_surrogate_model.MPI slow)