diff options
author | João Valverde <joao.valverde@tecnico.ulisboa.pt> | 2021-02-04 03:01:17 +0000 |
---|---|---|
committer | Wireshark GitLab Utility <gerald+gitlab-utility@wireshark.org> | 2021-02-04 17:00:36 +0000 |
commit | ba23c3b3163192b85431a9b3975e4745664f0f27 (patch) | |
tree | e3f29555398002577ce6cb291fe7b9904444d56d /test/suite_clopts.py | |
parent | 791d101d4dfbc976ffe0ae9069dfb79ef07117db (diff) |
tests: Add argument to trim output to a reasonable size
The output of the "values" tshark glossary has over 1.3M lines. Writing
this to stdout with some test failures is problematic in a number of ways.
Also it's not helpful because stderr is written after stdout (not interleaved)
so there is no output context to the error message. The error/warning
message (from stderr, that triggered the test failure) needs to be
sufficient to provide a good understaning of the test failure.
The output is trimmed to first+last N lines. Some lines are kept as
informational and because it may be useful if the program aborts.
Fixes #17203.
Diffstat (limited to 'test/suite_clopts.py')
-rw-r--r-- | test/suite_clopts.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/suite_clopts.py b/test/suite_clopts.py index 8a25e2c4a0..b0f96232c2 100644 --- a/test/suite_clopts.py +++ b/test/suite_clopts.py @@ -165,7 +165,7 @@ class case_tshark_dump_glossaries(subprocesstest.SubprocessTestCase): self.log_fd.truncate() except Exception: pass - self.assertRun((cmd_tshark, '-G', glossary), env=base_env) + self.assertRun((cmd_tshark, '-G', glossary), env=base_env, max_lines=20) self.assertEqual(self.countOutput(count_stdout=False, count_stderr=True), 0, 'Found error output while printing glossary ' + glossary) def test_tshark_glossary_valid_utf8(self, cmd_tshark, base_env): |