aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt11
-rw-r--r--test/py/requirements.txt1
2 files changed, 11 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")
diff --git a/test/py/requirements.txt b/test/py/requirements.txt
new file mode 100644
index 0000000..43300f8
--- /dev/null
+++ b/test/py/requirements.txt
@@ -0,0 +1 @@
+pytest-html ~= 3.0