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

Side by Side Diff: tests/common.sh

Issue 2719008: Nearly complete rewrite of cgpt tool. (Closed) Base URL: ssh://git@chromiumos-git//vboot_reference.git
Patch Set: 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 | « tests/cgptlib_test.c ('k') | tests/run_cgpt_tests.sh » ('j') | 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 # Determine script directory. 7 # Determine script directory.
8 if [[ $0 == '/'* ]]; 8 if [[ $0 == '/'* ]];
9 then 9 then
10 SCRIPT_DIR="`dirname $0`" 10 SCRIPT_DIR="`dirname $0`"
(...skipping 12 matching lines...) Expand all
23 # Color output encodings. 23 # Color output encodings.
24 COL_RED='\E[31;1m' 24 COL_RED='\E[31;1m'
25 COL_GREEN='\E[32;1m' 25 COL_GREEN='\E[32;1m'
26 COL_YELLOW='\E[33;1m' 26 COL_YELLOW='\E[33;1m'
27 COL_BLUE='\E[34;1m' 27 COL_BLUE='\E[34;1m'
28 COL_STOP='\E[0;m' 28 COL_STOP='\E[0;m'
29 29
30 hash_algos=( sha1 sha256 sha512 ) 30 hash_algos=( sha1 sha256 sha512 )
31 key_lengths=( 1024 2048 4096 8192 ) 31 key_lengths=( 1024 2048 4096 8192 )
32 32
33 function happy {
34 echo -e "${COL_GREEN}$*${COL_STOP}" 1>&2
35 }
36
37 function warning {
38 echo -e "${COL_YELLOW}WARNING: $*${COL_STOP}" 1>&2
39 }
40
41 function error {
42 echo -e "${COL_RED}ERROR: $*${COL_STOP}" 1>&2
43 exit 1
44 }
45
33 function check_test_keys { 46 function check_test_keys {
34 if [ ! -d ${TESTKEY_DIR} ] 47 [ -d ${TESTKEY_DIR} ] || \
35 then 48 error "You must run gen_test_keys.sh to generate test keys first."
36 echo "You must run gen_test_keys.sh to generate test keys first."
37 exit 1
38 fi
39 } 49 }
50
OLDNEW
« no previous file with comments | « tests/cgptlib_test.c ('k') | tests/run_cgpt_tests.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698