Page MenuHomePhabricator

Don't use the functional test arguments in the tmp directory name
ClosedPublic

Authored by Fabien on May 29 2019, 21:23.

Details

Summary

The tmpdir of a functional test is constructed using the whole test
command line, including arguments.
This breaks the assumption that the name ends with .py in the case
there are arguments (such as --usecli or --mineblock), introduces
spaces and other undesirable characters in the directory name, and makes
it harder to determine the tmpdir name from the test suite.
This diffs changes this behavior to only use the test name to build the
tmpdir name. Note that there is no collision because the unique
portseed is also part of the name (this is left unchanged).

Test Plan
./test/functional/test_runner.py wallet_txn_clone --nocleanup

Look at the directory structure.
Before the diff:

<test_runner tmpdir>/'wallet_txn_clone.py --mineblock_<N>'/
<test_runner tmpdir>/wallet_txn_clone_<N+1>/

After the diff:

<test_runner tmpdir>/wallet_txn_clone_<N>/
<test_runner tmpdir>/wallet_txn_clone_<N+1>/

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.May 29 2019, 23:01

It begs the question, what is core doing and why are we doing something different.

Core is doing what the new code does for naming.
This name has been introduced in D1118.