You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filing this issue mostly to document behavior that I came across today.
Context
Unintuitively, the $TMP directory defined by Cram is the same across all tests invoked by the same cram command. This means it isn't cleaned up at the end of each test, and lingering output files from one test may affect the outcome of another test.
Instead, the starting directory of a test file is a directory under $TMP that is truly unique for that test file.
This is what most tests do already (e.g. tests/functional/mask.t). However, some tests still leave things under $TMP (e.g. tests/builds/zika.t leaves a directory $TMP/out/). Find these lingering files and add cleanup commands to prevent unintended side effects.
2. Run tests from the starting directory
Remove pushd $TESTDIR … commands to stay in the per-test temporary directory.
Change the export AUGUR commands accordingly.
Replace all usage of $TMP with relative paths.
Update the relative paths with $TESTDIR to use existing test files.
The text was updated successfully, but these errors were encountered:
Filing this issue mostly to document behavior that I came across today.
Context
Unintuitively, the
$TMP
directory defined by Cram is the same across all tests invoked by the samecram
command. This means it isn't cleaned up at the end of each test, and lingering output files from one test may affect the outcome of another test.Instead, the starting directory of a test file is a directory under
$TMP
that is truly unique for that test file.How to reproduce
See this GitHub gist.
Possible solutions
1. Clean up
$TMP
after every testThis is what most tests do already (e.g. tests/functional/mask.t). However, some tests still leave things under
$TMP
(e.g. tests/builds/zika.t leaves a directory$TMP/out/
). Find these lingering files and add cleanup commands to prevent unintended side effects.2. Run tests from the starting directory
pushd $TESTDIR …
commands to stay in the per-test temporary directory.export AUGUR
commands accordingly.$TMP
with relative paths.$TESTDIR
to use existing test files.The text was updated successfully, but these errors were encountered: