summaryrefslogtreecommitdiff
path: root/share/spack/qa/run-bootstrap-tests
blob: 9532d2d801a15c0bfeed6e1a427af8dced4edc4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/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:
#     Checks that Spack shell integration with modules works correctly.
#
# Usage:
#     run-bootstrap-tests
#
. "$(dirname $0)/setup.sh"
check_dependencies ${coverage} git hg svn

# Fetch the sources in a mirror, and add it to Spack
mkdir -p ~/.mirror
bin/spack mirror add travis ~/.mirror
bin/spack mirror create -D -d ~/.mirror environment-modules~X


# Move to root directory of Spack
# Allows script to be run from anywhere
cd "$SPACK_ROOT"

# Print compiler information
spack config get compilers

# Run some build smoke tests, potentially with code coverage
${coverage_run} bin/spack bootstrap

# Check module integration
. "share/spack/setup-env.sh"
module av || exit 1
spack load tcl || exit 1