libtest: On failure, make it clearer what has happened
authorSimon McVittie <smcv@collabora.com>
Sun, 18 Apr 2021 11:16:45 +0000 (12:16 +0100)
committerSimon McVittie <smcv@collabora.com>
Sun, 18 Apr 2021 11:17:00 +0000 (12:17 +0100)
commit9d48d39a4b16c4faa58488107cd0a53c8144a7ca
tree8f57d41927dcdc9f28db5146e8a38c9035088760
parente4d42be31fee387a9855bea4740f0e8579730bb8
libtest: On failure, make it clearer what has happened

If we fail as a result of `set -x`, It's often not completely obvious
which command failed or how. Use a trap on ERR to show the command that
failed, and its exit status.

Signed-off-by: Simon McVittie <smcv@collabora.com>
tests/libtest.sh