summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2016-08-23 11:13:02 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2016-08-30 15:21:15 -0500
commit7f9d098c2ff7e25a55bb3a69bd9d7314af1f9abc (patch)
tree05da4cb867958e1e667b1db83b246de169deb4e8 /share
parent1fc14fd7eddedccc6a24b34b42b9c26c96ded0db (diff)
downloadspack-7f9d098c2ff7e25a55bb3a69bd9d7314af1f9abc.tar.gz
spack-7f9d098c2ff7e25a55bb3a69bd9d7314af1f9abc.tar.bz2
spack-7f9d098c2ff7e25a55bb3a69bd9d7314af1f9abc.tar.xz
spack-7f9d098c2ff7e25a55bb3a69bd9d7314af1f9abc.zip
Add mercurial package, used as test dependency
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/qa/check_dependencies31
-rwxr-xr-xshare/spack/qa/run-doc-tests1
-rwxr-xr-xshare/spack/qa/run-unit-tests7
3 files changed, 33 insertions, 6 deletions
diff --git a/share/spack/qa/check_dependencies b/share/spack/qa/check_dependencies
index cbcda0ce0f..292eac7dd3 100755
--- a/share/spack/qa/check_dependencies
+++ b/share/spack/qa/check_dependencies
@@ -13,16 +13,37 @@
for dep in "$@"; do
if ! which $dep &> /dev/null; then
- # sphinx-build comes from sphinx
- package=$(echo $dep | cut -d - -f 1)
+ # Map binary name to package name
+ case $dep in
+ sphinx-apidoc|sphinx-build)
+ spack_package=py-sphinx
+ pip_package=sphinx
+ ;;
+ coverage)
+ spack_package=py-coverage
+ pip_package=coverage
+ ;;
+ flake8)
+ spack_package=py-flake8
+ pip_package=flake8
+ ;;
+ hg)
+ spack_package=py-mercurial
+ pip_package=mercurial
+ ;;
+ *)
+ spack_package=$dep
+ pip_package=$dep
+ ;;
+ esac
cat << EOF
-ERROR: $package is required to run this script.
+ERROR: $dep is required to run this script.
To install with Spack, run:
- $ spack install py-$package
+ $ spack install $spack_package
or, to install with pip, run:
- $ pip install $package
+ $ pip install $pip_package
Then add the bin directory to your PATH.
EOF
exit 1
diff --git a/share/spack/qa/run-doc-tests b/share/spack/qa/run-doc-tests
index bde30f74cc..9feaa3b3e3 100755
--- a/share/spack/qa/run-doc-tests
+++ b/share/spack/qa/run-doc-tests
@@ -18,6 +18,7 @@ DOC_DIR="$SPACK_ROOT/lib/spack/docs"
# Array of dependencies
deps=(
+ sphinx-apidoc
sphinx-build
hg
)
diff --git a/share/spack/qa/run-unit-tests b/share/spack/qa/run-unit-tests
index 9ce3062e58..fe2166d2dc 100755
--- a/share/spack/qa/run-unit-tests
+++ b/share/spack/qa/run-unit-tests
@@ -20,6 +20,7 @@ SPACK_ROOT="$QA_DIR/../../.."
# Array of dependencies
deps=(
coverage
+ hg
)
# Check for dependencies
@@ -28,6 +29,10 @@ deps=(
# Add Spack to the PATH.
export PATH="$SPACK_ROOT/bin:$PATH"
+# Move to root directory of Spack
+# Allows script to be run from anywhere
+cd "$SPACK_ROOT"
+
# Array of directories containing core Spack framework
core_dirs=(
bin
@@ -57,4 +62,4 @@ spack config get compilers
spack install -v libdwarf
# Run unit tests with code coverage
-coverage run spack test "$@"
+coverage run bin/spack test "$@"