Allow tests to pass even when stderr got populated #10241

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2017/04/test_stderr changing 1 files +5 −0
  1. jonasschnelli commented at 6:57 pm on April 20, 2017: contributor
  2. jonasschnelli added the label Tests on Apr 20, 2017
  3. laanwj commented at 8:54 am on April 21, 2017: member
    I thought about this a bit: apparently some people use the stderr output to determine whether a test emitted e.g. sanitizer warnings. Possible idea: add a “WARNINGS” status, that is interpreted as PASS for the final tally but does show that something unexpected was printed.
  4. Allow tests to pass even when stderr got populated, flag them as "passed with warnings" 41f392cf50
  5. jonasschnelli force-pushed on Apr 29, 2017
  6. jonasschnelli commented at 2:39 pm on April 29, 2017: contributor
    Added a new status “Passed with warnings” which gets set when the test passed but stderr was not empty. The test will be flagged as “successful” for that new status.
  7. in test/functional/test_runner.py:413 in 41f392cf50
    408@@ -407,6 +409,9 @@ def __repr__(self):
    409         if self.status == "Passed":
    410             color = BLUE
    411             glyph = TICK
    412+        if self.status == "Passed with warnings":
    413+            color = ORANGE
    


    MarcoFalke commented at 10:14 am on April 30, 2017:
    0NameError: name 'ORANGE' is not defined
    

    jnewbery commented at 1:29 pm on May 1, 2017:
    ORANGE would need to be a constant defined at the top of this file (see around L47)
  8. in test/functional/test_runner.py:412 in 41f392cf50
    408@@ -407,6 +409,9 @@ def __repr__(self):
    409         if self.status == "Passed":
    410             color = BLUE
    411             glyph = TICK
    412+        if self.status == "Passed with warnings":
    


    jnewbery commented at 1:29 pm on May 1, 2017:
    elif please
  9. jnewbery commented at 1:35 pm on May 1, 2017: member

    Couple of comments inline.

    If you add a new status string, you’ll need to update print justification (otherwise I think your new category will just be truncated). Justification is on L337 in print_results() and L422 in TestResult.__repr__().

    Now that we have 4 categories, it may make sense to define all the categories as constants at the top of the file and have a new MAX_STATUS_WIDTH constant as well.

    One you’ve done that, can you add a screenshot of what this looks like?

  10. MarcoFalke commented at 10:45 am on May 14, 2017: member
    Concept ACK, but I will close this pull in case no one picks it up in the next couple of days.
  11. MarcoFalke commented at 11:49 pm on May 18, 2017: member
    Closing for now. Feel free to pick this up again.
  12. MarcoFalke closed this on May 18, 2017

  13. MarcoFalke referenced this in commit f1f1605c22 on Jul 25, 2017
  14. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-05 01:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me