Skip to content

Conversation

@jamesob
Copy link
Contributor

@jamesob jamesob commented Nov 7, 2018

Have combine_logs.py default to the most recent test directory if no argument is provided. This allows you to avoid an annoying copy-paste when iterating on a failing test, since you can do something like

alias testlogs='./test/functional/combine_logs.py -c | less'

./test/functional/some_test.py  # fails
testlogs

@DrahtBot
Copy link
Contributor

DrahtBot commented Nov 7, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

No conflicts as of last run.

@fanquake fanquake added the Tests label Nov 7, 2018
@lucash-dev
Copy link
Contributor

ACK. very useful!

@laanwj
Copy link
Member

laanwj commented Nov 12, 2018

Concept ACK—I think this functionality is very useful

Though I'm not sure about security implications of opening everything that looks like a test directory in /tmp, say, on a multi-user system.

Maybe add a check that the directory is owned by the current user as well?

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK e2d9b2fec809971de4cfc67048995e33e7e4749c, though I agree it would be good to check ownership.

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big concept ACK. Very cool.

A few nits inline. You should also address comments by laanwj, ryanofsky and practicalswift.

@practicalswift
Copy link
Contributor

Concept ACK

Nice developer ergonomics improvement!

@conscott
Copy link
Contributor

Concept ACK woot!

@jamesob jamesob force-pushed the 2018-11-better-cons-log branch from e2d9b2f to ca9698e Compare November 27, 2018 16:05
@jamesob
Copy link
Contributor Author

jamesob commented Nov 27, 2018

Thanks for the good feedback, all. I've incorporated everyone's suggestions - though I'm testing for tmp directory readability instead of ownership.

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK ca9698e9075fb1b85afc01e890cef97e13d25405. Just minor tweaks since last review: changing test prefix, choosing last readble directory, changing help formatting and forbidding unknown options

@maflcko
Copy link
Member

maflcko commented Nov 27, 2018

utACK ca9698e9075fb1b85afc01e890cef97e13d25405

@maflcko maflcko added this to the 0.18.0 milestone Nov 27, 2018
Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes mostly look good, but please remove the dependency on test_framework

@jamesob jamesob force-pushed the 2018-11-better-cons-log branch from ca9698e to 4aabadb Compare November 29, 2018 22:41
@jnewbery
Copy link
Contributor

ACK 4aabadb. Thanks for removing the dependency!

@maflcko maflcko merged commit 4aabadb into bitcoin:master Nov 30, 2018
@maflcko
Copy link
Member

maflcko commented Nov 30, 2018

re-utACK 4aabadb

jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 7, 2020
Summary:
Have combine_logs.py default to the most recent test directory if no argument is provided.
Backport of Core [[bitcoin/bitcoin#14683 | PR14683]]

Test Plan:
```
ninja
../test/functional/feature_bip68_sequence.py --configfile=./test/config.ini
../test/functional/combine_logs.py -c
```

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7795
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants