
* Move flake8 tests on Github Actions * Move shell test to Github Actions * Moved documentation build to Github Action * Don't run coverage on Python 2.6 Since we get connection errors consistently on Travis when trying to upload coverage results for Python 2.6, avoid computing coverage entirely to speed-up tests.
46 lines
1.2 KiB
Bash
Executable File
46 lines
1.2 KiB
Bash
Executable File
#!/bin/bash -e
|
|
#
|
|
# 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:
|
|
# Runs Spack unit tests.
|
|
#
|
|
# Usage:
|
|
# run-unit-tests [test ...]
|
|
#
|
|
# Options:
|
|
# Optionally add one or more unit tests
|
|
# to only run these tests.
|
|
#
|
|
|
|
#-----------------------------------------------------------
|
|
# Run a few initial commands and set up test environment
|
|
#-----------------------------------------------------------
|
|
ORIGINAL_PATH="$PATH"
|
|
|
|
. "$(dirname $0)/setup.sh"
|
|
check_dependencies $coverage git hg svn
|
|
|
|
# Move to root directory of Spack
|
|
# Allows script to be run from anywhere
|
|
cd "$SPACK_ROOT"
|
|
|
|
# Print compiler information
|
|
spack config get compilers
|
|
|
|
# Run spack help to cover command import
|
|
bin/spack -h
|
|
bin/spack help -a
|
|
|
|
# Profile and print top 20 lines for a simple call to spack spec
|
|
spack -p --lines 20 spec mpileaks%gcc ^elfutils@0.170
|
|
|
|
#-----------------------------------------------------------
|
|
# Run unit tests with code coverage
|
|
#-----------------------------------------------------------
|
|
$coverage_run $(which spack) test -x --verbose
|