mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 09:00:42 -05:00
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. Also write the test name first of running it. https://gitlab.gnome.org/GNOME/mutter/merge_requests/442
This commit is contained in:
parent
63c40a9711
commit
81ae886dda
@ -124,6 +124,7 @@ foreach test_target: cogl_conformance_tests
|
|||||||
test_name = '-'.join(name_parts)
|
test_name = '-'.join(name_parts)
|
||||||
test(test_name, cogl_run_tests,
|
test(test_name, cogl_run_tests,
|
||||||
suite: ['cogl', 'cogl/conform'],
|
suite: ['cogl', 'cogl/conform'],
|
||||||
|
env: ['RUN_TESTS_QUIET=1'],
|
||||||
args: [
|
args: [
|
||||||
cogl_config_env,
|
cogl_config_env,
|
||||||
libmutter_cogl_test_conformance,
|
libmutter_cogl_test_conformance,
|
||||||
|
@ -32,13 +32,15 @@ EXIT=0
|
|||||||
MISSING_FEATURE="WARNING: Missing required feature";
|
MISSING_FEATURE="WARNING: Missing required feature";
|
||||||
KNOWN_FAILURE="WARNING: Test is known to fail";
|
KNOWN_FAILURE="WARNING: Test is known to fail";
|
||||||
|
|
||||||
echo "Key:"
|
if [ -z "$RUN_TESTS_QUIET" ]; then
|
||||||
echo "ok = Test passed"
|
echo "Key:"
|
||||||
echo "n/a = Driver is missing a feature required for the test"
|
echo "ok = Test passed"
|
||||||
echo "FAIL = Unexpected failure"
|
echo "n/a = Driver is missing a feature required for the test"
|
||||||
echo "FIXME = Test failed, but it was an expected failure"
|
echo "FAIL = Unexpected failure"
|
||||||
echo "PASS! = Unexpected pass"
|
echo "FIXME = Test failed, but it was an expected failure"
|
||||||
echo ""
|
echo "PASS! = Unexpected pass"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
get_status()
|
get_status()
|
||||||
{
|
{
|
||||||
@ -88,6 +90,11 @@ run_test()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [ -z "$UNIT_TESTS" ]; then
|
||||||
|
echo Missing unit-tests file or names
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
TITLE_FORMAT="%35s"
|
TITLE_FORMAT="%35s"
|
||||||
printf "$TITLE_FORMAT" "Test"
|
printf "$TITLE_FORMAT" "Test"
|
||||||
|
|
||||||
@ -101,19 +108,18 @@ if test "$HAVE_GLES2" -eq 1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ""
|
|
||||||
|
|
||||||
if [ -z "$UNIT_TESTS" ]; then
|
|
||||||
echo Missing unit-tests file or names
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f "$UNIT_TESTS" ]; then
|
if [ -f "$UNIT_TESTS" ]; then
|
||||||
UNIT_TESTS="$(cat $UNIT_TESTS)"
|
UNIT_TESTS="$(cat $UNIT_TESTS)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$RUN_TESTS_QUIET" ] || [ "$(echo "$UNIT_TESTS" | wc -w )" -gt 1 ]; then
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
for test in $UNIT_TESTS
|
for test in $UNIT_TESTS
|
||||||
do
|
do
|
||||||
|
printf $TITLE_FORMAT "$test:"
|
||||||
export COGL_DEBUG=
|
export COGL_DEBUG=
|
||||||
|
|
||||||
if test "$HAVE_GL" -eq 1; then
|
if test "$HAVE_GL" -eq 1; then
|
||||||
@ -139,7 +145,6 @@ do
|
|||||||
run_test "$test" gles2
|
run_test "$test" gles2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf $TITLE_FORMAT "$test:"
|
|
||||||
if test "$HAVE_GL" -eq 1; then
|
if test "$HAVE_GL" -eq 1; then
|
||||||
printf "$GL_FORMAT" \
|
printf "$GL_FORMAT" \
|
||||||
"$(get_status "$gl_glsl_result")" \
|
"$(get_status "$gl_glsl_result")" \
|
||||||
|
@ -32,6 +32,7 @@ foreach test_target: cogl_unit_tests
|
|||||||
test_name = '-'.join(test_target.split('_'))
|
test_name = '-'.join(test_target.split('_'))
|
||||||
test(test_name, cogl_run_tests,
|
test(test_name, cogl_run_tests,
|
||||||
suite: ['cogl', 'cogl/unit'],
|
suite: ['cogl', 'cogl/unit'],
|
||||||
|
env: ['RUN_TESTS_QUIET=1'],
|
||||||
args: [
|
args: [
|
||||||
cogl_config_env,
|
cogl_config_env,
|
||||||
libmutter_cogl_test_unit,
|
libmutter_cogl_test_unit,
|
||||||
|
Loading…
Reference in New Issue
Block a user