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

Side by Side Diff: common.sh

Issue 2837004: Check in to run unittests that uses src_test to build and run unittests. (Closed) Base URL: ssh://git@chromiumos-git//crosutils.git
Patch Set: Petkov Created 10 years, 6 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 | cros_run_unit_tests » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Common constants for build scripts 5 # Common constants for build scripts
6 # This must evaluate properly for both /bin/bash and /bin/sh 6 # This must evaluate properly for both /bin/bash and /bin/sh
7 7
8 # All scripts should die on error unless commands are specifically excepted 8 # All scripts should die on error unless commands are specifically excepted
9 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'. 9 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'.
10 # TODO: Re-enable this once shflags is less prone to dying. 10 # TODO: Re-enable this once shflags is less prone to dying.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 if [[ $# -gt 0 ]]; then 296 if [[ $# -gt 0 ]]; then
297 echo "error: invalid arguments: \"$@\"" >&2 297 echo "error: invalid arguments: \"$@\"" >&2
298 flags_help 298 flags_help
299 exit 1 299 exit 1
300 fi 300 fi
301 return $do_shift 301 return $do_shift
302 } 302 }
303 303
304 V_RED="\e[31m" 304 V_RED="\e[31m"
305 V_YELLOW="\e[33m" 305 V_YELLOW="\e[33m"
306 V_BOLD_GREEN="\e[1;32m"
306 V_BOLD_RED="\e[1;31m" 307 V_BOLD_RED="\e[1;31m"
307 V_BOLD_YELLOW="\e[1;33m" 308 V_BOLD_YELLOW="\e[1;33m"
308 309
310 function info {
311 echo -e "${V_BOLD_GREEN}INFO : $1${V_VIDOFF}"
312 }
313
309 function warn { 314 function warn {
310 echo -e "${V_BOLD_YELLOW}WARNING: $1${V_VIDOFF}" 315 echo -e "${V_BOLD_YELLOW}WARNING: $1${V_VIDOFF}"
311 } 316 }
312 317
313 function error { 318 function error {
314 echo -e "${V_BOLD_RED}ERROR : $1${V_VIDOFF}" 319 echo -e "${V_BOLD_RED}ERROR : $1${V_VIDOFF}"
315 } 320 }
316 321
317 function die { 322 function die {
318 error "$1" 323 error "$1"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 427
423 # Setup var symlink. 428 # Setup var symlink.
424 if [ -h "${dev_image_root}/var" ]; then 429 if [ -h "${dev_image_root}/var" ]; then
425 sudo unlink "${dev_image_root}/var" 430 sudo unlink "${dev_image_root}/var"
426 elif [ -e "${dev_image_root}/var" ]; then 431 elif [ -e "${dev_image_root}/var" ]; then
427 die "${dev_image_root}/var should be a symlink if it exists" 432 die "${dev_image_root}/var should be a symlink if it exists"
428 fi 433 fi
429 434
430 sudo ln -s "${var_target}" "${dev_image_root}/var" 435 sudo ln -s "${var_target}" "${dev_image_root}/var"
431 } 436 }
OLDNEW
« no previous file with comments | « no previous file | cros_run_unit_tests » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698