From: Olaf Meeuwissen <olaf.meeuwissen@avasys.jp>
To: Achim Gratz <Stromeko@nexgo.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: Temp files from testing are permanent...
Date: Thu, 16 Feb 2012 09:54:10 +0900 [thread overview]
Message-ID: <8762f7d2dp.fsf@avasys.jp> (raw)
In-Reply-To: <877gzof2e1.fsf@Rainer.invalid> (Achim Gratz's message of "Wed, 15 Feb 2012 18:11:02 +0100")
Achim Gratz <Stromeko@nexgo.de> writes:
> Olaf Meeuwissen <olaf.meeuwissen@avasys.jp> writes:
>> If running `make check` (or similar) creates these files, `make clean`
>> (or similar) should clean them up.
>
> I was asking that question to decide whether I do need to extend my
> Makefile fork to handle the cleanup or if the testsuite needs to be
> called differently to avoid leaving these stale files. If you'd take a
> look, you can see that the files are obviously made with a function that
> ensures they're unique, most likely make-temp-file. If so, it would
> seem logical that the testsuite should remove them after each test
> (since it is the only instance to know the complete filename). It would
> also seem logical that for debugging purposes one could leave the files
> around.
Successful tests can clean up after themselves but failed tests should
not so you can debug. The decision to remove these files should be left
to whoever runs the test suite. That implies that even successful tests
don't really have to bother cleaning up after themselves.
I normally instruct my tests to create files in a dedicated directory
with a fixed name somewhere below $(top_builddir). Then a `make clean`
can just remove the whole directory.
If you use `make check` to run the test suite, you can easily set TMPDIR
via the TESTS_ENVIRONMENT Makefile variable (assuming that that variable
is taken into account when making unique file names). Something like
TESTS_ENVIRONMENT = TMPDIR=$(builddir)/test-outputs
and then add a clean-local target like
clean-local:
-rm -rf $(builddir)/test-outputs
See [[info:automake-1.11#Simple%20Tests][info:automake-1.11#Simple
Tests]] and [[info:automake-1.11#Extending]] for details.
Hope this helps,
--
Olaf Meeuwissen, LPIC-2 FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962 Help support software freedom
http://www.fsf.org/jf?referrer=1962
next prev parent reply other threads:[~2012-02-16 0:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 18:31 Temp files from testing are permanent Achim Gratz
2012-02-14 23:12 ` Olaf Meeuwissen
2012-02-15 17:11 ` Achim Gratz
2012-02-15 18:02 ` Brian Wightman
2012-02-15 18:38 ` Achim Gratz
2012-02-16 20:47 ` Achim Gratz
2012-02-16 0:54 ` Olaf Meeuwissen [this message]
2012-02-16 18:14 ` Achim Gratz
2012-02-18 17:46 ` Eric Schulte
2012-02-18 18:48 ` Achim Gratz
2012-02-19 16:21 ` Eric Schulte
2012-02-19 17:03 ` Achim Gratz
2012-02-20 0:11 ` Olaf Meeuwissen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8762f7d2dp.fsf@avasys.jp \
--to=olaf.meeuwissen@avasys.jp \
--cc=Stromeko@nexgo.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).