Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-11-06 00:11:32 +0100
committerMartin Hořeňovský2022-11-06 00:11:38 +0100
commit0c75caf77b5c288a4a9461c08943e263b365180a (patch)
tree5a0651635ba01904f1c39ef431bceb821637c471 /tests
parent3b139ae51a52382d4a86764d7b44e1c3d2eb3eca (diff)
downloadcatch3-0c75caf77b5c288a4a9461c08943e263b365180a.tar.gz
Don't write ApprovalTests' temporary files into the source tree
This has two effects: 1) This significantly improves the performance of ApprovalTests run in WSL, because running the massively multi-reporter test would cause lots of small and parallel writes across the WSL-Windows FS boundary, completely mudering performance. 2) ApprovalTests can be run from multiple build dirs in parallel, as long as they do not fail. However, if they do fail, the multiple runs will still step on each other toes when writing the unapproved files for user.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index b64ecd08..a3e293a4 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -343,7 +343,14 @@ set_tests_properties(FilteredSection::GeneratorsDontCauseInfiniteLoop-2
)
# AppVeyor has a Python 2.7 in path, but doesn't have .py files as autorunnable
-add_test(NAME ApprovalTests COMMAND ${PYTHON_EXECUTABLE} ${CATCH_DIR}/tools/scripts/approvalTests.py $<TARGET_FILE:SelfTest>)
+add_test(NAME ApprovalTests
+ COMMAND
+ ${PYTHON_EXECUTABLE}
+ ${CATCH_DIR}/tools/scripts/approvalTests.py
+ $<TARGET_FILE:SelfTest>
+ "${CMAKE_CURRENT_BINARY_DIR}"
+)
+
set_tests_properties(ApprovalTests
PROPERTIES
FAIL_REGULAR_EXPRESSION "Results differed"