diff options
author | Uli Schlachter <psychon@znc.in> | 2013-03-15 16:53:28 +0100 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2013-03-15 16:56:42 +0100 |
commit | 592f5944239debfa3dacc410f675261947156baf (patch) | |
tree | 4ba31f0c524e51974ce92f4d9fb6d2b18ecfe42f | |
parent | c141615a7fa632a2435b49f3949ed1fc9962af1f (diff) |
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 <darxus@chaosreigns.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
-rw-r--r-- | test/README | 2 | ||||
-rw-r--r-- | 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); |