summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2016-10-24 09:44:31 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-11-01 10:26:32 -0700
commit754ebdb8c39e693a1979e1f1089c3376390d9aa7 (patch)
tree74797298b5e1876e61b9912fa79074b56071ca9c
parent5a9f498182586f64865b51c874619d674f5d842c (diff)
downloadvboot-754ebdb8c39e693a1979e1f1089c3376390d9aa7.tar.gz
Output stderr when run_test_scripts.sh fail
This change makes run_test_scripts.sh dump stderr to the terminal so that the failed test can be debugged. This is necessary to analyze a failing test on build servers. BUG=none BRANCH=none TEST=sudo FEATURES=test emerge vboot_reference && FEATURES=test USE=minimal emerge-samus vboot_reference && make runtests Change-Id: Id9ae0fb174cfe382ec30a1175f54c0891543c46e Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/403428 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rwxr-xr-xtests/futility/run_test_scripts.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/futility/run_test_scripts.sh b/tests/futility/run_test_scripts.sh
index 0080819a..fe19f15b 100755
--- a/tests/futility/run_test_scripts.sh
+++ b/tests/futility/run_test_scripts.sh
@@ -70,23 +70,23 @@ exec 3>&1
echo "-- builtin --"
for i in $TESTS; do
- j=${i##*/}
-
- : $(( progs++ ))
-
- echo -n "$j ... "
- rm -rf "${OUTDIR}/$j."*
- rc=$("$i" "$FUTILITY" 1>"${OUTDIR}/$j.stdout" \
- 2>"${OUTDIR}/$j.stderr" || echo "$?")
- echo "${rc:-0}" > "${OUTDIR}/$j.return"
- if [ ! "$rc" ]; then
- green "passed"
- : $(( pass++ ))
- rm -f ${OUTDIR}/$j.{stdout,stderr,return}
- else
- red "failed"
- fi
-
+ j=${i##*/}
+
+ : $(( progs++ ))
+
+ echo -n "$j ... "
+ rm -rf "${OUTDIR}/$j."*
+ rc=$("$i" "$FUTILITY" 1>"${OUTDIR}/$j.stdout" \
+ 2>"${OUTDIR}/$j.stderr" || echo "$?")
+ echo "${rc:-0}" > "${OUTDIR}/$j.return"
+ if [ ! "$rc" ]; then
+ green "PASSED"
+ : $(( pass++ ))
+ rm -f ${OUTDIR}/$j.{stdout,stderr,return}
+ else
+ red "FAILED. Stdout is recorded in ${OUTDIR}/$j.stdout"
+ cat ${OUTDIR}/$j.stderr
+ fi
done
##############################################################################