Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: src/scripts/sync_build_test.sh

Issue 703001: Fix minor problem with autotest permissions (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 sync your checkout, build a Chromium OS image, and test it all 7 # Script to sync your checkout, build a Chromium OS image, and test it all
8 # with one command. Can also check out a new Chromium OS checkout and 8 # with one command. Can also check out a new Chromium OS checkout and
9 # perform a subset of the above operations. 9 # perform a subset of the above operations.
10 # 10 #
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 if [[ -e "autotest.tgz" || -e "autotest.tar.bz2" ]]; then 452 if [[ -e "autotest.tgz" || -e "autotest.tar.bz2" ]]; then
453 # pull in autotest 453 # pull in autotest
454 local dir="${FLAGS_chroot}/build/${FLAGS_board}/usr/local" 454 local dir="${FLAGS_chroot}/build/${FLAGS_board}/usr/local"
455 local tar_args="xzf" 455 local tar_args="xzf"
456 local tar_name="${dl_dir}/autotest.tgz" 456 local tar_name="${dl_dir}/autotest.tgz"
457 if [[ -e "autotest.tar.bz2" ]]; then 457 if [[ -e "autotest.tar.bz2" ]]; then
458 tar_args="xjf" 458 tar_args="xjf"
459 tar_name="${dl_dir}/autotest.tar.bz2" 459 tar_name="${dl_dir}/autotest.tar.bz2"
460 fi 460 fi
461 sudo rm -rf "${dir}/autotest" 461 sudo rm -rf "${dir}/autotest"
462 cd ${dir} 462 # Expand in temp directory as current user, then move it as
463 # root to keep local user ownership
464 run_phase "Unpacking buildbot autotest cross-compiled binaries" \
465 tar ${tar_args} "${tar_name}"
463 run_phase "Installing buildbot autotest cross-compiled binaries" \ 466 run_phase "Installing buildbot autotest cross-compiled binaries" \
464 sudo tar ${tar_args} "${tar_name}" 467 sudo mv autotest ${dir}
465 fi 468 fi
466 fi 469 fi
467 chdir_relative . 470 chdir_relative .
468 run_phase "Removing downloaded image" rm -rf "${dl_dir}" 471 run_phase "Removing downloaded image" rm -rf "${dl_dir}"
469 } 472 }
470 473
471 474
472 function main() { 475 function main() {
473 assert_outside_chroot 476 assert_outside_chroot
474 assert_not_root_user 477 assert_not_root_user
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 fi 587 fi
585 588
586 trap - EXIT 589 trap - EXIT
587 echo "Successfully used ${FLAGS_top} to:" 590 echo "Successfully used ${FLAGS_top} to:"
588 describe_steps 591 describe_steps
589 show_duration 592 show_duration
590 } 593 }
591 594
592 595
593 main $@ 596 main $@
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698