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 2C80244643E for ; Wed, 16 Sep 2020 10:08:27 +0300 (MSK) From: sergeyb@tarantool.org Date: Wed, 16 Sep 2020 10:07:24 +0300 Message-Id: <8c4c50dbe712bb17cfe5a06fc6329d0e3ea4c8bd.1600239621.git.sergeyb@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 4/4] ci: integrate Jepsen tests to GitLab CI 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 a new stage with a single job to run Jepsen tests. Job is not started automatically by default, one need to trigger it manually. Directory with test results (logs, graphs, operations history) published to artifacts. Closes #5277 --- .gitlab-ci.yml | 14 ++++++++++++++ .travis.mk | 34 +++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05d40b013..3afcfc245 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages: - static_analysis - test + - long_tests - perf - cleanup @@ -210,6 +211,19 @@ freebsd_12_release: - ${GITLAB_MAKE} vms_start - ${GITLAB_MAKE} vms_test_freebsd +jepsen: + <<: *docker_test_definition + script: + - ${GITLAB_MAKE} test_jepsen + stage: long_tests + when: manual + tags: + - mcs_jepsen_docker + artifacts: + paths: + - jepsen-tests-prefix/src/jepsen-tests/store + expire_in: 1 week + # #### # Perf # #### diff --git a/.travis.mk b/.travis.mk index efc05cf05..781b37c15 100644 --- a/.travis.mk +++ b/.travis.mk @@ -8,6 +8,12 @@ TEST_RUN_EXTRA_PARAMS?= MAX_FILES?=65534 MAX_PROC?=2500 OOS_SRC_PATH="/source" +BIN_DIR=/usr/local/bin + +CLOJURE_URL="https://download.clojure.org/install/linux-install-1.10.1.561.sh" +LEIN_URL="https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein" +TERRAFORM_NAME="terraform_0.13.1_linux_amd64.zip" +TERRAFORM_URL="https://releases.hashicorp.com/terraform/0.13.1/"$(TERRAFORM_NAME) all: package @@ -60,7 +66,7 @@ docker_%: # commit, so the build requires old dependencies to be installed. # See ce623a23416eb192ce70116fd14992e84e7ccbbe ('Enable GitLab CI # testing') for more information. -deps_debian: +deps_debian: $(BIN_DIR)/clojure $(BIN_DIR)/lein $(BIN_DIR)/terraform apt-get update ${APT_EXTRA_FLAGS} && apt-get install -y -f \ build-essential cmake coreutils sed \ libreadline-dev libncurses5-dev libyaml-dev libssl-dev \ @@ -69,6 +75,11 @@ deps_debian: python-msgpack python-yaml python-argparse python-six python-gevent \ lcov ruby clang llvm llvm-dev zlib1g-dev autoconf automake libtool +deps_debian_jepsen: + apt-get update ${APT_EXTRA_FLAGS} && apt-get install -y -f \ + openjdk-8-jre openjdk-8-jre-headless libjna-java gnuplot graphviz \ + zip unzip openssh-client jq + deps_buster_clang_8: deps_debian echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" > /etc/apt/sources.list.d/clang_8.list echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" >> /etc/apt/sources.list.d/clang_8.list @@ -76,6 +87,19 @@ deps_buster_clang_8: deps_debian apt-get update apt-get install -y clang-8 llvm-8-dev +$(BIN_DIR)/clojure: deps_debian_jepsen + curl $(CLOJURE_URL) | sudo bash + +$(BIN_DIR)/lein: deps_debian_jepsen + curl $(LEIN_URL) > $@ + chmod a+x $@ + $@ version + +$(BIN_DIR)/terraform: deps_debian_jepsen + curl -O $(TERRAFORM_URL) + unzip -o $(TERRAFORM_NAME) terraform -d $(dir $@) + rm -f $(TERRAFORM_NAME) + # Release configure_debian: @@ -232,3 +256,11 @@ test_freebsd_no_deps: build_freebsd cd test && python2.7 test-run.py --force $(TEST_RUN_EXTRA_PARAMS) test_freebsd: deps_freebsd test_freebsd_no_deps + +# ################### +# Jepsen testing +# ################### + +test_jepsen: deps_debian + cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON + make jepsen-single -- 2.25.1