[Git][NTPsec/ntpsec][master] report fails
James Browning
gitlab at mg.gitlab.com
Wed Aug 29 22:24:18 UTC 2018
James Browning pushed to branch master at NTPsec / ntpsec
Commits:
7fa9b38c by James Browning at 2018-08-29T22:20:11Z
report fails
- - - - -
1 changed file:
- wafhelpers/bin_test.py
Changes:
=====================================
wafhelpers/bin_test.py
=====================================
@@ -50,20 +50,22 @@ def run(cmd, reg):
if check:
pprint("GREEN", " OK")
- return False
+ return True
else:
pprint("RED", " FAILED")
- return True
+ return False
def cmd_bin_test(ctx, config):
- fail = True
+ fails = 0
for cmd in sorted(cmd_map):
- fail = run(cmd, cmd_map[cmd])
+ if not run(cmd, cmd_map[cmd]):
+ fails += 1
- if fail:
- pprint("RED", "Tests failed!")
- # ctx.fatal("Failed")
+ if 1 == fails:
+ ctx.fatal("1 binary test failed!")
+ elif 1 < fails:
+ ctx.fatal("%d binary tests failed!" % fails)
# cmd_bin_test(None, None)
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7fa9b38c3e91f96b173ffa02bafa29cf81173cf7
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/7fa9b38c3e91f96b173ffa02bafa29cf81173cf7
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180829/2f7fa969/attachment-0001.html>
More information about the vc
mailing list