OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Script to archive build results. Used by the buildbots. | 7 # Script to archive build results. Used by the buildbots. |
8 | 8 |
9 # Load common constants. This should be the first executable line. | 9 # Load common constants. This should be the first executable line. |
10 # The path to common.sh should be relative to your script's location. | 10 # The path to common.sh should be relative to your script's location. |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ | 223 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ |
224 --output_tag "${HWQUAL_NAME}" | 224 --output_tag "${HWQUAL_NAME}" |
225 gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \ | 225 gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \ |
226 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" | 226 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" |
227 fi | 227 fi |
228 | 228 |
229 gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}" | 229 gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}" |
230 | 230 |
231 if [ $FLAGS_archive_debug -eq $FLAGS_TRUE ] | 231 if [ $FLAGS_archive_debug -eq $FLAGS_TRUE ] |
232 then | 232 then |
| 233 echo "Generating Breakpad symbols" |
| 234 ! ${SCRIPTS_DIR}/cros_generate_breakpad_symbols --board=${FLAGS_board} |
233 echo "Creating debug archive" | 235 echo "Creating debug archive" |
234 pushd "${FLAGS_chroot}/build/${FLAGS_board}/usr/lib" | 236 pushd "${FLAGS_chroot}/build/${FLAGS_board}/usr/lib" |
235 sudo tar czf "${OUTDIR}/debug.tgz" --checkpoint=1000 --exclude\ | 237 sudo tar czf "${OUTDIR}/debug.tgz" --checkpoint=1000 --exclude\ |
236 debug/usr/local/autotest --exclude debug/tests debug | 238 debug/usr/local/autotest --exclude debug/tests debug |
237 CMD="chown \${SUDO_UID}:\${SUDO_GID} ${OUTDIR}/debug.tgz" | 239 CMD="chown \${SUDO_UID}:\${SUDO_GID} ${OUTDIR}/debug.tgz" |
238 sudo sh -c "${CMD}" | 240 sudo sh -c "${CMD}" |
239 popd | 241 popd |
240 gsutil_archive "${OUTDIR}/debug.tgz" "${LAST_CHANGE}/debug.tgz" | 242 gsutil_archive "${OUTDIR}/debug.tgz" "${LAST_CHANGE}/debug.tgz" |
241 fi | 243 fi |
242 | 244 |
243 if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \ | 245 if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \ |
244 [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ] | 246 [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ] |
245 then | 247 then |
246 gsutil_archive "${FACTORY_ZIPFILE}" \ | 248 gsutil_archive "${FACTORY_ZIPFILE}" \ |
247 "${LAST_CHANGE}/factory_${FLAGS_zipname}" | 249 "${LAST_CHANGE}/factory_${FLAGS_zipname}" |
248 fi | 250 fi |
249 gsutil_archive "${FLAGS_to}/LATEST" "LATEST" | 251 gsutil_archive "${FLAGS_to}/LATEST" "LATEST" |
250 | 252 |
251 # Purge old builds if necessary | 253 # Purge old builds if necessary |
252 if [ $FLAGS_keep_max -gt 0 ] | 254 if [ $FLAGS_keep_max -gt 0 ] |
253 then | 255 then |
254 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 256 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
255 cd "$FLAGS_to" | 257 cd "$FLAGS_to" |
256 # +2 because line numbers start at 1 and need to skip LATEST file | 258 # +2 because line numbers start at 1 and need to skip LATEST file |
257 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 259 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
258 cd - | 260 cd - |
259 fi | 261 fi |
260 | 262 |
261 echo "Done." | 263 echo "Done." |
OLD | NEW |