Skip to content

Commit

Permalink
mtest: fix test output issues (in console)
Browse files Browse the repository at this point in the history
This change set aims to fix various "issues" seen with the current
implementation. The changes can be summarized with the following list:

* Replace emojis and spinners with multiline status displaying the name
  and running time of each currently running test.
* The test output (especially in verbose mode or when multiple failing
  tests' output gets printed out) can get confusing. Try to make the
  output easier to read and grasp. Most notable change here is the
  addition of the test number to the beginning of each printed line.
* Print exit details (i.e. exit code) of the test in verbose mode.
* Try to make the verbose "live" output from tests to match the look and
  feel of otherwise produced (verbose) test output.
  • Loading branch information
trhd committed Sep 21, 2021
1 parent e049494 commit 65344c2
Show file tree
Hide file tree
Showing 2 changed files with 212 additions and 201 deletions.
3 changes: 3 additions & 0 deletions mesonbuild/mlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ def __str__(self) -> str:
def bold(text: str, quoted: bool = False) -> AnsiDecorator:
return AnsiDecorator(text, "\033[1m", quoted=quoted)

def italic(text: str, quoted: bool = False) -> AnsiDecorator:
return AnsiDecorator(text, "\033[3m", quoted=quoted)

def plain(text: str) -> AnsiDecorator:
return AnsiDecorator(text, "")

Expand Down
Loading

0 comments on commit 65344c2

Please sign in to comment.