Skip to content

Commit

Permalink
Tests: Mark thermal as slow (#520)
Browse files Browse the repository at this point in the history
Mark the `thermal` test as slow.
This test runs 50sec in release mode, >10min in Debug mode.

Exclude in CI Debug builds.
Exclude in UBSAN/ASAN tests.

The thermal distribution implementation should be sufficiently covered
by the faster running `bithermal` tests and continues to be run
in the other tests in CI.
  • Loading branch information
ax3l authored Feb 4, 2024
1 parent e326fb8 commit dc5e2d1
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tooling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
export ASAN_OPTIONS=detect_stack_use_after_return=1:detect_leaks=1:check_initialization_order=true:strict_init_order=true:detect_stack_use_after_scope=1:fast_unwind_on_malloc=0
export LSAN_OPTIONS=suppressions="$SOURCEPATH/.github/ci/sanitizer/clang/Leak.supp:use_tls=0"
export LD_PRELOAD=/usr/lib/clang/14/lib/linux/libclang_rt.asan-x86_64.so
ctest --test-dir build -E AMReX --output-on-failure
ctest --test-dir build -E AMReX --output-on-failure --label-exclude slow
# note: use_tls=0 because of glibc 3.23 on GitHub actions
# https://github.com/google/sanitizers/issues/1342
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: run tests
run: |
ctest --test-dir build --output-on-failure
ctest --test-dir build --output-on-failure --label-exclude slow
- name: run installed app
run: |
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
- name: run tests
run: |
ctest --test-dir build --output-on-failure
ctest --test-dir build --output-on-failure --label-exclude slow
- name: run installed app
run: |
Expand Down
38 changes: 38 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ if(ImpactX_MPI)
endif()


# Add an ImpactX test set (with sub-tests).
#
# The test will be run and dependent follow-up tests will be added. The latter
# can optionally perform an analysis and/or a plot test on the generated data.
#
# Parameters
# ----------
# name: unique ImpactX test name
# input: inputs file or Python script
# is_mpi: run with mpirun?
# is_python: run as a Python script?
# analysis_script: an analysis script that validates test output
# plot_script: a plot script that visualizes test output
#
function(add_impactx_test name input is_mpi is_python analysis_script plot_script)
# cannot run Python tests w/o Python support
if(is_python AND NOT ImpactX_PYTHON)
Expand Down Expand Up @@ -98,6 +112,29 @@ function(add_impactx_test name input is_mpi is_python analysis_script plot_scrip
endfunction()


# Add a CTest label to an ImpactX test set.
#
# The test set must already been added with add_impactx_test. Labeling it here
# will add the label to the run test and its optional (dependent) analysis
# and/or plot follow-up tests.
#
# Parameters
# ----------
# name: unique ImpactX test name
# label: ctest LABELS property value to add
#
function(label_impactx_test name label)
# see add_test calls in add_impactx_test for values
set(_test_names "${name}.run;${name}.analysis;${name}.plot")

foreach(_test_name IN LISTS _test_names)
if(TEST ${_test_name})
set_property(TEST ${_test_name} APPEND PROPERTY LABELS "${label}")
endif()
endforeach()
endfunction()


# FODO Cell ###################################################################
#
add_impactx_test(FODO
Expand Down Expand Up @@ -668,6 +705,7 @@ add_impactx_test(thermal
examples/epac2004_benchmarks/analysis_thermal.py
OFF # no plot script yet
)
label_impactx_test(thermal slow)

# Bithermal Beam EPAC2004 #####################################################
#
Expand Down

0 comments on commit dc5e2d1

Please sign in to comment.