summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce W. Harrington <b.harrington@samsung.com>2013-09-08 20:10:03 +0000
committerUli Schlachter <psychon@znc.in>2013-09-09 21:21:43 +0200
commitbe7f1ac98f62669743f381df8845886d29a9f7f4 (patch)
treea3589ba3f95fd495191e6abdb13bcb76a18e9053
parent6731023f1bba7e26dbbc06defdbb37ac5267e9db (diff)
test: Make cairo_test_mkdir() usable throughout tests.
Signed-off-by: Bryce Harrington <b.harrington@samsung.com> Signed-off-by: Uli Schlachter <psychon@znc.in>
-rw-r--r--test/cairo-test.c10
-rw-r--r--test/cairo-test.h3
2 files changed, 8 insertions, 5 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 7bcb0ba87..119506da4 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -103,8 +103,8 @@ static int cairo_test_timeout = 60;
#define NUM_DEVICE_OFFSETS 2
#define NUM_DEVICE_SCALE 2
-static cairo_bool_t
-_cairo_test_mkdir (const char *path)
+cairo_bool_t
+cairo_test_mkdir (const char *path)
{
#if ! HAVE_MKDIR
return FALSE;
@@ -158,7 +158,7 @@ _cairo_test_init (cairo_test_context_t *ctx,
ctx->test_name = _cairo_test_fixup_name (test_name);
ctx->output = output;
- _cairo_test_mkdir (ctx->output);
+ cairo_test_mkdir (ctx->output);
ctx->malloc_failure = 0;
#if HAVE_MEMFAULT
@@ -421,7 +421,7 @@ cairo_test_target_has_similar (const cairo_test_context_t *ctx,
return DIRECT;
xasprintf (&path, "%s/%s",
- _cairo_test_mkdir (ctx->output) ? ctx->output : ".",
+ cairo_test_mkdir (ctx->output) ? ctx->output : ".",
ctx->test_name);
has_similar = DIRECT;
@@ -761,7 +761,7 @@ cairo_test_for_target (cairo_test_context_t *ctx,
target->file_extension);
}
- have_output_dir = _cairo_test_mkdir (ctx->output);
+ have_output_dir = cairo_test_mkdir (ctx->output);
xasprintf (&base_path, "%s/%s",
have_output_dir ? ctx->output : ".",
base_name);
diff --git a/test/cairo-test.h b/test/cairo-test.h
index 87ba7df54..c753728f0 100644
--- a/test/cairo-test.h
+++ b/test/cairo-test.h
@@ -318,6 +318,9 @@ cairo_test_get_reference_image (cairo_test_context_t *ctx,
const char *filename,
cairo_bool_t flatten);
+cairo_bool_t
+cairo_test_mkdir (const char *path);
+
CAIRO_END_DECLS
#endif