Skip to content

Commit aa96e8b

Browse files
committed
Do not remove backtrace files in cleanup test
1 parent e761ef1 commit aa96e8b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Examples/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function(add_warpx_test
198198
if(WarpX_TEST_CLEANUP)
199199
add_test(
200200
NAME ${name}.cleanup
201-
COMMAND ${CMAKE_COMMAND} -E rm -rf ${THIS_WORKING_DIR}
201+
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_SOURCE_DIR}/Examples/test_cleanup.cmake ${THIS_WORKING_DIR}
202202
)
203203
# test cleanup depends on test run
204204
set_property(TEST ${name}.cleanup APPEND PROPERTY DEPENDS "${name}.run")

Examples/test_cleanup.cmake

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# delete all test files except backtrace
2+
file(GLOB test_files ${CMAKE_ARGV3}/*)
3+
foreach(file ${test_files})
4+
if(NOT ${file} MATCHES "Backtrace*")
5+
execute_process(COMMAND ${CMAKE_COMMAND} -E rm -r ${file})
6+
endif()
7+
endforeach()

0 commit comments

Comments
 (0)