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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 if [ $FLAGS_test_mod -eq $FLAGS_TRUE -a $FLAGS_official_build -eq $FLAGS_TRUE ] | 258 if [ $FLAGS_test_mod -eq $FLAGS_TRUE -a $FLAGS_official_build -eq $FLAGS_TRUE ] |
259 then | 259 then |
260 echo "Creating hwqual archive" | 260 echo "Creating hwqual archive" |
261 HWQUAL_NAME="chromeos-hwqual-${FLAGS_board}-${CHROMEOS_VERSION_STRING}" | 261 HWQUAL_NAME="chromeos-hwqual-${FLAGS_board}-${CHROMEOS_VERSION_STRING}" |
262 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ | 262 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ |
263 --output_tag "${HWQUAL_NAME}" | 263 --output_tag "${HWQUAL_NAME}" |
264 gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \ | 264 gsutil_archive "${OUTDIR}/${HWQUAL_NAME}.tar.bz2" \ |
265 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" | 265 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" |
266 fi | 266 fi |
267 | 267 |
| 268 # Construct prebuilt upload command. |
| 269 # This will upload prebuilt packages to Google Storage. |
| 270 prebuilt_cmd="${SCRIPTS_DIR}/prebuilt.py" |
| 271 prebuilt_cmd="$prebuilt_cmd -u gs://chromeos-prebuilt --git-sync -V master" |
| 272 prebuilt_cmd="$prebuilt_cmd -p $(readlink -f ../..) -b ${FLAGS_board}" |
| 273 |
| 274 if [ "${FLAGS_BOARD}" == "x86-generic" ] |
| 275 then |
| 276 prebuilt_cmd="$prebuilt_cmd --sync-host" |
| 277 fi |
| 278 |
| 279 echo "Running $prebuilt_cmd" |
| 280 $prebuilt_cmd |
| 281 |
268 gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}" | 282 gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}" |
269 | 283 |
270 if [ $FLAGS_archive_debug -eq $FLAGS_TRUE ] | 284 if [ $FLAGS_archive_debug -eq $FLAGS_TRUE ] |
271 then | 285 then |
272 echo "Generating Breakpad symbols" | 286 echo "Generating Breakpad symbols" |
273 ! ${SCRIPTS_DIR}/cros_generate_breakpad_symbols --board=${FLAGS_board} | 287 ! ${SCRIPTS_DIR}/cros_generate_breakpad_symbols --board=${FLAGS_board} |
274 echo "Creating debug archive" | 288 echo "Creating debug archive" |
275 pushd "${FLAGS_chroot}/build/${FLAGS_board}/usr/lib" | 289 pushd "${FLAGS_chroot}/build/${FLAGS_board}/usr/lib" |
276 sudo tar czf "${OUTDIR}/debug.tgz" --checkpoint=1000 --exclude\ | 290 sudo tar czf "${OUTDIR}/debug.tgz" --checkpoint=1000 --exclude\ |
277 debug/usr/local/autotest --exclude debug/tests debug | 291 debug/usr/local/autotest --exclude debug/tests debug |
(...skipping 15 matching lines...) Expand all Loading... |
293 if [ $FLAGS_keep_max -gt 0 ] | 307 if [ $FLAGS_keep_max -gt 0 ] |
294 then | 308 then |
295 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 309 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
296 cd "$FLAGS_to" | 310 cd "$FLAGS_to" |
297 # +2 because line numbers start at 1 and need to skip LATEST file | 311 # +2 because line numbers start at 1 and need to skip LATEST file |
298 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 312 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
299 cd - | 313 cd - |
300 fi | 314 fi |
301 | 315 |
302 echo "Done." | 316 echo "Done." |
OLD | NEW |