aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/CMakeLists.txt11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index fa34457..df8db29 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -4,7 +4,7 @@ find_package(Python3 REQUIRED COMPONENTS Interpreter)
set(python_test_args
--no-header -v
- --durations=0 --durations-min=1.0
+ --durations 0 --durations-min 1.0
"${CMAKE_CURRENT_SOURCE_DIR}/py"
--server "$<TARGET_FILE:server>"
--worker "$<TARGET_FILE:worker>"
@@ -23,6 +23,15 @@ endfunction()
add_python_tests(python_tests_default
Python3::Interpreter -m pytest ${python_test_args} -m "not flame_graph")
+# Use pytest-html to generate an HTML report.
+if(NOT DEFINED TEST_REPORT_DIR)
+ set(TEST_REPORT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+endif()
+
+add_python_tests(python_tests_report
+ Python3::Interpreter -m pytest ${python_test_args} -m "not flame_graph"
+ --html "${TEST_REPORT_DIR}/index.html")
+
# A subset of tests, excluding long-running stress tests.
add_python_tests(python_tests_sanity
Python3::Interpreter -m pytest ${python_test_args} -m "not flame_graph and not stress")