spack/share/spack/qa/run-unit-tests
Todd Gamblin ff3b5d88e4 rework spack help (#3033)
- Full help is now only generated lazily, when needed.
  - Executing specific commands doesn't require loading all of them.
  - All commands are only loaded if we need them for help.

- There is now short and long help:
  - short help (spack help) shows only basic spack options
  - long help (spack help -a) shows all spack options
  - Both divide help on commands into high-level sections

- Commands now specify attributes from which help is auto-generated:
  - description: used in help to describe the command.
  - section: help section
  - level: short or long

- Clean up command descriptions

- Add a `spack docs` command to open full documentation
  in the browser.

- move `spack doc` command to `spack pydoc` for clarity

- Add a `spack --spec` command to show documentation on 
  the spec syntax.
2017-05-08 13:18:29 -07:00

33 lines
730 B
Bash
Executable File

#!/bin/bash -e
#
# Description:
# Runs Spack unit tests.
#
# Usage:
# run-unit-tests [test ...]
#
# Options:
# Optionally add one or more unit tests
# to only run these tests.
#
. "$(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
${coverage_run} bin/spack -h
${coverage_run} bin/spack help -a
# Profile and print top 20 lines for a simple call to spack spec
${coverage_run} bin/spack -p --lines 20 spec mpileaks
# Run unit tests with code coverage
${coverage_run} bin/spack test "$@"
${coverage_combine}