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
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