From 592f5944239debfa3dacc410f675261947156baf Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 15 Mar 2013 16:53:28 +0100 Subject: test: Fix CAIRO_REF_DIR Ever since the test output was moved from test/ to test/output/, using CAIRO_REF_DIR to make the test suite succeed no longer works. The test suite was looking for the wrong file names. This patch makes this work again. However, I am not sure that this really is the correct fix. It just seems to work. :-) Reported-by: Darxus Signed-off-by: Uli Schlachter --- test/README | 2 +- test/cairo-test.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/test/README b/test/README index b8effea9..fef240da 100644 --- a/test/README +++ b/test/README @@ -156,7 +156,7 @@ your changes. The process looks like this: # Let's save those output images mkdir /some/directory/ - cp test/*-out.png /some/directory/ + cp -r test/output /some/directory/ # hack, hack, hack diff --git a/test/cairo-test.c b/test/cairo-test.c index 076b0148..a3a587a2 100644 --- a/test/cairo-test.c +++ b/test/cairo-test.c @@ -307,11 +307,10 @@ cairo_test_reference_filename (const cairo_test_context_t *ctx, char *ref_name = NULL; /* First look for a previous build for comparison. */ - if (ctx->refdir != NULL) { - xasprintf (&ref_name, "%s/%s%s%s", + if (ctx->refdir != NULL && strcmp(suffix, CAIRO_TEST_REF_SUFFIX) == 0) { + xasprintf (&ref_name, "%s/%s" CAIRO_TEST_OUT_SUFFIX "%s", ctx->refdir, base_name, - suffix, extension); if (access (ref_name, F_OK) != 0) free (ref_name); -- cgit v1.2.3