Merge branch 'wip/smcv/tests-verbose' into 'cogl-1.22'

[1.22] tests: Show the actual output from tests if VERBOSE is set

See merge request GNOME/cogl!14
This commit is contained in:
Emmanuele Bassi 2020-03-10 16:03:42 +00:00
commit ae96a47cc5
1 changed files with 8 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -o pipefail
if test -z "$G_DEBUG"; then
G_DEBUG=fatal-warnings
else
@ -64,7 +66,12 @@ get_status()
run_test()
{
$($TEST_BINARY $1 &> "$LOG")
if [ -n "${VERBOSE-}" ]; then
echo "running $TEST_BINARY $1:"
$TEST_BINARY $1 2>&1 | tee "$LOG"
else
$($TEST_BINARY $1 &> "$LOG")
fi
TMP=$?
var_name=$2_result
eval $var_name=$TMP