summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwryankrattiger <80296582+kwryankrattiger@users.noreply.github.com>2023-12-28 18:24:37 -0600
committerGitHub <noreply@github.com>2023-12-28 16:24:37 -0800
commitd52fda6015a2bcd4bb9e34004599c6a26e3616d6 (patch)
treed4869a53e485cf81feba9b714e19c6269fbdc359
parent379eeda57673a07fa744c7fb63c630f5480f7412 (diff)
downloadspack-d52fda6015a2bcd4bb9e34004599c6a26e3616d6.tar.gz
spack-d52fda6015a2bcd4bb9e34004599c6a26e3616d6.tar.bz2
spack-d52fda6015a2bcd4bb9e34004599c6a26e3616d6.tar.xz
spack-d52fda6015a2bcd4bb9e34004599c6a26e3616d6.zip
CI: Fix timing search paths to ignore bootstrap (#40677)
-rw-r--r--share/spack/gitlab/cloud_pipelines/configs/ci.yaml2
-rw-r--r--share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py12
2 files changed, 11 insertions, 3 deletions
diff --git a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
index f1f77c20b0..c27065b3be 100644
--- a/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
+++ b/share/spack/gitlab/cloud_pipelines/configs/ci.yaml
@@ -25,7 +25,7 @@ ci:
- - spack config blame mirrors
- spack --color=always --backtrace ci rebuild --tests > >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_out.txt) 2> >(tee ${SPACK_ARTIFACTS_ROOT}/user_data/pipeline_err.txt >&2)
- - spack python ${CI_PROJECT_DIR}/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
- --prefix /home/software/spack:${CI_PROJECT_DIR}
+ --prefix /home/software/spack:${CI_PROJECT_DIR}/opt/spack
--log install_times.json
${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json
after_script:
diff --git a/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py b/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
index 9adab64e57..b785fc9fed 100644
--- a/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
+++ b/share/spack/gitlab/cloud_pipelines/scripts/common/aggregate_package_logs.spack.py
@@ -28,9 +28,17 @@ if __name__ == "__main__":
# Aggregate the install timers into a single json
data = []
+
+ # Look in the CWD for logs
+ local_log_path = os.path.join(os.path.getcwd(), args.log)
+ if os.path.exists(local_log_path):
+ with open(local_log_path) as fd:
+ data.append(json.load(fd))
+
+ # Look in the list of prefixes for logs
for prefix in prefixes:
- time_logs = find_logs(prefix, args.log)
- for log in time_logs:
+ logs = find_logs(prefix, args.log)
+ for log in logs:
with open(log) as fd:
data.append(json.load(fd))