[cairo-commit] 3 commits - perf/cairo-perf-chart.c src/.gitignore test/cairo-test.c test/README

Uli Schlachter psychon at kemper.freedesktop.org
Mon Mar 18 06:03:39 PDT 2013


 perf/cairo-perf-chart.c |   29 +++++++++++++++++++++++++++++
 src/.gitignore          |    4 ++++
 test/README             |    2 +-
 test/cairo-test.c       |    5 ++---
 4 files changed, 36 insertions(+), 4 deletions(-)

New commits:
commit be347acd5a198b4280f2699a1abfca241e7e610b
Author: Matt Sealey <matt at genesi-usa.com>
Date:   Mon Mar 11 10:24:52 2013 -0500

    gitignore: negate gitignore for static pkgconfig files
    
    Commit 781f253 adds a rule cairo-*.*.* to .gitignore in the root dir.
    Unfortunately this matches several src/cairo-*.pc.in files in the
    src directory.
    
    The build system requires these files to be present, but the rule is
    allowing them to be ignored. For example, when extracting a cgit
    snapshot tarball and checking it into another git repository, these
    files get left behind. Any accidental changes to these files will go
    unnoticed by a 'git status' (possibly creating bad installs) and
    any intentional changes could not be committed (git commit -a will
    miss them, and every one will need to be forced). This is not really
    desirable.
    
    We don't want to unignore *.pc.in here since there are many, many
    autogenerated files with this name, and the cairo-*.*.* rule is in
    general quite useful and doesn't warrant modification (although it
    could be made a little more specific), so we just make these 4 files
    a special case and negate the match with full filenames in src/.
    
    Signed-off-by: Matt Sealey <matt at genesi-usa.com>
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/src/.gitignore b/src/.gitignore
index fd53c86..534263a 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -31,3 +31,7 @@ check-has-hidden-symbols.i
 check-link
 check-skiplist
 headers-standalone
+!cairo.pc.in
+!cairo-uninstalled.pc.in
+!cairo-features.pc.in
+!cairo-features-uninstalled.pc.in
commit 0e999edff869bc08522a6a56c69efa9b5e1c33b5
Author: Matthew Fischer <matthew.fischer at canonical.com>
Date:   Sat Mar 9 15:42:59 2013 -0700

    Adding a simple usage statement to cairo-perf-chart
    
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/perf/cairo-perf-chart.c b/perf/cairo-perf-chart.c
index 5a41d02..1faa964 100644
--- a/perf/cairo-perf-chart.c
+++ b/perf/cairo-perf-chart.c
@@ -999,6 +999,31 @@ add_legend (struct chart *chart)
     }
 }
 
+static void
+usage (void)
+{
+	printf("Usage:\n");
+	printf("  cairo-perf-chart [OPTION...] <result1> <result2>...<resultN>\n");
+	printf("\n");
+	printf("Help Options:\n");
+	printf("  --help, --?\tShow help options\n");
+	printf("\n");
+	printf("Application Options:\n");
+	printf("  --html\tOutput an HTML table comparing the results\n");
+	printf("  --height=\tSet the height of the output graph"\
+			" (default 480)\n");
+	printf("  --width=\tSet the width of the output graph"\
+			" (default 640)\n");
+	printf("  --name\tSet the name of graph series."\
+			" This only sets the name for the\n\t\tfirst result file."\
+			" The graph series is usually set using the\n\t\tfile name for"\
+			" the results file.\n");
+	printf("\n");
+	printf("Example:\n");
+	printf("  cairo-perf-chart --width=1024 --height=768 run1 run2 run3\n");
+	return;
+}
+
 int
 main (int	  argc,
       const char *argv[])
@@ -1028,6 +1053,10 @@ main (int	  argc,
 		chart.names[chart.num_reports] = argv[++i];
 	} else if (strncmp (argv[i], "--name=", 7) == 0) {
 	    chart.names[chart.num_reports] = argv[i] + 7;
+	} else if ((strcmp (argv[i], "--help") == 0) ||
+		(strcmp (argv[i], "--?") == 0)) {
+		usage();
+		return 0;
 	} else {
 	    cairo_perf_report_load (&chart.reports[chart.num_reports++],
 				    argv[i], i,
commit 592f5944239debfa3dacc410f675261947156baf
Author: Uli Schlachter <psychon at znc.in>
Date:   Fri Mar 15 16:53:28 2013 +0100

    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 at chaosreigns.com>
    Signed-off-by: Uli Schlachter <psychon at znc.in>

diff --git a/test/README b/test/README
index b8effea..fef240d 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 076b014..a3a587a 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);


More information about the cairo-commit mailing list