diff options
Diffstat (limited to 'tests/futility/common.sh')
-rwxr-xr-x | tests/futility/common.sh | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/futility/common.sh b/tests/futility/common.sh deleted file mode 100755 index ed187d7b..00000000 --- a/tests/futility/common.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Copyright (c) 2013 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Color output encodings. -COL_RED='\E[31;1m' -COL_GREEN='\E[32;1m' -COL_YELLOW='\E[33;1m' -COL_BLUE='\E[34;1m' -COL_STOP='\E[0;m' - -# args: [message] -green() { - echo -e "${COL_GREEN}$*${COL_STOP}" -} - -# args: [message] -yellow() { - echo -e "${COL_YELLOW}WARNING: $*${COL_STOP}" -} - -# args: [message] -red() { - echo -e "${COL_RED}$*${COL_STOP}" -} - -# args: [nested level] [message] -error() { - local lev=${1:-} - case "${1:-}" in - [0-9]*) - lev=$1 - shift - ;; - *) lev=0 - ;; - esac - local x=$(caller $lev) - local cline="${x%% *}" - local cfile="${x#* }" - cfile="${cfile##*/}" - local args="$*" - local spacer="${args:+: }" - red "at ${cfile}, line ${cline}${spacer}${args}" 1>&2 - exit 1 -} |