diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2019-09-02 18:00:22 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2019-09-02 19:24:48 -0700 |
commit | da7fed86a825f6ffafd121505053f0b62e5f2155 (patch) | |
tree | 51d4adf83e0b34ebda9f562d0961b67a6561133a /var | |
parent | 1b877e8e0ff0a5457239272b757aadf961bfcc16 (diff) | |
download | spack-da7fed86a825f6ffafd121505053f0b62e5f2155.tar.gz spack-da7fed86a825f6ffafd121505053f0b62e5f2155.tar.bz2 spack-da7fed86a825f6ffafd121505053f0b62e5f2155.tar.xz spack-da7fed86a825f6ffafd121505053f0b62e5f2155.zip |
tests: add tests for `spack extensions` command
- add tests for `spack extensions`
- refactor `test_activations` test to use real extensions.
Diffstat (limited to 'var')
3 files changed, 4 insertions, 20 deletions
diff --git a/var/spack/repos/builtin.mock/packages/perl-extension/package.py b/var/spack/repos/builtin.mock/packages/perl-extension/package.py index d229e99080..18bd53e13d 100644 --- a/var/spack/repos/builtin.mock/packages/perl-extension/package.py +++ b/var/spack/repos/builtin.mock/packages/perl-extension/package.py @@ -15,14 +15,9 @@ class PerlExtension(PerlPackage): version('1.0', 'hash-extension-1.0') version('2.0', 'hash-extension-2.0') + extends("perl") + def install(self, spec, prefix): mkdirp(prefix.bin) with open(os.path.join(prefix.bin, 'perl-extension'), 'w+') as fout: fout.write(str(spec.version)) - - # Give the package a hook to set the extendee spec - extends_spec = 'perl' - - @property - def extendee_spec(self): - return self.extends_spec diff --git a/var/spack/repos/builtin.mock/packages/py-extension1/package.py b/var/spack/repos/builtin.mock/packages/py-extension1/package.py index a929415c2d..8bce48e9ce 100644 --- a/var/spack/repos/builtin.mock/packages/py-extension1/package.py +++ b/var/spack/repos/builtin.mock/packages/py-extension1/package.py @@ -20,9 +20,4 @@ class PyExtension1(PythonPackage): with open(os.path.join(prefix.bin, 'py-extension1'), 'w+') as fout: fout.write(str(spec.version)) - # Give the package a hook to set the extendee spec - extends_spec = 'python' - - @property - def extendee_spec(self): - return self.extends_spec + extends('python') diff --git a/var/spack/repos/builtin.mock/packages/py-extension2/package.py b/var/spack/repos/builtin.mock/packages/py-extension2/package.py index 326c73710f..d60608d9ea 100644 --- a/var/spack/repos/builtin.mock/packages/py-extension2/package.py +++ b/var/spack/repos/builtin.mock/packages/py-extension2/package.py @@ -13,6 +13,7 @@ class PyExtension2(PythonPackage): homepage = "http://www.example.com" url = "http://www.example.com/extension2-1.0.tar.gz" + extends("python") depends_on('py-extension1', type=('build', 'run')) version('1.0', 'hash-extension2-1.0') @@ -21,10 +22,3 @@ class PyExtension2(PythonPackage): mkdirp(prefix.bin) with open(os.path.join(prefix.bin, 'py-extension2'), 'w+') as fout: fout.write(str(spec.version)) - - # Give the package a hook to set the extendee spec - extends_spec = 'python' - - @property - def extendee_spec(self): - return self.extends_spec |