tests: add tests for setup-env.sh

- tests use a shell-script harness and test all Spack commands that
  require special shell support.

- tests work in bash, zsh, and dash

- run setup-env.sh tests on macos and linux builds.
  - we run them on macos and linux
This commit is contained in:
Todd Gamblin
2019-07-03 01:56:13 -07:00
parent e625ee3ffd
commit 47e9f7aac9
5 changed files with 343 additions and 29 deletions

View File

@@ -50,24 +50,6 @@ jobs:
os: linux
language: python
env: [ TEST_SUITE=unit, COVERAGE=true ]
addons:
apt:
packages:
- cmake
- gfortran
- graphviz
- gnupg2
- kcov
- mercurial
- ninja-build
- perl
- perl-base
- realpath
- patchelf
- r-base
- r-base-core
- r-base-dev
- python: '3.7'
sudo: required
os: linux
@@ -159,6 +141,7 @@ addons:
- r-base
- r-base-core
- r-base-dev
- zsh
# for Mac builds, we use Homebrew
homebrew:
packages:
@@ -166,6 +149,8 @@ addons:
- gcc
- gnupg2
- ccache
- dash
- kcov
update: true
# ~/.ccache needs to be cached directly as Travis is not taking care of it
@@ -223,11 +208,13 @@ script:
after_success:
- ccache -s
- if [[ "$TEST_SUITE" == "unit" || "$TEST_SUITE" == "build" ]]; then
codecov --env PYTHON_VERSION
--required
--flags "${TEST_SUITE}${TRAVIS_OS_NAME}";
fi
- case "$TEST_SUITE" in
unit)
codecov --env PYTHON_VERSION
--required
--flags "${TEST_SUITE}${TRAVIS_OS_NAME}";
;;
esac
#=============================================================================
# Notifications