Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
displayName: Cache Python Libraries

- bash: |
set -eu -o pipefail
set -o nounset errexit pipefail
cat /proc/cpuinfo | grep "model name" | sort -u
df -h
echo 'Acquire::Retries "3";' | sudo tee /etc/apt/apt.conf.d/80-retries
Expand Down Expand Up @@ -146,25 +146,36 @@ jobs:
displayName: 'Install dependencies'

- bash: |
set -eu -o pipefail
# set options
set -o nounset errexit pipefail
# display disk space usage
df -h

# configure
export AMReX_CMAKE_FLAGS="-DAMReX_ASSERTIONS=ON -DAMReX_TESTING=ON"
cmake -S . -B build \
${AMReX_CMAKE_FLAGS} \
${WARPX_CMAKE_FLAGS} \
-DWarpX_TEST_CLEANUP=ON \
-DWarpX_TEST_FPETRAP=ON

# build
cmake --build build -j 2
# display disk space usage
df -h
displayName: 'Build'

- bash: |
set -eu -o pipefail

# set options
set -o nounset errexit pipefail
# run tests (exclude pytest.AMReX when running Python tests)
ctest --test-dir build --output-on-failure -E AMReX
displayName: 'Test'

- bash: |
# set options
set -o nounset errexit pipefail
# find and print backtrace
find build/bin/ -type f -name "Backtrace*" \
-exec echo -e "\nBacktrace\n---------\n{}\n---------" \; \
-exec cat {} \;
displayName: 'Logs'
condition: always()
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()
Loading