[cairo] [PATCH v4 3/5] test: Make cairo_test_mkdir() usable throughout tests. Rename _cairo_test_mkdir to cairo_test_mkdir and make it non-static.

Bryce W. Harrington b.harrington at samsung.com
Sun Sep 8 13:10:03 PDT 2013


Signed-off-by: Bryce Harrington <b.harrington at samsung.com>
---
 test/cairo-test.c |   10 +++++-----
 test/cairo-test.h |    4 ++++
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/test/cairo-test.c b/test/cairo-test.c
index a3a587a..255ea8b 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -102,8 +102,8 @@ static int cairo_test_timeout = 60;
 
 #define NUM_DEVICE_OFFSETS 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;
@@ -157,7 +157,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
@@ -420,7 +420,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;
@@ -750,7 +750,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 87ba7df..1dcd59b 100644
--- a/test/cairo-test.h
+++ b/test/cairo-test.h
@@ -318,6 +318,10 @@ 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
-- 
1.7.9.5


More information about the cairo mailing list