Page MenuHomePhabricator

Make test_runner.py scripts argument accept wildcards
Needs RevisionPublic

Authored by Fabien on Mon, Feb 4, 10:11.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Summary

With the scripts being renamed, it could be interesting to allow for
specifying a category of functional tests to run. This diff adds
wildcard management in the script list given to test_runner.py. Any
number of widcard can be used. For example, all the abc functional tests
can be run with ./test/functional/test_runner.py abc-*

Test Plan

Run all the abc functional tests

./test/functional/test_runner.py abc-*

Run rpc_bind.py and rpc_users.py, only once each:

./test/functional/test_runner.py rpc_bind rpc_users.py
./test/functional/test_runner.py rpc_bind rpc_users.py rpc_bind.py

Run all the scripts containing the word "transaction":

./test/functional/test_runner.py *transaction*

Run all the scripts ending with the word "transaction":

./test/functional/test_runner.py *transaction

Diff Detail

Repository
rABC Bitcoin ABC
Branch
test_runner_wildcard
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 4879
Build 7821: Bitcoin ABC Teamcity Staging
Build 7820: arc lint + arc unit

Event Timeline

Fabien created this revision.Mon, Feb 4, 10:11
Herald added a reviewer: Restricted Project. · View Herald TranscriptMon, Feb 4, 10:11
Herald added a subscriber: schancel. · View Herald Transcript
deadalnix accepted this revision.Mon, Feb 4, 12:18
This revision is now accepted and ready to land.Mon, Feb 4, 12:18
deadalnix requested changes to this revision.Mon, Feb 4, 12:20
deadalnix added inline comments.
test/functional/test_runner.py
227 ↗(On Diff #7152)

This will not simply remove extension. It breaks existing semantic, and frankly, for no good reasons.

This revision now requires changes to proceed.Mon, Feb 4, 12:20
Fabien updated this revision to Diff 7185.Tue, Feb 5, 09:24

Back to re.sub() instead of replace()

deadalnix requested changes to this revision.Tue, Feb 5, 14:44

This shows all the sign of code that has been banged on until it more or less passes some smoke test.

The '.py$' being removed from various places. The argument passed being kind of regex kind of not. This code has not been designed in any way, it just happen to work in some specific case.

This revision now requires changes to proceed.Tue, Feb 5, 14:44