mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
ipatests: fix (prci_checker) duplicated check & error return code
Fix 1: timeout field was being checked twice and did not return fail code on error Fix 2: Tool did not return error code on single file check unsuccessful run Signed-off-by: David Pascual <davherna@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
parent
7d1d91fc86
commit
07927b21ba
@ -115,6 +115,7 @@ def check_jobs(filename, jobs_def, topologies, current_spec, supported_classes):
|
|||||||
if "timeout" not in args:
|
if "timeout" not in args:
|
||||||
msg = "'timeout' field should be defined in args section"
|
msg = "'timeout' field should be defined in args section"
|
||||||
print_field_error(job_name, custom_msg=msg)
|
print_field_error(job_name, custom_msg=msg)
|
||||||
|
correct_fields = False
|
||||||
if args.get("topology") not in topologies:
|
if args.get("topology") not in topologies:
|
||||||
msg = (
|
msg = (
|
||||||
"'topology' field should be defined with one of the "
|
"'topology' field should be defined with one of the "
|
||||||
@ -172,10 +173,6 @@ def check_jobs(filename, jobs_def, topologies, current_spec, supported_classes):
|
|||||||
if args.get("template") != template:
|
if args.get("template") != template:
|
||||||
print_field_error(job_name, "template", template)
|
print_field_error(job_name, "template", template)
|
||||||
correct_fields = False
|
correct_fields = False
|
||||||
if "timeout" not in args:
|
|
||||||
msg = "'timeout' field should be defined in args section"
|
|
||||||
print_field_error(job_name, custom_msg=msg)
|
|
||||||
correct_fields = False
|
|
||||||
# If build target has a copr repo, check that the job also defines it
|
# If build target has a copr repo, check that the job also defines it
|
||||||
if args.get("copr") != copr:
|
if args.get("copr") != copr:
|
||||||
if copr and copr_defined:
|
if copr and copr_defined:
|
||||||
@ -391,7 +388,7 @@ def main():
|
|||||||
jobs_spec, supported_classes, f_fixed_jobs = process_spec_file(args.spec)
|
jobs_spec, supported_classes, f_fixed_jobs = process_spec_file(args.spec)
|
||||||
|
|
||||||
if args.file:
|
if args.file:
|
||||||
result = process_def_file(args.file, jobs_spec, supported_classes)
|
result = process_def_file(args.file, jobs_spec, supported_classes)[0]
|
||||||
else:
|
else:
|
||||||
# Get all yaml files in default dir, except those in IGNORE_FILES
|
# Get all yaml files in default dir, except those in IGNORE_FILES
|
||||||
def_files_dir = os.path.join(args.defs, "*.y*ml")
|
def_files_dir = os.path.join(args.defs, "*.y*ml")
|
||||||
|
Loading…
Reference in New Issue
Block a user