Skip to content

[Trivial][Tests] Do not fail test when warnings are written to stderr#961

Merged
random-zebra merged 1 commit into
PIVX-Project:masterfrom
random-zebra:2019_test_runner
Jul 31, 2019
Merged

[Trivial][Tests] Do not fail test when warnings are written to stderr#961
random-zebra merged 1 commit into
PIVX-Project:masterfrom
random-zebra:2019_test_runner

Conversation

@random-zebra
Copy link
Copy Markdown

Fixes #960

Rationale: the test result should be set only through asserts in the test and not rely on what's printed on the console. Furthermore, as shown in the issue, stderr could contain simple warnings that don't affect the test's outcome.
If stderr is not empty though, print its content.

Also re-sort tests by duration.

@CaveSpectre11
Copy link
Copy Markdown

CaveSpectre11 commented Jul 25, 2019

utACK e71bafd

@akshaynexus
Copy link
Copy Markdown

ACK ,tested on the pr which had this issue,travis shows checks successful.

Copy link
Copy Markdown
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

Looks good overall, just a couple output format nits

Comment thread test/functional/test_runner.py Outdated
Comment thread test/functional/test_runner.py Outdated
print stderr with the test result instead
Copy link
Copy Markdown
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK 20aab11

Copy link
Copy Markdown

@Warrows Warrows left a comment

Choose a reason for hiding this comment

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

utACK 20aab11

@random-zebra random-zebra merged commit 20aab11 into PIVX-Project:master Jul 31, 2019
random-zebra added a commit that referenced this pull request Jul 31, 2019
…en to stderr

20aab11 [Tests] Do not fail when warnings are written to stderr (random-zebra)

Pull request description:

  Fixes #960

  Rationale: the test result should be set only through `assert`s in the test and not rely on what's printed on the console. Furthermore, as shown in the issue, stderr could contain simple warnings that don't affect the test's outcome.
  If stderr is not empty though, print its content.

  Also re-sort tests by duration.

ACKs for top commit:
  Fuzzbawls:
    ACK 20aab11
  Warrows:
    utACK 20aab11

Tree-SHA512: 34685dd81b7849d761eb3427a3f67c825605b58d985d3c992491007ac84085632b6c5a24427ac53e8c6f340b3becf68e5b0a036bf2614b47f20ab9886b027432
@random-zebra random-zebra added this to the 4.0.0 milestone Aug 6, 2019
@random-zebra random-zebra modified the milestones: 4.0.0, 3.4.0 Aug 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tests] Tests fail when a warning is given

5 participants