Page MenuHomePhabricator

Move the functional test temporary directory under the build directory
ClosedPublic

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

Details

Summary

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/test_runner.py 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/test_runner.py --tmpdirprefix=/tmp/test feature_help

Check the temporary directory is created under /tmp/test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
test_runner_tmp_build_dir
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8922
Build 15818: Default Diff Build & Tests
Build 15817: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Jan 14 2020, 17:32
deadalnix added inline comments.
test/functional/test_runner.py
177

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

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.

This revision is now accepted and ready to land.Jan 15 2020, 13:44