Skip to content

Commit

Permalink
Docker: Fix revision on coverage test
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Jun 4, 2022
1 parent 0893e75 commit cde3636
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tools/docker/Dockerfile.test_coverage-pdbg
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install CP2K using local_coverage.pdbg.
WORKDIR /opt/cp2k
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c " \
if [ -n "${GIT_COMMIT_SHA}" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi && \
mkdir -p arch && \
ln -vs /opt/cp2k-toolchain/install/arch/local_coverage.pdbg ./arch/ && \
echo 'Compiling cp2k...' && \
Expand Down
2 changes: 2 additions & 0 deletions tools/docker/Dockerfile.test_coverage-sdbg
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ RUN ./scripts/generate_arch_files.sh && rm -rf ./build

# Install CP2K using local_coverage.sdbg.
WORKDIR /opt/cp2k
ARG GIT_COMMIT_SHA
COPY ./Makefile .
COPY ./src ./src
COPY ./exts ./exts
COPY ./tools/build_utils ./tools/build_utils
RUN /bin/bash -c " \
if [ -n "${GIT_COMMIT_SHA}" ] ; then echo "git:\${GIT_COMMIT_SHA::7}" > REVISION; fi && \
mkdir -p arch && \
ln -vs /opt/cp2k-toolchain/install/arch/local_coverage.sdbg ./arch/ && \
echo 'Compiling cp2k...' && \
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/generate_dockerfiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def performance(arch: str = "local") -> str:
# ======================================================================================
def coverage(version: str) -> str:
return (
install_cp2k(version=version, arch="local_coverage")
install_cp2k(version=version, arch="local_coverage", revision=True)
+ rf"""
# Run coverage test for {version}.
COPY ./tools/docker/scripts/test_coverage.sh .
Expand Down

0 comments on commit cde3636

Please sign in to comment.