From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp14.mail.ru (smtp14.mail.ru [94.100.181.95]) (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 13192469719 for ; Fri, 25 Sep 2020 12:30:35 +0300 (MSK) Date: Fri, 25 Sep 2020 12:30:34 +0300 From: "Alexander V. Tikhonov" Message-ID: <20200925093034.GB15616@hpalx> References: <6c8e16dd9ed20bbfb94929d4c59cd7541b8ed589.1600951585.git.sergeyb@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c8e16dd9ed20bbfb94929d4c59cd7541b8ed589.1600951585.git.sergeyb@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 1/2] cmake: move jepsen targets under option WITH_JEPSEN List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sergeyb@tarantool.org Cc: tarantool-patches@dev.tarantool.org Hi Sergey, thanks for the patch. As I see you blocked all the Jepsen part in cmake targets under the Jepsen's environment variable. And now only using it the Jepsen's repository will be used. So patch LGTM. On Thu, Sep 24, 2020 at 03:50:22PM +0300, sergeyb@tarantool.org wrote: > From: Sergey Bronnikov > > 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 >