gbenchmark reports are generated inside build/test_results/benchmark

This commit is contained in:
Marko Budiselic 2016-12-23 09:58:26 +01:00
parent 422f6a9957
commit 6fe9da2578
3 changed files with 8 additions and 4 deletions

View File

@ -6,7 +6,8 @@ enable_testing()
include_directories(${catch_source_dir}/include)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/test_results)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/test_results/unit)
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/test_results/benchmark)
# copy test data
file(COPY ${CMAKE_SOURCE_DIR}/tests/data

View File

@ -38,6 +38,9 @@ foreach(test_cpp ${test_type_cpps})
target_link_libraries(${target_name} ${yaml_static_lib})
# register test
add_test(${target_name} ${exec_name})
set(output_path
${CMAKE_BINARY_DIR}/test_results/benchmark/${target_name}.json)
add_test(${target_name} ${exec_name}
--benchmark_out_format=json --benchmark_out=${output_path})
endforeach()

View File

@ -44,7 +44,7 @@ foreach(test_cpp ${test_type_cpps})
target_link_libraries(${target_name} dl)
# register test
add_test(${target_name} ${exec_name}
--gtest_output=xml:${CMAKE_BINARY_DIR}/test_results/${target_name}.xml)
set(output_path ${CMAKE_BINARY_DIR}/test_results/unit/${target_name}.xml)
add_test(${target_name} ${exec_name} --gtest_output=xml:${output_path})
endforeach()