Write test artifacts to a subdirectory, not /tmp
Currently rsvg-test's get_output_file()
simply calls g_get_tmp_dir()
and writes the -out.png
and -diff.png
files there. This is bad for several reasons:
- Writing files with predictable names to /tmp is a no-no, even if this is just for the tests.
- It forces the
.gitlab-ci.yml
script to manually fetch the generated artifacts in an awkward way - The artifacts end up in a different place than the
.log
files generated byg_test_*()
.
We should do this:
-
Unless a location is specified by the user (in an environment variable?), write test artifacts to a subdirectory undertests/
. -
Write output to librsvg/tests/output/
. -
Add a way to clean this directory; cairo uses clean-local
. -
Make .gitlab-ci.yml
use that location -
Document the way to clean the tests in tests/README.md
.
Edited by Federico Mena Quintero