diff options
author | Bill Richardson <wfrichar@chromium.org> | 2013-03-07 12:54:29 -0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-03-11 08:38:46 -0700 |
commit | feb2518166b1cd181e607c611cbb610f0c7300da (patch) | |
tree | 33a22857fad5a1f2246caf064b3b4eec8867e00f /futility/tests/common.sh | |
parent | 5fed2a667096341160db8643a4a057e328953a1d (diff) | |
download | vboot-firmware-spring-3833.B.tar.gz |
Wrap all vboot utilities with futility.firmware-spring-3833.Bfactory-spring-3842.B
This moves all the old userspace utilities generated by vboot_reference into
a subdirectory not in $PATH, and replaces them with symlinks to a single
executable named 'futility'. At the moment that utility just execs the
original utilities (optionally logging that fact first).
Ultimately, the old utilities will be subsumed into a single binary instead
of multiple separate executables.
There is a matching CL needed to make the recovery image creation work.
BUG=chromium-os:37062
BRANCH=none
CQ-DEPEND=CL:44864
TEST=auto
To test, build everything, test everything. It should work as before in all
cases. I have built normal images, test images, factory installers, recovery
images; they all seem to work.
I've run trybots on daisy-paladin link-paladin lumpy-paladin and alex-paladin.
Change-Id: Ie93db676f2ed2a64e4b13b3b5dc6b65a77db0f8c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/44871
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'futility/tests/common.sh')
-rwxr-xr-x | futility/tests/common.sh | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/futility/tests/common.sh b/futility/tests/common.sh new file mode 100755 index 00000000..ed187d7b --- /dev/null +++ b/futility/tests/common.sh @@ -0,0 +1,47 @@ +#!/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 +} |