From 03e7e3be74e145ebb5b0310bf4c467d58d14f7df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Fri, 22 Apr 2022 18:07:51 +0300 Subject: [PATCH] mdbx-cmake: avoid tests with `mdbx_chk` when `MDBX_BUILD_TOOLS=OFF`. --- test/CMakeLists.txt | 66 ++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c2e1a6e2..62a4e643 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -79,16 +79,18 @@ else() set_tests_properties(smoke PROPERTIES TIMEOUT 600 RUN_SERIAL OFF) - add_test(NAME smoke_chk COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv smoke.db) - set_tests_properties(smoke_chk PROPERTIES - DEPENDS smoke - TIMEOUT 60 - REQUIRED_FILES smoke.db) - add_test(NAME smoke_chk_copy COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv smoke.db-copy) - set_tests_properties(smoke_chk_copy PROPERTIES - DEPENDS smoke - TIMEOUT 60 - REQUIRED_FILES smoke.db-copy) + if(MDBX_BUILD_TOOLS) + add_test(NAME smoke_chk COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv smoke.db) + set_tests_properties(smoke_chk PROPERTIES + DEPENDS smoke + TIMEOUT 60 + REQUIRED_FILES smoke.db) + add_test(NAME smoke_chk_copy COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv smoke.db-copy) + set_tests_properties(smoke_chk_copy PROPERTIES + DEPENDS smoke + TIMEOUT 60 + REQUIRED_FILES smoke.db-copy) + endif() add_test(NAME dupsort_writemap COMMAND ${MDBX_OUTPUT_DIR}/mdbx_test --loglevel=notice @@ -97,16 +99,18 @@ else() set_tests_properties(dupsort_writemap PROPERTIES TIMEOUT 600 RUN_SERIAL OFF) - add_test(NAME dupsort_writemap_chk COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv dupsort_writemap.db) - set_tests_properties(dupsort_writemap_chk PROPERTIES - DEPENDS dupsort_writemap - TIMEOUT 60 - REQUIRED_FILES dupsort_writemap.db) - add_test(NAME dupsort_writemap_chk_copy COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv dupsort_writemap.db-copy) - set_tests_properties(dupsort_writemap_chk_copy PROPERTIES - DEPENDS dupsort_writemap - TIMEOUT 60 - REQUIRED_FILES dupsort_writemap.db-copy) + if(MDBX_BUILD_TOOLS) + add_test(NAME dupsort_writemap_chk COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv dupsort_writemap.db) + set_tests_properties(dupsort_writemap_chk PROPERTIES + DEPENDS dupsort_writemap + TIMEOUT 60 + REQUIRED_FILES dupsort_writemap.db) + add_test(NAME dupsort_writemap_chk_copy COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv dupsort_writemap.db-copy) + set_tests_properties(dupsort_writemap_chk_copy PROPERTIES + DEPENDS dupsort_writemap + TIMEOUT 60 + REQUIRED_FILES dupsort_writemap.db-copy) + endif() add_test(NAME uniq_nested COMMAND ${MDBX_OUTPUT_DIR}/mdbx_test --loglevel=notice @@ -114,15 +118,17 @@ else() set_tests_properties(uniq_nested PROPERTIES TIMEOUT 1800 RUN_SERIAL OFF) - add_test(NAME uniq_nested_chk COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv uniq_nested.db) - set_tests_properties(uniq_nested_chk PROPERTIES - DEPENDS uniq_nested - TIMEOUT 60 - REQUIRED_FILES uniq_nested.db) - add_test(NAME uniq_nested_chk_copy COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv uniq_nested.db-copy) - set_tests_properties(uniq_nested_chk_copy PROPERTIES - DEPENDS uniq_nested - TIMEOUT 60 - REQUIRED_FILES uniq_nested.db-copy) + if(MDBX_BUILD_TOOLS) + add_test(NAME uniq_nested_chk COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv uniq_nested.db) + set_tests_properties(uniq_nested_chk PROPERTIES + DEPENDS uniq_nested + TIMEOUT 60 + REQUIRED_FILES uniq_nested.db) + add_test(NAME uniq_nested_chk_copy COMMAND ${MDBX_OUTPUT_DIR}/mdbx_chk -nvv uniq_nested.db-copy) + set_tests_properties(uniq_nested_chk_copy PROPERTIES + DEPENDS uniq_nested + TIMEOUT 60 + REQUIRED_FILES uniq_nested.db-copy) + endif() endif()