summaryrefslogtreecommitdiffhomepage
path: root/test/conftest.py
diff options
context:
space:
mode:
authorAndrei Zeliankou <zelenkov@nginx.com>2022-12-12 16:24:54 +0000
committerAndrei Zeliankou <zelenkov@nginx.com>2022-12-12 16:24:54 +0000
commit648e91a623d3822e8ab4780b452da211ea3ba257 (patch)
treee1a91306c321c93844b0411a10ac3bf55e8410af /test/conftest.py
parentf67a01b88fd7c7057767e18a3dd06c24e94c8aa8 (diff)
downloadunit-648e91a623d3822e8ab4780b452da211ea3ba257.tar.gz
unit-648e91a623d3822e8ab4780b452da211ea3ba257.tar.bz2
Tests: pretty output.
Hide expected alerts by default. Silence succesfull "go build" information.
Diffstat (limited to 'test/conftest.py')
-rw-r--r--test/conftest.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/conftest.py b/test/conftest.py
index 759f11bd..c2680744 100644
--- a/test/conftest.py
+++ b/test/conftest.py
@@ -485,14 +485,15 @@ def _check_alerts(*, log=None):
log = f.read()
found = False
-
alerts = re.findall(r'.+\[alert\].+', log)
if alerts:
- print('\nAll alerts/sanitizer errors found in log:')
- [print(alert) for alert in alerts]
found = True
+ if option.detailed:
+ print('\nAll alerts/sanitizer errors found in log:')
+ [print(alert) for alert in alerts]
+
if option.skip_alerts:
for skip in option.skip_alerts:
alerts = [al for al in alerts if re.search(skip, al) is None]
@@ -504,7 +505,7 @@ def _check_alerts(*, log=None):
assert not sanitizer_errors, 'sanitizer error(s)'
- if found:
+ if found and option.detailed:
print('skipped.')