[cairo] [PATCH v3 0/7] test: Don't ignore test output files when written to the wrong directory

Bryce W. Harrington b.harrington at samsung.com
Thu Aug 15 10:45:41 PDT 2013


I've also posted this patchset to my test-outputs-to-output-dir branch
at:

    http://cgit.freedesktop.org/~bryce/cairo/

The branch also includes a tweak to patch #6 to fix a conflict with a
recently landed change, so it may be easier to pull from the branch.

Bryce

On Thu, Aug 15, 2013 at 10:20:18AM -0700, Bryce Harrington wrote:
> From: Bryce Harrington <b.harrington at samsung.com>
> 
> Several tests write output files into the test/ directory rather than
> test/output as they should.  This hasn't been noticeable because the
> .gitignore file makes *.out.* files not show up when running git
> status.  (Except for one of pdf-mime-data's pdf output files.)
> 
> [Update v2]
> One patch in this set corrects .gitignore so these stray output files
> are no longer hidden.  The other fixes up all the tests to write them
> into test/output.
> 
> [Update v3]
> Each test now attempts to mkdir the output path before executing, and
> uses the current working dir if the output path can't be created.  This
> follows the pattern of the ps-eps.c and fallback-resolution.c tests.
> 
> Each of these tests implemented copies of a private _cairo_test_mkdir()
> routine; this is now promoted to cairo-test.* so more tests can utilize
> it.
> 
> Tests that directly write output files, now put these into the directory
> specified as CAIRO_TEST_OUTPUT_DIR (which is currently defined as
> "output").
> 
> Test results run before and after this patchset are as follows:
> 
>                     Before      After      Delta
>  ---------------------------------------------------
>  Tests run:         24499       24499	       0
>  Passed:            15378       15378	       0
>  Failed:            3846         3846	       0
>  Expected Failed:   429	          429	       0
>  Error:             0	            1	      +1
>  Crashed:           1204         1203	      -1
>  Untested:          3642         3642	       0
>  Total:             24499       24499	       0
> 
> The test that changed is one that just randomly errors or crashes, and
> can be safely ignored.
> 
> 
> Bryce Harrington (7):
>   test: Don't ignore test output files left in test directory
>   test: Fix several tests to place output files in the output directory
>   test: Use CAIRO_TEST_OUTPUT_DIR for name of the output directory
>   test: concat CAIRO_TEST_OUTPUT_DIR at point of use instead of
>     BASENAME
>   test: Make cairo_test_mkdir() usable throughout tests
>   test: Ensure output dirs exist, falling back to current dir if needed
>   test: Refer to output filename by variable, not a hardcoded value
> 
>  test/.gitignore            |    4 ----
>  test/cairo-test.c          |   18 ++++++++++++++++++
>  test/cairo-test.h          |    4 ++++
>  test/create-for-stream.c   |   14 +++++++++++---
>  test/fallback-resolution.c |   20 +-------------------
>  test/multi-page.c          |   10 +++++++---
>  test/pdf-features.c        |    7 ++++++-
>  test/pdf-mime-data.c       |   13 +++++++++----
>  test/pdf-surface-source.c  |    8 +++++++-
>  test/png.c                 |    9 ++++++++-
>  test/ps-eps.c              |   20 +-------------------
>  test/ps-features.c         |    9 ++++++---
>  test/ps-surface-source.c   |    8 +++++++-
>  test/svg-clip.c            |    7 ++++++-
>  test/svg-surface-source.c  |    8 +++++++-
>  test/svg-surface.c         |    9 +++++++--
>  16 files changed, 105 insertions(+), 63 deletions(-)
> 
> -- 
> 1.7.9.5


More information about the cairo mailing list