summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.com>2019-11-15 15:48:08 +0200
committerPekka Paalanen <pekka.paalanen@collabora.com>2019-11-22 12:53:29 +0200
commitdc9d3342a881f9be55a98b7dcdd85b5f96ea3c83 (patch)
treea1928114543353a3a5948a4191aa1bce91487864
parent2c73b673a7f3b882797a1412dec2cbbdb6cee1f5 (diff)
downloadweston-dc9d3342a881f9be55a98b7dcdd85b5f96ea3c83.tar.gz
weston-dc9d3342a881f9be55a98b7dcdd85b5f96ea3c83.tar.bz2
weston-dc9d3342a881f9be55a98b7dcdd85b5f96ea3c83.zip
tests/subsurface-shot: hardcode reference image names
Using the test name for the reference images will stop working when the new test harness starts using fixtures. Fixtures allow running the same tests in varying environments, so the test results file names will include fixture index. However the reference images will remain the same for all fixtures. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
-rw-r--r--tests/subsurface-shot-test.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/subsurface-shot-test.c b/tests/subsurface-shot-test.c
index e8bab676..a8bf53a3 100644
--- a/tests/subsurface-shot-test.c
+++ b/tests/subsurface-shot-test.c
@@ -176,7 +176,6 @@ surface_commit_color(struct client *client, struct wl_surface *surface,
TEST(subsurface_z_order)
{
- const char *test_name = get_test_name();
struct client *client;
struct wl_subcompositor *subco;
struct buffer *bufs[5] = { 0 };
@@ -207,7 +206,7 @@ TEST(subsurface_z_order)
bufs[0] = surface_commit_color(client, surf[0], &red, 100, 100);
/* sub[0] is not used */
- fail += check_screen(client, test_name, 0, &clip, 0);
+ fail += check_screen(client, "subsurface_z_order", 0, &clip, 0);
/* create a blue sub-surface above red */
surf[1] = wl_compositor_create_surface(client->wl_compositor);
@@ -217,7 +216,7 @@ TEST(subsurface_z_order)
wl_subsurface_set_position(sub[1], 20, 20);
wl_surface_commit(surf[0]);
- fail += check_screen(client, test_name, 1, &clip, 1);
+ fail += check_screen(client, "subsurface_z_order", 1, &clip, 1);
/* create a cyan sub-surface above blue */
surf[2] = wl_compositor_create_surface(client->wl_compositor);
@@ -228,7 +227,7 @@ TEST(subsurface_z_order)
wl_surface_commit(surf[1]);
wl_surface_commit(surf[0]);
- fail += check_screen(client, test_name, 2, &clip, 2);
+ fail += check_screen(client, "subsurface_z_order", 2, &clip, 2);
/* create a green sub-surface above blue, sibling to cyan */
surf[3] = wl_compositor_create_surface(client->wl_compositor);
@@ -239,13 +238,13 @@ TEST(subsurface_z_order)
wl_surface_commit(surf[1]);
wl_surface_commit(surf[0]);
- fail += check_screen(client, test_name, 3, &clip, 3);
+ fail += check_screen(client, "subsurface_z_order", 3, &clip, 3);
/* stack blue below red, which brings also cyan and green below red */
wl_subsurface_place_below(sub[1], surf[0]);
wl_surface_commit(surf[0]);
- fail += check_screen(client, test_name, 4, &clip, 4);
+ fail += check_screen(client, "subsurface_z_order", 4, &clip, 4);
assert(fail == 0);