Skip to content

Commit

Permalink
CTest: Define 42 as Skip Return Code
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Jan 13, 2025
1 parent 3b5a1c9 commit 820effb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ function(add_impactx_test name input is_mpi analysis_script plot_script)
else()
set_property(TEST ${name}.run APPEND PROPERTY ENVIRONMENT "OMP_NUM_THREADS=2")
endif()
# special return code for skipped tests (e.g., runtime prerequisite fails)
set_tests_properties(${name}.run PROPERTIES SKIP_RETURN_CODE 42)

# analysis and plots
set(THIS_Python_SCRIPT_EXE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
print("Warning: Cannot import PyTorch. Skipping test.")
import sys

sys.exit(0)
sys.exit(42) # ImpactX special return code for skipped tests

import zipfile
from urllib import request
Expand Down

0 comments on commit 820effb

Please sign in to comment.