From 3b5a1c996b5cc462cb3f9867bcf75334efaea945 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 3275eb2d5..e1848c97f 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -106,6 +106,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 @@ -116,6 +121,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() @@ -1068,4 +1078,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)