Skip to content
Snippets Groups Projects
Unverified Commit 8c85dbc7 authored by Oleg Babin's avatar Oleg Babin Committed by Alexander Turenko
Browse files

build: fix static build condition about testing


Before this patch RUN_TESTS condition in Dockerfile.staticbuild was
ignored and always was true.

However adding of brackets solves only part of problem. If RUN_TESTS is
empty `sh -c` returns 1 and build fails.

However if we run tests we should fail build if tests are not passed.
Ternary logic was rewritten to fair if-else.

This patch fixes it and allows build tarantool statically without
running tests.

@Totktonada: Fixed .gitlab.mk to pass RUN_TESTS environment variable to
docker build arguments.

Reviewed-by: default avatarAlexander Turenko <alexander.turenko@tarantool.org>
parent bb905d1d
No related branches found
No related tags found
No related merge requests found
......@@ -111,4 +111,4 @@ package: git_submodule_update
# ############
static_build:
docker build --network=host -f Dockerfile.staticbuild .
docker build --network=host --build-arg RUN_TESTS="${RUN_TESTS}" -f Dockerfile.staticbuild .
......@@ -90,9 +90,10 @@ RUN set -x \
RUN cd /tarantool && make install
ARG RUN_TESTS
RUN [ -n ${RUN_TESTS} ] && \
set -x && \
cd test && \
/usr/bin/python test-run.py --force
RUN if [ -n "${RUN_TESTS}" ]; then \
set -x && \
cd test && \
/usr/bin/python test-run.py --force; \
fi
ENTRYPOINT /bin/bash
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment