Do not report on packages installed from the cache (#12336)
Skip generating reports for any packages that were found in the binary cache.
This commit is contained in:
parent
7bb08b6ecb
commit
cef1e4e0b4
@ -493,6 +493,10 @@ def __init__(self, spec):
|
|||||||
# Allow custom staging paths for packages
|
# Allow custom staging paths for packages
|
||||||
self.path = None
|
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.
|
# Check versions in the versions dict.
|
||||||
for v in self.versions:
|
for v in self.versions:
|
||||||
assert (isinstance(v, Version))
|
assert (isinstance(v, Version))
|
||||||
@ -1420,6 +1424,7 @@ def try_install_from_binary_cache(self, explicit):
|
|||||||
binary_distribution.extract_tarball(
|
binary_distribution.extract_tarball(
|
||||||
binary_spec, tarball, allow_root=False,
|
binary_spec, tarball, allow_root=False,
|
||||||
unsigned=False, force=False)
|
unsigned=False, force=False)
|
||||||
|
self.installed_from_binary_cache = True
|
||||||
spack.store.db.add(
|
spack.store.db.add(
|
||||||
self.spec, spack.store.layout, explicit=explicit)
|
self.spec, spack.store.layout, explicit=explicit)
|
||||||
return True
|
return True
|
||||||
|
@ -126,7 +126,8 @@ def wrapper(pkg, *args, **kwargs):
|
|||||||
'id': pkg.spec.dag_hash(),
|
'id': pkg.spec.dag_hash(),
|
||||||
'elapsed_time': None,
|
'elapsed_time': None,
|
||||||
'result': None,
|
'result': None,
|
||||||
'message': None
|
'message': None,
|
||||||
|
'installed_from_binary_cache': False
|
||||||
}
|
}
|
||||||
|
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
@ -136,6 +137,8 @@ def wrapper(pkg, *args, **kwargs):
|
|||||||
value = do_install(pkg, *args, **kwargs)
|
value = do_install(pkg, *args, **kwargs)
|
||||||
package['result'] = 'success'
|
package['result'] = 'success'
|
||||||
package['stdout'] = fetch_package_log(pkg)
|
package['stdout'] = fetch_package_log(pkg)
|
||||||
|
package['installed_from_binary_cache'] = \
|
||||||
|
pkg.installed_from_binary_cache
|
||||||
if installed_on_entry:
|
if installed_on_entry:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -221,6 +221,12 @@ def build_report(self, directory_name, input_data):
|
|||||||
# do not explicitly include the package's name in the CDash build name.
|
# do not explicitly include the package's name in the CDash build name.
|
||||||
num_packages = 0
|
num_packages = 0
|
||||||
for spec in input_data['specs']:
|
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']:
|
for package in spec['packages']:
|
||||||
if 'stdout' in package:
|
if 'stdout' in package:
|
||||||
num_packages += 1
|
num_packages += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user