Skip to content

Commit

Permalink
Move lcov installation from toolchain to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Apr 10, 2019
1 parent ceb9b1a commit b436df0
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 77 deletions.
3 changes: 3 additions & 0 deletions tools/docker/Dockerfile.test_coverage-pdbg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ WORKDIR /workspace
COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./scripts/install_coverage.sh .
RUN ./install_coverage.sh

COPY ./scripts/install_regtest.sh .
RUN ./install_regtest.sh local_coverage pdbg

Expand Down
3 changes: 3 additions & 0 deletions tools/docker/Dockerfile.test_coverage-sdbg
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ WORKDIR /workspace
COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./scripts/install_coverage.sh .
RUN ./install_coverage.sh

COPY ./scripts/install_regtest.sh .
RUN ./install_regtest.sh local_coverage sdbg

Expand Down
17 changes: 17 additions & 0 deletions tools/docker/scripts/install_coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -e

# author: Ole Schuett

lcov_version="1.14"
lcov_sha256="14995699187440e0ae4da57fe3a64adc0a3c5cf14feab971f8db38fb7d8f071a"

cd /tmp
wget -q https://www.cp2k.org/static/downloads/lcov-${lcov_version}.tar.gz
echo "${lcov_sha256} lcov-${lcov_version}.tar.gz" | sha256sum --check
tar -xzf lcov-${lcov_version}.tar.gz
cd lcov-${lcov_version}
make install > make.log 2>&1
cd ..
rm -rf lcov-${lcov_version}.tar.gz lcov-${lcov_version}

#EOF
20 changes: 6 additions & 14 deletions tools/toolchain/install_cp2k_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ The --with-PKG options follow the rules:
--with-valgrind Valgrind memory debugging tool, only used for
debugging purposes.
Default = no
--with-lcov LCOV code coverage utility, mainly used by CP2K developers
Default = no
--with-openmpi OpenMPI, important if you want parallel version
of CP2K.
Default = system
Expand Down Expand Up @@ -257,7 +255,7 @@ EOF
# PACKAGE LIST: register all new dependent tools and libs here. Order
# is important, the first in the list gets installed first
# ------------------------------------------------------------------------
tool_list="lcov valgrind cmake gcc"
tool_list="valgrind cmake gcc"
mpi_list="mpich openmpi"
math_list="mkl acml openblas reflapack"
lib_list="fftw libint libxc libsmm libxsmm scalapack elpa \
Expand Down Expand Up @@ -497,9 +495,6 @@ while [ $# -ge 1 ] ; do
--with-cmake*)
with_cmake=$(read_with $1)
;;
--with-lcov*)
with_lcov=$(read_with $1)
;;
--with-valgrind*)
with_valgrind=$(read_with $1)
;;
Expand Down Expand Up @@ -617,7 +612,6 @@ export ENABLE_CRAY=$enable_cray
[ "$enable_gcc_master" = "__TRUE__" ] && export gcc_ver=master
[ "$enable_libxsmm_master" = "__TRUE__" ] && export libxsmm_ver=master
[ "$with_valgrind" != "__DONTUSE__" ] && export ENABLE_VALGRIND="__TRUE__"
[ "$with_lcov" != "__DONTUSE__" ] && export ENABLE_COVERAGE="__TRUE__"

# ------------------------------------------------------------------------
# Check and solve known conflicts before installations proceed
Expand Down Expand Up @@ -1214,13 +1208,11 @@ if [ "$ENABLE_VALGRIND" = __TRUE__ ] ; then
gen_arch_file "local_valgrind.popt" VALGRIND MPI
fi
# coverage enabled arch files
if [ "$ENABLE_COVERAGE" = __TRUE__ ]; then
gen_arch_file "local_coverage.sdbg" COVERAGE
[ "$MPI_MODE" != no ] && \
gen_arch_file "local_coverage.pdbg" COVERAGE MPI
[ "$ENABLE_CUDA" = __TRUE__ ] && \
gen_arch_file "local_coverage_cuda.pdbg" COVERAGE MPI CUDA
fi
gen_arch_file "local_coverage.sdbg" COVERAGE
[ "$MPI_MODE" != no ] && \
gen_arch_file "local_coverage.pdbg" COVERAGE MPI
[ "$ENABLE_CUDA" = __TRUE__ ] && \
gen_arch_file "local_coverage_cuda.pdbg" COVERAGE MPI CUDA

cd "${ROOTDIR}"

Expand Down
1 change: 0 additions & 1 deletion tools/toolchain/scripts/common_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ NPROCS=${NPROCS:-1}
ENABLE_OMP=${ENABLE_OMP:-"__TRUE__"}
ENABLE_TSAN=${ENABLE_TSAN:-"__FALSE__"}
ENABLE_VALGRIND=${ENABLE_VALGRIND:-"__FALSE__"}
ENABLE_COVERAGE=${ENABLE_COVERAGE:-"__FALSE__"}
ENABLE_CUDA=${ENABLE_CUDA:-"__FALSE__"}
ENABLE_CRAY=${ENABLE_CRAY:-"__FALSE__"}
MPI_MODE=${MPI_MODE:-openmpi}
Expand Down
62 changes: 0 additions & 62 deletions tools/toolchain/scripts/install_lcov.sh

This file was deleted.

0 comments on commit b436df0

Please sign in to comment.