From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6CEB844643A for ; Wed, 16 Sep 2020 10:08:14 +0300 (MSK) From: sergeyb@tarantool.org Date: Wed, 16 Sep 2020 10:07:21 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 2/4] cmake: add targets to run Jepsen tests List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, avtikhon@tarantool.org, alexander.turenko@tarantool.org From: Sergey Bronnikov Added targets 'make jepsen-single' and 'make jepsen-cluster' to run Jepsen tests on a single Tarantool instance and cluster of Tarantool instances. Part of #5277 --- CMakeLists.txt | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 695e80c21..e8850e320 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,9 +17,11 @@ include(TestBigEndian) include(CheckFunctionExists) include(FindOptionalPackage) include(FindPackageMessage) +include(ExternalProject) find_program(ECHO echo) find_program(CAT cat) +find_program(BASH bash) find_program(GIT git) find_program(LD ld) find_program(CTAGS ctags) @@ -162,6 +164,31 @@ 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 "" +) + +# +# 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-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" +) + # # Get version # -- 2.25.1