Page MenuHomePhabricator

Move the functional test temporary directory under the build directory

Authored by Fabien on Jan 14 2020, 09:45.



The functional tests temporary directoy (containing the logs in case of
a test failure) is currently created using the python tempfile
library. This can cause issues on some systems where /tmp mounted on
RAM and is not large enough to handle the large files produced during
the tests. This issue has been raised in D4927.

This diff moves the temp directory to <build_dir>/test/functional
which should avoid the issue. It is always possible to change this
behavior by passing --tmpdirprefix on the command line.

Test Plan
  1. The test doesn't matter but feature_help runs fast ./test/functional/ feature_help

Check the temporary directory is created at the expected location.
Note: since the temporary directory is cleaned upon success, you should
look at stdout to check this.

mkdir -p /tmp/test
./test/functional/ --tmpdirprefix=/tmp/test feature_help

Check the temporary directory is created under /tmp/test

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Jan 14 2020, 09:45
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 14 2020, 09:45
deadalnix requested changes to this revision.Jan 14 2020, 17:32
deadalnix added inline comments.
177 ↗(On Diff #15437)

This path contains real code we are using. There needs to be some tmp folder that we can blast. because there is test/cache , test/tmp seems appropriate.

This revision now requires changes to proceed.Jan 14 2020, 17:32
Fabien updated this revision to Diff 15460.Jan 14 2020, 19:58

Move to test/tmp

Seems OK I guess, we'll just have to remember to nuke test/tmp on our local builds occasionally as it fills up with test failures.

deadalnix accepted this revision.Jan 15 2020, 13:44
This revision is now accepted and ready to land.Jan 15 2020, 13:44
jasonbcox accepted this revision.Jan 15 2020, 17:07