Commit 87e2f0de authored by Emanuele Aina's avatar Emanuele Aina

run-test-in-systemd: Print colorized status line at the end

Having a standard status line at the end of the test is extremely valuable
for manual runs, as it provides a clear, unambiguous, consistent indicator
to the tester.

Add it to `run-test-in-systemd` so it can be used to wrap manual tests just
like it wraps automated tests in LAVA.

 foobar: test failed (exit=1)
 foobar: test succeeded
Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 7e47956d
......@@ -323,6 +323,17 @@ fi
${as_target_user} rm -f "${filename}.tmp"
${as_target_user} rm -f "${filename}"
txtred=$(tput setaf 1)
txtgreen=$(tput setaf 2)
txtreset=$(tput sgr0)
echo ""
if [ "${exit_status}" = 0 ]; then
echo "${txtgreen}${txtreset} ${name}: test succeeded"
else
echo "${txtred}${txtreset} ${name}: test failed (exit=${exit_status})"
fi
if [ -n "${use_exit_status}" ]; then
exit "${exit_status}"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment