summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZack Galbreath <zack.galbreath@kitware.com>2019-08-16 13:19:11 -0400
committerTodd Gamblin <tgamblin@llnl.gov>2019-08-16 10:19:11 -0700
commitcef1e4e0b4427afbc3bf1be0b4d28081011fb493 (patch)
tree500ef353af0e8cc51c04abced9e5772115d95e0f /lib
parent7bb08b6ecbbefdfb772125f756ae6d26b949d764 (diff)
downloadspack-cef1e4e0b4427afbc3bf1be0b4d28081011fb493.tar.gz
spack-cef1e4e0b4427afbc3bf1be0b4d28081011fb493.tar.bz2
spack-cef1e4e0b4427afbc3bf1be0b4d28081011fb493.tar.xz
spack-cef1e4e0b4427afbc3bf1be0b4d28081011fb493.zip
Do not report on packages installed from the cache (#12336)
Skip generating reports for any packages that were found in the binary cache.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/package.py5
-rw-r--r--lib/spack/spack/report.py5
-rw-r--r--lib/spack/spack/reporters/cdash.py6
3 files changed, 15 insertions, 1 deletions
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 58f6c3b2e9..07d2c28679 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -493,6 +493,10 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
# Allow custom staging paths for packages
self.path = None
+ # Keep track of whether or not this package was installed from
+ # a binary cache.
+ self.installed_from_binary_cache = False
+
# Check versions in the versions dict.
for v in self.versions:
assert (isinstance(v, Version))
@@ -1420,6 +1424,7 @@ class PackageBase(with_metaclass(PackageMeta, PackageViewMixin, object)):
binary_distribution.extract_tarball(
binary_spec, tarball, allow_root=False,
unsigned=False, force=False)
+ self.installed_from_binary_cache = True
spack.store.db.add(
self.spec, spack.store.layout, explicit=explicit)
return True
diff --git a/lib/spack/spack/report.py b/lib/spack/spack/report.py
index 1214238ec7..292eeffd8c 100644
--- a/lib/spack/spack/report.py
+++ b/lib/spack/spack/report.py
@@ -126,7 +126,8 @@ class InfoCollector(object):
'id': pkg.spec.dag_hash(),
'elapsed_time': None,
'result': None,
- 'message': None
+ 'message': None,
+ 'installed_from_binary_cache': False
}
start_time = time.time()
@@ -136,6 +137,8 @@ class InfoCollector(object):
value = do_install(pkg, *args, **kwargs)
package['result'] = 'success'
package['stdout'] = fetch_package_log(pkg)
+ package['installed_from_binary_cache'] = \
+ pkg.installed_from_binary_cache
if installed_on_entry:
return
diff --git a/lib/spack/spack/reporters/cdash.py b/lib/spack/spack/reporters/cdash.py
index d69ec435d7..58095b10ba 100644
--- a/lib/spack/spack/reporters/cdash.py
+++ b/lib/spack/spack/reporters/cdash.py
@@ -221,6 +221,12 @@ class CDash(Reporter):
# do not explicitly include the package's name in the CDash build name.
num_packages = 0
for spec in input_data['specs']:
+ # Do not generate reports for packages that were installed
+ # from the binary cache.
+ spec['packages'] = [
+ x for x in spec['packages']
+ if not x['installed_from_binary_cache']
+ ]
for package in spec['packages']:
if 'stdout' in package:
num_packages += 1