aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mlog.py
diff options
context:
space:
mode:
authorHemmo Nieminen <hemmo.nieminen@iki.fi>2021-04-08 09:02:59 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2021-09-25 13:42:45 +0300
commit5fcb0e6525e2044e0f82bda488a51350e0f7f29f (patch)
tree40add5157167dd57c699ee6dfe2e18f90aab47d5 /mesonbuild/mlog.py
parent64c267c49c785a204730ca28141f1fe34bc1827a (diff)
downloadmeson-5fcb0e6525e2044e0f82bda488a51350e0f7f29f.zip
meson-5fcb0e6525e2044e0f82bda488a51350e0f7f29f.tar.gz
meson-5fcb0e6525e2044e0f82bda488a51350e0f7f29f.tar.bz2
mtest: fix test output issues (in console)
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.
Diffstat (limited to 'mesonbuild/mlog.py')
-rw-r--r--mesonbuild/mlog.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/mlog.py b/mesonbuild/mlog.py
index 18cbc48..0385e0b 100644
--- a/mesonbuild/mlog.py
+++ b/mesonbuild/mlog.py
@@ -158,6 +158,9 @@ class AnsiText:
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, "")