tests/cogl/conform: Skip known failing tests parts in undefined mode
When running the tests in non-undefined mode we should skip the known failing tests instead of the whole suite, so mark them as such so that we can still run the tests partially checking the things that still work, avoiding to regress on them too. We also run the tests in normal mode so that we can ensure that the failures are still happening in that way. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
This commit is contained in:
parent
ed35ff72e0
commit
615fe1e703
@ -95,7 +95,15 @@ foreach cogl_test: cogl_tests
|
||||
suite: ['cogl', 'cogl/conform'],
|
||||
env: variant_test_env,
|
||||
is_parallel: false,
|
||||
should_fail: variant in known_failures,
|
||||
)
|
||||
|
||||
if variant in known_failures
|
||||
test('-'.join([test_name, 'should-fail', variant]), test_executable,
|
||||
suite: ['cogl', 'cogl/conform', 'failing'],
|
||||
env: variant_test_env,
|
||||
is_parallel: false,
|
||||
should_fail: true,
|
||||
)
|
||||
endif
|
||||
endforeach
|
||||
endforeach
|
||||
|
@ -138,26 +138,34 @@ do_test (gboolean check_orientation,
|
||||
g_object_unref (pipeline);
|
||||
g_object_unref (tex_2d);
|
||||
|
||||
test_utils_check_pixel (test_fb,
|
||||
POINT_SIZE - POINT_SIZE / 4,
|
||||
POINT_SIZE - POINT_SIZE / 4,
|
||||
0x0000ffff);
|
||||
test_utils_check_pixel (test_fb,
|
||||
POINT_SIZE + POINT_SIZE / 4,
|
||||
POINT_SIZE - POINT_SIZE / 4,
|
||||
0x00ff00ff);
|
||||
test_utils_check_pixel (test_fb,
|
||||
POINT_SIZE - POINT_SIZE / 4,
|
||||
POINT_SIZE + POINT_SIZE / 4,
|
||||
check_orientation ?
|
||||
0x00ffffff :
|
||||
0x0000ffff);
|
||||
test_utils_check_pixel (test_fb,
|
||||
POINT_SIZE + POINT_SIZE / 4,
|
||||
POINT_SIZE + POINT_SIZE / 4,
|
||||
check_orientation ?
|
||||
0xff0000ff :
|
||||
0x00ff00ff);
|
||||
if (!g_test_undefined ())
|
||||
{
|
||||
/* This test case is always considered failing */
|
||||
g_test_skip_printf ("This test is a well known failure");
|
||||
}
|
||||
else
|
||||
{
|
||||
test_utils_check_pixel (test_fb,
|
||||
POINT_SIZE - POINT_SIZE / 4,
|
||||
POINT_SIZE - POINT_SIZE / 4,
|
||||
0x0000ffff);
|
||||
test_utils_check_pixel (test_fb,
|
||||
POINT_SIZE + POINT_SIZE / 4,
|
||||
POINT_SIZE - POINT_SIZE / 4,
|
||||
0x00ff00ff);
|
||||
test_utils_check_pixel (test_fb,
|
||||
POINT_SIZE - POINT_SIZE / 4,
|
||||
POINT_SIZE + POINT_SIZE / 4,
|
||||
check_orientation ?
|
||||
0x00ffffff :
|
||||
0x0000ffff);
|
||||
test_utils_check_pixel (test_fb,
|
||||
POINT_SIZE + POINT_SIZE / 4,
|
||||
POINT_SIZE + POINT_SIZE / 4,
|
||||
check_orientation ?
|
||||
0xff0000ff :
|
||||
0x00ff00ff);
|
||||
}
|
||||
|
||||
/* When rendering without the point sprites all of the texture
|
||||
coordinates should be 0,0 so it should get the top-left texel
|
||||
|
@ -187,8 +187,8 @@ test_read_int_case (gconstpointer data)
|
||||
const TestFormatArgs *args = data;
|
||||
g_autoptr (CoglTexture) tex_2d = NULL;
|
||||
uint32_t received_value;
|
||||
char *received_value_str;
|
||||
char *expected_value_str;
|
||||
g_autofree char *received_value_str = NULL;
|
||||
g_autofree char *expected_value_str = NULL;
|
||||
|
||||
tex_2d = g_steal_pointer ((CoglTexture **) &args->tex_2d);
|
||||
|
||||
@ -199,10 +199,17 @@ test_read_int_case (gconstpointer data)
|
||||
|
||||
received_value_str = g_strdup_printf ("0x%08x", received_value);
|
||||
expected_value_str = g_strdup_printf ("0x%08x", args->expected_value);
|
||||
g_assert_cmpstr (received_value_str, ==, expected_value_str);
|
||||
|
||||
g_free (received_value_str);
|
||||
g_free (expected_value_str);
|
||||
if (!g_test_undefined ())
|
||||
{
|
||||
/* This test case is always considered failing */
|
||||
g_test_skip_printf ("This test is a well known failure, "
|
||||
"expected: '%s', actual: '%s'",
|
||||
expected_value_str, received_value_str);
|
||||
return;
|
||||
}
|
||||
|
||||
g_assert_cmpstr (received_value_str, ==, expected_value_str);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user