It's test.py --check-deletions

Rename the option as suggested by Anne in
https://review.openstack.org/48128
Remove now obsolete options --gate-build and --gate-niceness.
Add option check-all.

Change-Id: Id918bf22a33a485b2bd398292d3ae58b4d39a535
This commit is contained in:
Andreas Jaeger 2013-09-25 05:45:43 +02:00
parent 99f1ea6ada
commit 21cd991877
1 changed files with 10 additions and 16 deletions

26
test.py
View File

@ -482,19 +482,17 @@ def build_affected_books(rootdir, book_exceptions, file_exceptions,
def main(args):
if args.check_all:
args.check_deletion = True
args.check_syntax = True
args.check_build = True
args.check_niceness = True
if not args.force and only_www_touched():
print("Only files in www directory changed, nothing to do.")
return
if args.job_build:
args.check_delete = True
args.check_syntax = True
args.check_build = True
if args.job_niceness:
args.check_niceness = True
if args.check_delete:
if args.check_deletions:
check_deleted_files(args.path, FILE_EXCEPTIONS, args.verbose)
if args.check_syntax or args.check_niceness:
@ -537,20 +535,16 @@ if __name__ == '__main__':
"modified files", action="store_true")
parser.add_argument("--check-syntax", help="Check the syntax of modified "
"files", action="store_true")
parser.add_argument("--check-delete", help="Check that deleted files "
parser.add_argument("--check-deletions", help="Check that deleted files "
"are not used.", action="store_true")
parser.add_argument("--check-niceness", help="Check the niceness of "
"files, for example whitespace.",
action="store_true")
parser.add_argument("--check-all", help="Run all checks",
action="store_true")
parser.add_argument("--non-voting", help="Do not exit on failures",
action="store_false")
parser.add_argument("--verbose", help="Verbose execution",
action="store_true")
parser.add_argument("--job-niceness", help="Override values "
"for running as niceness gate-job",
action="store_true")
parser.add_argument("--job-build", help="Override values "
"for running as build gate-job",
action="store_true")
args = parser.parse_args()
main(args)