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

mtest: list the first N log lines rather than the last N #14266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/markdown/Unit-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ other useful information as the environmental variables. This is
useful, for example, when you run the tests on Travis-CI, Jenkins and
the like.

By default, the output from tests will be limited to the last 100 lines. The
By default, the output from tests will be limited to the first 100 lines. The
maximum number of lines to show can be configured with the `--max-lines` option
*(added 1.5.0)*:

Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/mtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def shorten_log(self, harness: 'TestHarness', result: 'TestRun') -> str:
if len(lines) < self.max_lines:
return log
else:
return str(mlog.bold(f'Listing only the last {self.max_lines} lines from a long log.\n')) + '\n'.join(lines[-self.max_lines:])
return str(mlog.bold(f'Listing only the first {self.max_lines} lines from a long log.\n')) + '\n'.join(lines[:self.max_lines])

def print_log(self, harness: 'TestHarness', result: 'TestRun') -> None:
if not result.verbose:
Expand Down
Loading