Commit af269b2f authored by Marco Trevisan's avatar Marco Trevisan 🎺

cogl/tests: Use less verbose run-tests.sh on single tests run by meson

Use less verbose output when run-tests.sh is running only a test and we're
requested for less verbose output.

GNOME/mutter!442
parent 67940807
Pipeline #73228 failed with stages
in 3 minutes and 34 seconds
......@@ -128,6 +128,7 @@ foreach test_target: cogl_conformance_tests
test_name = '-'.join(name_parts)
test(test_name, cogl_run_tests,
suite: ['cogl', 'cogl/conform'],
env: ['RUN_TESTS_QUIET=1'],
args: [
cogl_config_env,
libmutter_cogl_test_conformance,
......
......@@ -32,13 +32,15 @@ EXIT=0
MISSING_FEATURE="WARNING: Missing required feature";
KNOWN_FAILURE="WARNING: Test is known to fail";
echo "Key:"
echo "ok = Test passed"
echo "n/a = Driver is missing a feature required for the test"
echo "FAIL = Unexpected failure"
echo "FIXME = Test failed, but it was an expected failure"
echo "PASS! = Unexpected pass"
echo ""
if [ -z "$RUN_TESTS_QUIET" ]; then
echo "Key:"
echo "ok = Test passed"
echo "n/a = Driver is missing a feature required for the test"
echo "FAIL = Unexpected failure"
echo "FIXME = Test failed, but it was an expected failure"
echo "PASS! = Unexpected pass"
echo ""
fi
get_status()
{
......@@ -88,6 +90,11 @@ run_test()
fi
}
if [ -z "$UNIT_TESTS" ]; then
echo Missing unit-tests file or names
exit 1
fi
TITLE_FORMAT="%35s"
printf "$TITLE_FORMAT" "Test"
......@@ -100,18 +107,18 @@ if test "$HAVE_GLES2" -eq 1; then
printf "$GLES2_FORMAT" "ES2" "ES2-NPT"
fi
echo ""
echo ""
if [ -z "$UNIT_TESTS" ]; then
echo Missing unit-tests file or names
exit 1
fi
if [ -f "$UNIT_TESTS" ]; then
UNIT_TESTS="$(cat $UNIT_TESTS)"
fi
if [ -n "$RUN_TESTS_QUIET" ] && [ "$(echo "$UNIT_TESTS" | wc -w )" -eq 1 ]; then
SINGLE_TEST=true
else
echo ""
fi
for test in $UNIT_TESTS
do
export COGL_DEBUG=
......@@ -147,7 +154,8 @@ do
run_test "$test" gles2_npot
fi
printf $TITLE_FORMAT "$test:"
printf $TITLE_FORMAT
[ "$SINGLE_TEST" != true ] && printf "$test:"
if test "$HAVE_GL" -eq 1; then
printf "$GL_FORMAT" \
"$(get_status "$gl_glsl_result")" \
......
......@@ -32,6 +32,7 @@ foreach test_target: cogl_unit_tests
test_name = '-'.join(test_target.split('_'))
test(test_name, cogl_run_tests,
suite: ['cogl', 'cogl/unit'],
env: ['RUN_TESTS_QUIET=1'],
args: [
cogl_config_env,
libmutter_cogl_test_unit,
......
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