spack/share/spack/qa/run-doc-tests
2016-11-12 16:55:37 -07:00

42 lines
765 B
Bash
Executable File

#!/usr/bin/env bash
#
# Description:
# Builds Spack documentation and checks for
# possible syntax errors. Treats warnings as
# fatal errors.
#
# Usage:
# run-doc-tests
#
# Notes:
# Requires sphinx, graphviz, git, mercurial, and subversion.
#
QA_DIR="$(dirname "$0")"
SPACK_ROOT="$QA_DIR/../../.."
DOC_DIR="$SPACK_ROOT/lib/spack/docs"
# Array of dependencies
deps=(
sphinx-apidoc
sphinx-build
dot
git
hg
svn
)
# Check for dependencies
"$QA_DIR/check_dependencies" "${deps[@]}" || exit 1
# Add Spack to the PATH.
export PATH="$SPACK_ROOT/bin:$PATH"
# Move to documentation directory
# Allows script to be run from anywhere
cd "$DOC_DIR"
# Treat warnings as fatal errors
make clean --silent
make SPHINXOPTS=-W JOBS=1