[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 11:08:37 PDT 2013


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.)

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   |    6 +++---
 test/fallback-resolution.c |   20 +-------------------
 test/multi-page.c          |    5 +++--
 test/pdf-features.c        |    3 ++-
 test/pdf-mime-data.c       |    9 +++++----
 test/pdf-surface-source.c  |    4 +++-
 test/png.c                 |    3 ++-
 test/ps-features.c         |    3 ++-
 test/ps-surface-source.c   |    4 +++-
 test/svg-clip.c            |    3 ++-
 test/svg-surface-source.c  |    4 +++-
 test/svg-surface.c         |    9 +++++++--
 15 files changed, 58 insertions(+), 41 deletions(-)

-- 
1.7.9.5


More information about the cairo mailing list