Skip to content

Commit a0842fa

Browse files
committed
Remove code folding and raw log output
Code folds were interacting poorly with Travis and causing output to be lost. This was causing xcresult log output to be lost. Travis terminates jobs that exceed its maximum log output length, so showing raw log output could cause failing jobs to be killed for unrelated reasons.
1 parent 97b9c41 commit a0842fa

File tree

1 file changed

+2
-48
lines changed

1 file changed

+2
-48
lines changed

scripts/build.sh

Lines changed: 2 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@ function RunXcodebuild() {
125125
fi
126126

127127
if [[ $result != 0 ]]; then
128-
echo "xcodebuild exited with $result; raw log follows" 1>&2
129-
#OpenFold Raw log
130-
cat xcodebuild.log
131-
#CloseFold
128+
echo "xcodebuild exited with $result" 1>&2
132129

133130
ExportLogs "$@"
134131
return $result
@@ -137,50 +134,7 @@ function RunXcodebuild() {
137134

138135
# Exports any logs output captured in the xcresult
139136
function ExportLogs() {
140-
#OpenFold XCResult
141-
142-
exporter="${scripts_dir}/xcresult_logs.py"
143-
python "$exporter" "$@"
144-
145-
#CloseFold
146-
}
147-
148-
current_group=none
149-
current_fold=0
150-
151-
# Prints a command for CI environments to group log output in the logs
152-
# presentation UI.
153-
function OpenFold() {
154-
description="$*"
155-
current_group="$(echo "$description" | tr '[A-Z] ' '[a-z]_')"
156-
157-
if [[ -n "${GITHUB_ACTIONS:-}" ]]; then
158-
echo "::group::description"
159-
160-
elif [[ -n "${TRAVIS:-}" ]]; then
161-
# Travis wants groups to be numbered.
162-
current_group="${current_group}.${current_fold}"
163-
let current_fold++
164-
165-
# Show description in yellow.
166-
echo "travis_fold:start:${current_group}\033[33;1m${description}\033[0m"
167-
168-
else
169-
echo "===== $description Start ====="
170-
fi
171-
}
172-
173-
# Closes the current fold opened by `OpenFold`.
174-
function CloseFold() {
175-
if [[ -n "${GITHUB_ACTIONS:-}" ]]; then
176-
echo "::endgroup::"
177-
178-
elif [[ -n "${TRAVIS:-}" ]]; then
179-
echo "travis_fold:end:${current_group}"
180-
181-
else
182-
echo "===== $description End ====="
183-
fi
137+
python "${scripts_dir}/xcresult_logs.py" "$@"
184138
}
185139

186140
if [[ "$xcode_major" -lt 11 ]]; then

0 commit comments

Comments
 (0)