Skip to content

Commit

Permalink
Do not remove backtrace files in cleanup test
Browse files Browse the repository at this point in the history
  • Loading branch information
EZoni committed Nov 1, 2024
1 parent a8b3a37 commit a9736ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function(add_warpx_test
if(WarpX_TEST_CLEANUP)
add_test(
NAME ${name}.cleanup
COMMAND ${CMAKE_COMMAND} -E rm -rf ${THIS_WORKING_DIR}
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/Examples/test_cleanup.cmake ${THIS_WORKING_DIR}
)
# test cleanup depends on test run
set_property(TEST ${name}.cleanup APPEND PROPERTY DEPENDS "${name}.run")
Expand Down
7 changes: 7 additions & 0 deletions Examples/test_cleanup.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# delete all test files except backtrace
file(GLOB test_files ${CMAKE_ARGV3}/*)
foreach(file ${test_files})
if(NOT ${file} MATCHES "Backtrace*")
execute_process(COMMAND ${CMAKE_COMMAND} -E rm -r ${file})
endif()
endforeach()

0 comments on commit a9736ea

Please sign in to comment.