Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: better combine_logs.py behavior #14683

Merged
merged 1 commit into from Nov 30, 2018

Conversation

Projects
None yet
10 participants
@jamesob
Copy link
Member

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2018

ACK. very useful!

Show resolved Hide resolved test/functional/combine_logs.py Outdated
@laanwj

This comment has been minimized.

Copy link
Member

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?

@ryanofsky
Copy link
Contributor

left a comment

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

Show resolved Hide resolved test/functional/combine_logs.py Outdated
@jnewbery
Copy link
Member

left a comment

Big concept ACK. Very cool.

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

Show resolved Hide resolved test/functional/combine_logs.py Outdated
Show resolved Hide resolved test/functional/combine_logs.py Outdated
Show resolved Hide resolved test/functional/combine_logs.py Outdated
@practicalswift

This comment has been minimized.

Copy link
Member

commented Nov 22, 2018

Concept ACK

Nice developer ergonomics improvement!

@conscott

This comment has been minimized.

Copy link
Contributor

commented Nov 22, 2018

Concept ACK woot!

Show resolved Hide resolved test/functional/combine_logs.py Outdated

@jamesob jamesob force-pushed the jamesob:2018-11-better-cons-log branch Nov 27, 2018

@jamesob

This comment has been minimized.

Copy link
Member Author

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.

@ryanofsky
Copy link
Contributor

left a comment

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

@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Nov 27, 2018

utACK ca9698e9075fb1b85afc01e890cef97e13d25405

@MarcoFalke MarcoFalke added this to the 0.18.0 milestone Nov 27, 2018

@jnewbery
Copy link
Member

left a comment

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

Show resolved Hide resolved test/functional/combine_logs.py Outdated

@jamesob jamesob force-pushed the jamesob:2018-11-better-cons-log branch to 4aabadb Nov 29, 2018

@jnewbery

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

ACK 4aabadb. Thanks for removing the dependency!

pull bot pushed a commit to ken2812221/bitcoin that referenced this pull request Nov 30, 2018

Merge bitcoin#14683: tests: better combine_logs.py behavior
4aabadb tests: have combine_logs default to most recent test dir (James O'Beirne)

Pull request description:

  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
  ```sh
  alias testlogs='./test/functional/combine_logs.py -c | less'

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

Tree-SHA512: 919642ab09c314888a23c9491963b35b9da87e60deb740d1d5e816444aa9bdda5e519dc8ca131669f2d563167ef5f5abb14e22f20f47bf8362915ed578181846

@MarcoFalke MarcoFalke merged commit 4aabadb into bitcoin:master Nov 30, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@MarcoFalke

This comment has been minimized.

Copy link
Member

commented Nov 30, 2018

re-utACK 4aabadb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.