diff options
author | Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com> | 2019-07-24 11:30:27 -0700 |
---|---|---|
committer | Greg Becker <becker33@llnl.gov> | 2019-07-24 13:30:27 -0500 |
commit | 7411347a2958167f61682b24c5a314e4645ac821 (patch) | |
tree | f2c97de49ab457ccdd011dd6f941570537d5adbd | |
parent | 8bb745325d12dd7bd91f8af832e707c74a368d9c (diff) | |
download | spack-7411347a2958167f61682b24c5a314e4645ac821.tar.gz spack-7411347a2958167f61682b24c5a314e4645ac821.tar.bz2 spack-7411347a2958167f61682b24c5a314e4645ac821.tar.xz spack-7411347a2958167f61682b24c5a314e4645ac821.zip |
tests: Test install of unconcretized spec (#12099)
-rw-r--r-- | lib/spack/spack/test/install.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/spack/spack/test/install.py b/lib/spack/spack/test/install.py index 296322b7ed..e8467490fb 100644 --- a/lib/spack/spack/test/install.py +++ b/lib/spack/spack/test/install.py @@ -383,3 +383,20 @@ def test_pkg_install_log(install_mockery): # Cleanup shutil.rmtree(log_dir) + + +def test_unconcretized_install(install_mockery, mock_fetch, mock_packages): + """Test attempts to perform install phases with unconcretized spec.""" + spec = Spec('trivial-install-test-package') + + with pytest.raises(ValueError, match="only install concrete packages"): + spec.package.do_install() + + with pytest.raises(ValueError, match="fetch concrete packages"): + spec.package.do_fetch() + + with pytest.raises(ValueError, match="stage concrete packages"): + spec.package.do_stage() + + with pytest.raises(ValueError, match="patch concrete packages"): + spec.package.do_patch() |