File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,16 +176,23 @@ jobs:
176176 fi
177177 python3 - "$RUN_DIR/results.json" \
178178 '${{ steps.source.outcome }}' '${{ steps.build.outcome }}' \
179- '${{ steps.measure.outcome }}' "$RUN_DIR/measure-error.txt" <<'PY'
179+ '${{ steps.measure.outcome }}' "$RUN_DIR/measure-error.txt" \
180+ "$RUN_DIR/measure.log" <<'PY'
180181 import json
181182 import sys
182183 from pathlib import Path
183184
184185 output = Path(sys.argv[1])
185186 source, build, measure = sys.argv[2:5]
186187 error_path = Path(sys.argv[5])
188+ log_path = Path(sys.argv[6])
187189 available = source == "success" and build == "success"
188- error = error_path.read_text().strip() if error_path.is_file() else "none"
190+ if error_path.is_file():
191+ error = error_path.read_text().strip()
192+ elif log_path.is_file():
193+ error = log_path.read_text(errors="replace").strip()[-1000:]
194+ else:
195+ error = "none"
189196 output.write_text(
190197 json.dumps(
191198 {
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ def test_fastlanes_retry_workflow_preserves_build_and_measurement_logs() -> None
3232 assert '"$RUN_DIR/measure.log"' in workflow
3333 assert '"$RUN_DIR/measure-error.txt"' in workflow
3434 assert '"$RUN_DIR/measure-status.txt"' in workflow
35+ assert '"$RUN_DIR/measure.log" <<\' PY\' ' in workflow
3536 assert "steps.measure.outcome" in workflow
3637 assert '"status": "UNSUPPORTED" if not available else "FAILED"' in workflow
3738 assert "case_hash_algorithm" in workflow
You can’t perform that action at this time.
0 commit comments