[Tarantool-patches] [PATCH 4/4] ci: integrate Jepsen tests to GitLab CI

Alexander Turenko alexander.turenko at tarantool.org
Thu Sep 17 18:25:41 MSK 2020


> > +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
> > +
> 
> Let's use more time for artifacts store, may be 6 months.

I agree. We sometimes return to bad results after some significant
delay.

> > -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 \
> 
> I don't think we need to add jepsen's new targets to the base one, let's
> move it to 'deps_debian_jepsen'.

I agree, it is a bit strange to install jepsen dependencies for all jobs
(when a separate jepsen goal exists at least).

> > +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
> > +

> > +$(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)
> > +
> 
> Do we really need standalone targets that will not be used in separate?
> This file is in makefile style, but not makefile in real, it has
> standalone targets that provides some process meanings, like:
>  - prepare deps
>  - build
>  - test

In my understanding it is Makefile anyway and it is usual for a Makefile
to use a file name as a goal (so the goal will be considered as made if
the file exists, if the goal is not marked as .PHONY).

> > +
> > +# ###################
> > +# Jepsen testing
> > +# ###################
> > +
> > +test_jepsen: deps_debian
> > +	cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON
> > +	make jepsen-single
> 
> Let's use deps_debian_jepsen here.

I would do it this way, yep.


More information about the Tarantool-patches mailing list