This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgNeels Hofmeyr has submitted this change and it was merged.
Change subject: test_all_apps: actually count nr of errors
......................................................................
test_all_apps: actually count nr of errors
Each test run returns 1 on error, so instead of |=, why not count the number of
errors with +=. Also print the final error count.
Change-Id: I690dde3711555a3447e5ad4cc0a04a7a869a8296
---
M osmopy/osmotestconfig.py
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Harald Welte: Looks good to me, approved
diff --git a/osmopy/osmotestconfig.py b/osmopy/osmotestconfig.py
index 5e19a40..2132c43 100644
--- a/osmopy/osmotestconfig.py
+++ b/osmopy/osmotestconfig.py
@@ -172,11 +172,13 @@
configs = app_configs[app[3]]
for config in configs:
config = os.path.join(confpath, config)
- errors |= test_config(app, config, tmpdir, verbose)
+ errors += test_config(app, config, tmpdir, verbose)
if rmtmp or not errors:
remove_tmpdir(tmpdir)
+ if errors:
+ print >> sys.stderr, "ERRORS: %d" % errors
return errors
--
To view, visit https://gerrit.osmocom.org/1925
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I690dde3711555a3447e5ad4cc0a04a7a869a8296
Gerrit-PatchSet: 2
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>