Skip to content

Commit 23cd352

Browse files
committed
Disable tests for benchmark library build
The tests of the google-benchmark package fail to build on systems that do not have an executbale named `python` in the path. Systems like CentOS only provide `python3` nowadays. This just disables the tests as we don't need them. Differential Revision: https://reviews.llvm.org/D151917
1 parent d8ab952 commit 23cd352

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

MicroBenchmarks/libs/CMakeLists.txt

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,9 @@ set(CMAKE_CXX_STANDARD 11)
44
set(HAVE_STD_REGEX 1)
55
# When enforcing c++11 we need to disable one of the benchmark library's tests
66
set(BENCHMARK_HAS_CXX03_FLAG 0)
7+
# Tests fail build on system with just "python3" but no "python" executable.
8+
set(BENCHMARK_ENABLE_GTEST_TESTS OFF)
9+
set(BENCHMARK_ENABLE_ASSEMBLY_TESTS OFF)
710

811
add_subdirectory(benchmark)
912
test_suite_add_build_dependencies(benchmark)
10-
test_suite_add_build_dependencies(output_test_helper)
11-
test_suite_add_build_dependencies(gtest)
12-
test_suite_add_build_dependencies(gmock)
13-
14-
# These tests, when built with BENCHMARK_ENABLE_ASSEMBLY_TESTS is on.
15-
# They don't depend on the above, so we need to list them explicitly.
16-
if (BENCHMARK_ENABLE_ASSEMBLY_TESTS)
17-
test_suite_add_build_dependencies(donotoptimize_assembly_test)
18-
test_suite_add_build_dependencies(state_assembly_test)
19-
test_suite_add_build_dependencies(clobber_memory_assembly_test)
20-
endif()
21-

0 commit comments

Comments
 (0)