From: sergeyb@tarantool.org
To: tarantool-patches@dev.tarantool.org, avtikhon@tarantool.org,
alexander.turenko@tarantool.org
Subject: [Tarantool-patches] [PATCH 1/2] cmake: move jepsen targets under option WITH_JEPSEN
Date: Thu, 24 Sep 2020 15:50:22 +0300 [thread overview]
Message-ID: <6c8e16dd9ed20bbfb94929d4c59cd7541b8ed589.1600951585.git.sergeyb@tarantool.org> (raw)
In-Reply-To: <cover.1600951585.git.sergeyb@tarantool.org>
From: Sergey Bronnikov <sergeyb@tarantool.org>
For running Jepsen tests we need to checkout external repository with tests
source code on a build stage. This behaviour brokes a Tarantool build under
Gentoo. Option WITH_JEPSEN enables targets only when they needed.
Closes #5325
---
.travis.mk | 2 +-
CMakeLists.txt | 46 +++++++++++++++++++++++++---------------------
2 files changed, 26 insertions(+), 22 deletions(-)
diff --git a/.travis.mk b/.travis.mk
index d8f97ef5c..17523fb86 100644
--- a/.travis.mk
+++ b/.travis.mk
@@ -293,5 +293,5 @@ test_freebsd: deps_freebsd test_freebsd_no_deps
# ###################
test_jepsen: deps_debian_jepsen
- cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON
+ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON -DWITH_JEPSEN=ON
make jepsen-single
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8850e320..512f50e05 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,30 +164,34 @@ add_custom_command(TARGET luacheck
COMMENT "Perform static analysis of Lua code"
)
-ExternalProject_Add(
- jepsen-tests
- GIT_REPOSITORY https://github.com/tarantool/jepsen.tarantool
- CONFIGURE_COMMAND ""
- BUILD_COMMAND ""
- INSTALL_COMMAND ""
- TEST_COMMAND ""
-)
+if (WITH_JEPSEN)
+ ExternalProject_Add(
+ jepsen-tests
+ GIT_REPOSITORY https://github.com/tarantool/jepsen.tarantool
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ TEST_COMMAND ""
+ )
-#
-# Enable 'make jepsen-*' targets.
-#
+ #
+ # Enable 'make jepsen-*' targets.
+ #
-add_custom_target(jepsen-single DEPENDS jepsen-tests)
-add_custom_command(TARGET jepsen-single
- COMMAND ${BASH} ${PROJECT_SOURCE_DIR}/tools/run-jepsen-tests.sh ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}
- COMMENT "Running Jepsen tests on a single Tarantool instance"
-)
+ add_custom_target(jepsen-single DEPENDS jepsen-tests)
+ add_custom_command(TARGET jepsen-single
+ COMMAND ${BASH} ${PROJECT_SOURCE_DIR}/tools/run-jepsen-tests.sh
+ ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR}
+ COMMENT "Running Jepsen tests on a single Tarantool instance"
+ )
-add_custom_target(jepsen-cluster DEPENDS jepsen-tests)
-add_custom_command(TARGET jepsen-cluster
- COMMAND ${BASH} ${PROJECT_SOURCE_DIR}/tools/run-jepsen-tests.sh ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} 5
- COMMENT "Running Jepsen tests on a cluster with 5 Tarantool instances"
-)
+ add_custom_target(jepsen-cluster DEPENDS jepsen-tests)
+ add_custom_command(TARGET jepsen-cluster
+ COMMAND ${BASH} ${PROJECT_SOURCE_DIR}/tools/run-jepsen-tests.sh
+ ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} 5
+ COMMENT "Running Jepsen tests on a cluster with 5 Tarantool instances"
+ )
+endif()
#
# Get version
--
2.25.1
next parent reply other threads:[~2020-09-24 12:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1600951585.git.sergeyb@tarantool.org>
2020-09-24 12:50 ` sergeyb [this message]
2020-09-25 9:30 ` Alexander V. Tikhonov
2020-09-24 12:50 ` [Tarantool-patches] [PATCH 2/2] gitignore: ignore directories made on running jepsen tests sergeyb
2020-09-25 9:24 ` Alexander V. Tikhonov
2020-09-25 12:59 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6c8e16dd9ed20bbfb94929d4c59cd7541b8ed589.1600951585.git.sergeyb@tarantool.org \
--to=sergeyb@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=avtikhon@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH 1/2] cmake: move jepsen targets under option WITH_JEPSEN' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox