Minor fix to precommit-check.py

main
krad 9 years ago
parent fcc47fa5f1
commit e9c1face6c
  1. 12
      build_tools/precommit_checker.py

@ -87,7 +87,7 @@ class PreCommitChecker(Env):
def __init__(self, args): def __init__(self, args):
Env.__init__(self, args.logfile, args.tests) 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 # Get commands for a given job from the determinator file
@ -152,7 +152,7 @@ class PreCommitChecker(Env):
if not result: if not result:
self.log.error("Error running test %s" % test) self.log.error("Error running test %s" % test)
self.print_result("FAIL (%dm)" % elapsed_min) self.print_result("FAIL (%dm)" % elapsed_min)
if self.stop_on_fail: if not self.ignore_failure:
return False return False
result = False result = False
else: else:
@ -186,10 +186,10 @@ class PreCommitChecker(Env):
parser = argparse.ArgumentParser(description='RocksDB pre-commit checker.') parser = argparse.ArgumentParser(description='RocksDB pre-commit checker.')
# --log <logfile> # --log <logfile>
parser.add_argument('--logfile', default='/tmp/precommit,log', parser.add_argument('--logfile', default='/tmp/precommit-log',
help='Log file. Default is /tmp/precommit.log') help='Log file. Default is /tmp/precommit-log')
# --stop_on_fail # --ignore_failure
parser.add_argument('--stop_on_fail', action='store_false', default=True, parser.add_argument('--ignore_failure', action='store_true', default=False,
help='Stop when an error occurs') help='Stop when an error occurs')
# <test ....> # <test ....>
parser.add_argument('tests', nargs='+', parser.add_argument('tests', nargs='+',

Loading…
Cancel
Save