CI: Fix timing search paths to ignore bootstrap (#40677)
This commit is contained in:
		| @@ -25,7 +25,7 @@ ci: | |||||||
|       - - spack config blame mirrors |       - - 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 --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 |       - - 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 |           --log install_times.json | ||||||
|           ${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json |           ${SPACK_ARTIFACTS_ROOT}/user_data/install_times.json | ||||||
|       after_script: |       after_script: | ||||||
|   | |||||||
| @@ -28,9 +28,17 @@ def find_logs(prefix, filename): | |||||||
| 
 | 
 | ||||||
|     # Aggregate the install timers into a single json |     # Aggregate the install timers into a single json | ||||||
|     data = [] |     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: |     for prefix in prefixes: | ||||||
|         time_logs = find_logs(prefix, args.log) |         logs = find_logs(prefix, args.log) | ||||||
|         for log in time_logs: |         for log in logs: | ||||||
|             with open(log) as fd: |             with open(log) as fd: | ||||||
|                 data.append(json.load(fd)) |                 data.append(json.load(fd)) | ||||||
| 
 | 
 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 kwryankrattiger
					kwryankrattiger