spack/share/spack/qa/run-shell-tests
Todd Gamblin a8ccb8e116 copyrights: update all files with license headers for 2021
- [x] add `concretize.lp`, `spack.yaml`, etc. to licensed files
- [x] update all licensed files to say 2013-2021 using
      `spack license update-copyright-year`
- [x] appease mypy with some additions to package.py that needed
      for oneapi.py
2021-01-02 12:12:00 -08:00

54 lines
1.5 KiB
Bash
Executable file

#!/bin/bash -e
#
# Copyright 2013-2021 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:
# Runs Spack shell tests.
#
# Usage:
# run-shell-tests
#-----------------------------------------------------------
# Run a few initial commands and set up test environment
#-----------------------------------------------------------
ORIGINAL_PATH="$PATH"
. "$(dirname $0)/setup.sh"
check_dependencies $coverage kcov git hg svn
# Clean the environment by removing Spack from the path and getting rid of
# the spack shell function
export PATH="$ORIGINAL_PATH"
unset spack
# Convert QA_DIR to absolute path before changing directory
export QA_DIR=$(realpath $QA_DIR)
# Start in the spack root directory
cd "$SPACK_ROOT"
# Run bash tests with coverage enabled, but pipe output to /dev/null
# because it seems that kcov seems to undo the script's redirection
if [ "$COVERAGE" = true ]; then
"$QA_DIR/bashcov" "$QA_DIR/setup-env-test.sh" &> /dev/null
"$QA_DIR/bashcov" "$QA_DIR/completion-test.sh" &> /dev/null
else
bash "$QA_DIR/setup-env-test.sh"
bash "$QA_DIR/completion-test.sh"
fi
# Run the test scripts for their output (these will print nicely)
zsh "$QA_DIR/setup-env-test.sh"
zsh "$QA_DIR/completion-test.sh"
dash "$QA_DIR/setup-env-test.sh"
# Run fish tests
fish "$QA_DIR/setup-env-test.fish"
# run csh and tcsh tests
csh "$QA_DIR/setup-env-test.csh"
tcsh "$QA_DIR/setup-env-test.csh"