aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-27 01:06:44 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-06 15:31:08 +0100
commitbaa6f12260c383f40a477b71743b16940c50e5aa (patch)
tree8a444c17027d25ec32dd97ffb6e7e052059b5bf2
parentcebe8f5b003edfa99094caf732364c64b46fdcc8 (diff)
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
-rw-r--r--osmopy/osmotestconfig.py4
1 files changed, 3 insertions, 1 deletions
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 @@ def test_all_apps(apps, app_configs, tmpdir="writtenconfig", verbose=True,
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