From e9c1face6c22eee2fb63b6869d30f431e0a33327 Mon Sep 17 00:00:00 2001 From: krad Date: Fri, 10 Jun 2016 10:52:18 -0700 Subject: [PATCH] Minor fix to precommit-check.py --- build_tools/precommit_checker.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build_tools/precommit_checker.py b/build_tools/precommit_checker.py index 5e128e38f..c8a63a1ed 100755 --- a/build_tools/precommit_checker.py +++ b/build_tools/precommit_checker.py @@ -87,7 +87,7 @@ class PreCommitChecker(Env): def __init__(self, args): Env.__init__(self, args.logfile, args.tests) - self.stop_on_fail = args.stop_on_fail + self.ignore_failure = args.ignore_failure # # Get commands for a given job from the determinator file @@ -152,7 +152,7 @@ class PreCommitChecker(Env): if not result: self.log.error("Error running test %s" % test) self.print_result("FAIL (%dm)" % elapsed_min) - if self.stop_on_fail: + if not self.ignore_failure: return False result = False else: @@ -186,10 +186,10 @@ class PreCommitChecker(Env): parser = argparse.ArgumentParser(description='RocksDB pre-commit checker.') # --log -parser.add_argument('--logfile', default='/tmp/precommit,log', - help='Log file. Default is /tmp/precommit.log') -# --stop_on_fail -parser.add_argument('--stop_on_fail', action='store_false', default=True, +parser.add_argument('--logfile', default='/tmp/precommit-log', + help='Log file. Default is /tmp/precommit-log') +# --ignore_failure +parser.add_argument('--ignore_failure', action='store_true', default=False, help='Stop when an error occurs') # parser.add_argument('tests', nargs='+',