summaryrefslogtreecommitdiff
path: root/tests/futility/test_update.sh
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-09-28 19:41:57 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-02 09:17:11 -0700
commitb95aa03f38d2073e68968145c99a216e4d45084f (patch)
tree03fc1617651ba3ed01999cd750579107cc5da1f0 /tests/futility/test_update.sh
parentbbe5fda1e8f35bd242ba2e2766a110bada4389e4 (diff)
downloadvboot-b95aa03f38d2073e68968145c99a216e4d45084f.tar.gz
futility: updater: Revise verbosity and error messages
`futility` used to print debug messages to stdout, but there is a side effect that stdout may be buffered and then flush later than stderr. For example, when calling futility via ssh, we will see flashrom messages before any of futility's own messages. Also, many people want to get flashrom verbose messages (-V). With this change, when calling ERROR and DEBUG, we will always output to stderr. This also enables better parameter type checking. `-d` and `-v` both contribute to verbosity, that will be converted to -V's when calling flashrom. BUG=chromium:875551 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I1d22a8054fc43cdc5e6c7415e131cc9826fbff0c Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1251145
Diffstat (limited to 'tests/futility/test_update.sh')
-rwxr-xr-xtests/futility/test_update.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index 655d17dc..b7f0e738 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -8,7 +8,7 @@ TMP="$me.tmp"
# Test --sys_props (primitive test needed for future updating tests).
test_sys_props() {
- ! "${FUTILITY}" --debug update --sys_props "$*" |
+ ! "${FUTILITY}" --debug update --sys_props "$*" 2>&1 |
sed -n 's/.*property\[\(.*\)].value = \(.*\)/\1,\2,/p' |
tr '\n' ' '
}
@@ -20,7 +20,7 @@ test "$(test_sys_props " 1,, 2")" = "0,1, 2,2, "
test "$(test_sys_props " , 4,")" = "1,4, "
test_quirks() {
- ! "${FUTILITY}" --debug update --quirks "$*" |
+ ! "${FUTILITY}" --debug update --quirks "$*" 2>&1 |
sed -n 's/.*Set quirk \(.*\) to \(.*\)./\1,\2/p' |
tr '\n' ' '
}