diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/spack/docker/centos-6.dockerfile | 28 | ||||
-rw-r--r-- | share/spack/docker/centos-7.dockerfile | 28 | ||||
-rw-r--r-- | share/spack/docker/ubuntu-1604.dockerfile | 28 | ||||
-rw-r--r-- | share/spack/docker/ubuntu-1804.dockerfile | 28 | ||||
-rwxr-xr-x | share/spack/qa/install_patchelf.sh | 22 | ||||
-rwxr-xr-x | share/spack/qa/run-shell-tests | 2 | ||||
-rwxr-xr-x | share/spack/qa/run-unit-tests | 6 | ||||
-rwxr-xr-x | share/spack/qa/setup.sh | 16 | ||||
-rwxr-xr-x | share/spack/spack-completion.bash | 2 | ||||
-rw-r--r-- | share/spack/templates/container/Dockerfile | 2 | ||||
-rw-r--r-- | share/spack/templates/container/singularity.def | 2 |
11 files changed, 91 insertions, 73 deletions
diff --git a/share/spack/docker/centos-6.dockerfile b/share/spack/docker/centos-6.dockerfile index 8c971124a5..1ba58d66af 100644 --- a/share/spack/docker/centos-6.dockerfile +++ b/share/spack/docker/centos-6.dockerfile @@ -9,20 +9,6 @@ ENV DOCKERFILE_BASE=centos \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - RUN yum update -y \ && yum install -y epel-release \ && yum update -y \ @@ -50,6 +36,20 @@ RUN yum update -y \ && rm -rf /var/cache/yum \ && yum clean all +COPY bin $SPACK_ROOT/bin +COPY etc $SPACK_ROOT/etc +COPY lib $SPACK_ROOT/lib +COPY share $SPACK_ROOT/share +COPY var $SPACK_ROOT/var +RUN mkdir -p $SPACK_ROOT/opt/spack + +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + RUN mkdir -p /root/.spack \ && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ /root/.spack/modules.yaml \ diff --git a/share/spack/docker/centos-7.dockerfile b/share/spack/docker/centos-7.dockerfile index 292663d922..c8dc75a0f3 100644 --- a/share/spack/docker/centos-7.dockerfile +++ b/share/spack/docker/centos-7.dockerfile @@ -9,20 +9,6 @@ ENV DOCKERFILE_BASE=centos \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - RUN yum update -y \ && yum install -y epel-release \ && yum update -y \ @@ -50,6 +36,20 @@ RUN yum update -y \ && rm -rf /var/cache/yum \ && yum clean all +COPY bin $SPACK_ROOT/bin +COPY etc $SPACK_ROOT/etc +COPY lib $SPACK_ROOT/lib +COPY share $SPACK_ROOT/share +COPY var $SPACK_ROOT/var +RUN mkdir -p $SPACK_ROOT/opt/spack + +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + RUN mkdir -p /root/.spack \ && cp $SPACK_ROOT/share/spack/docker/modules.yaml \ /root/.spack/modules.yaml \ diff --git a/share/spack/docker/ubuntu-1604.dockerfile b/share/spack/docker/ubuntu-1604.dockerfile index 1f7db8bea9..c07cde5918 100644 --- a/share/spack/docker/ubuntu-1604.dockerfile +++ b/share/spack/docker/ubuntu-1604.dockerfile @@ -9,20 +9,6 @@ ENV DOCKERFILE_BASE=ubuntu:16.04 \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - RUN apt-get -yqq update \ && apt-get -yqq install --no-install-recommends \ build-essential \ @@ -48,6 +34,20 @@ RUN apt-get -yqq update \ && pip3 install boto3 \ && rm -rf /var/lib/apt/lists/* +COPY bin $SPACK_ROOT/bin +COPY etc $SPACK_ROOT/etc +COPY lib $SPACK_ROOT/lib +COPY share $SPACK_ROOT/share +COPY var $SPACK_ROOT/var +RUN mkdir -p $SPACK_ROOT/opt/spack + +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + # Add LANG default to en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV LANG en_US.UTF-8 diff --git a/share/spack/docker/ubuntu-1804.dockerfile b/share/spack/docker/ubuntu-1804.dockerfile index a8d9577b66..1ecef10652 100644 --- a/share/spack/docker/ubuntu-1804.dockerfile +++ b/share/spack/docker/ubuntu-1804.dockerfile @@ -9,20 +9,6 @@ ENV DOCKERFILE_BASE=ubuntu \ CURRENTLY_BUILDING_DOCKER_IMAGE=1 \ container=docker -COPY bin $SPACK_ROOT/bin -COPY etc $SPACK_ROOT/etc -COPY lib $SPACK_ROOT/lib -COPY share $SPACK_ROOT/share -COPY var $SPACK_ROOT/var -RUN mkdir -p $SPACK_ROOT/opt/spack - -RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/docker-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/interactive-shell \ - && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ - /usr/local/bin/spack-env - RUN apt-get -yqq update \ && apt-get -yqq install --no-install-recommends \ build-essential \ @@ -48,6 +34,20 @@ RUN apt-get -yqq update \ && pip3 install boto3 \ && rm -rf /var/lib/apt/lists/* +COPY bin $SPACK_ROOT/bin +COPY etc $SPACK_ROOT/etc +COPY lib $SPACK_ROOT/lib +COPY share $SPACK_ROOT/share +COPY var $SPACK_ROOT/var +RUN mkdir -p $SPACK_ROOT/opt/spack + +RUN ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/docker-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/interactive-shell \ + && ln -s $SPACK_ROOT/share/spack/docker/entrypoint.bash \ + /usr/local/bin/spack-env + # Add LANG default to en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 ENV LANG en_US.UTF-8 diff --git a/share/spack/qa/install_patchelf.sh b/share/spack/qa/install_patchelf.sh new file mode 100755 index 0000000000..7660ba8eef --- /dev/null +++ b/share/spack/qa/install_patchelf.sh @@ -0,0 +1,22 @@ +#!/bin/sh +# +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +# +# Description: +# Install patchelf for use in buildcache unit tests +# +# Usage: +# install-patchelf.sh +# +set -ex +if [ "$TRAVIS_OS_NAME" = "linux" ]; then + olddir=$PWD + cd /tmp + wget https://github.com/NixOS/patchelf/archive/0.10.tar.gz + tar -xvf 0.10.tar.gz + cd patchelf-0.10 && ./bootstrap.sh && ./configure --prefix=/usr && make && sudo make install && cd $olddir +fi diff --git a/share/spack/qa/run-shell-tests b/share/spack/qa/run-shell-tests index 126e639186..c5c3425a8e 100755 --- a/share/spack/qa/run-shell-tests +++ b/share/spack/qa/run-shell-tests @@ -18,7 +18,7 @@ ORIGINAL_PATH="$PATH" . "$(dirname $0)/setup.sh" -check_dependencies $coverage git hg svn +check_dependencies $coverage kcov git hg svn # Clean the environment by removing Spack from the path and getting rid of # the spack shell function diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests index 7c4abb1413..c529f8297e 100755 --- a/share/spack/qa/run-unit-tests +++ b/share/spack/qa/run-unit-tests @@ -37,11 +37,7 @@ bin/spack -h bin/spack help -a # Profile and print top 20 lines for a simple call to spack spec -if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - spack -p --lines 20 spec openmpi -else - spack -p --lines 20 spec mpileaks%gcc ^elfutils@0.170 -fi +spack -p --lines 20 spec mpileaks%gcc ^elfutils@0.170 #----------------------------------------------------------- # Run unit tests with code coverage diff --git a/share/spack/qa/setup.sh b/share/spack/qa/setup.sh index 6536479015..34b426dcd7 100755 --- a/share/spack/qa/setup.sh +++ b/share/spack/qa/setup.sh @@ -26,14 +26,11 @@ if [[ "$COVERAGE" == "true" ]]; then coverage=coverage coverage_run="coverage run" - # bash coverage depends on some other factors -- there are issues with - # kcov for Python 2.6, unit tests, and build tests. - if [[ $TRAVIS_PYTHON_VERSION != 2.6 ]]; then - mkdir -p coverage - cc_script="$SPACK_ROOT/lib/spack/env/cc" - bashcov=$(realpath ${QA_DIR}/bashcov) - sed -i~ "s@#\!/bin/bash@#\!${bashcov}@" "$cc_script" - fi + # bash coverage depends on some other factors + mkdir -p coverage + cc_script="$SPACK_ROOT/lib/spack/env/cc" + bashcov=$(realpath ${QA_DIR}/bashcov) + sed -i~ "s@#\!/bin/bash@#\!${bashcov}@" "$cc_script" fi # @@ -74,6 +71,9 @@ check_dependencies() { spack_package=mercurial pip_package=mercurial ;; + kcov) + spack_package=kcov + ;; svn) spack_package=subversion ;; diff --git a/share/spack/spack-completion.bash b/share/spack/spack-completion.bash index 11bd906ad0..fc1b4e2a27 100755 --- a/share/spack/spack-completion.bash +++ b/share/spack/spack-completion.bash @@ -639,7 +639,7 @@ _spack_containerize() { _spack_create() { if $list_options then - SPACK_COMPREPLY="-h --help --keep-stage -n --name -t --template -r --repo -N --namespace -f --force --skip-editor" + SPACK_COMPREPLY="-h --help --keep-stage -n --name -t --template -r --repo -N --namespace -f --force --skip-editor -b --batch" else SPACK_COMPREPLY="" fi diff --git a/share/spack/templates/container/Dockerfile b/share/spack/templates/container/Dockerfile index 2f1370fdb3..c65fce5627 100644 --- a/share/spack/templates/container/Dockerfile +++ b/share/spack/templates/container/Dockerfile @@ -7,7 +7,7 @@ RUN mkdir {{ paths.environment }} \ {{ manifest }} > {{ paths.environment }}/spack.yaml # Install the software, remove unecessary deps -RUN cd {{ paths.environment }} && spack env activate . && spack install && spack gc -y +RUN cd {{ paths.environment }} && spack env activate . && spack install --fail-fast && spack gc -y {% if strip %} # Strip all the binaries diff --git a/share/spack/templates/container/singularity.def b/share/spack/templates/container/singularity.def index 7ba0a3ff1b..44b22aeae6 100644 --- a/share/spack/templates/container/singularity.def +++ b/share/spack/templates/container/singularity.def @@ -12,7 +12,7 @@ EOF # Install all the required software . /opt/spack/share/spack/setup-env.sh spack env activate . - spack install + spack install --fail-fast spack gc -y spack env deactivate spack env activate --sh -d . >> {{ paths.environment }}/environment_modifications.sh |