Skip to content

Commit

Permalink
No longer generate RST output when no test case is itemized
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperCraeghs committed Aug 31, 2023
1 parent 962e4ce commit 0b878ef
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mlx/robot2rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,16 @@ def main():

parser = ParserApplication(Path(args.robot_file), args.include)
parser.run()
return generate_robot_2_rst(parser, Path(args.rst_file), prefix, relationship_config,
gen_matrix, test_type=test_type, only=args.expression, coverages=coverages)
if parser.tests:
exit_code = generate_robot_2_rst(parser, Path(args.rst_file), prefix, relationship_config,
gen_matrix, test_type=test_type, only=args.expression, coverages=coverages)
else:
msg = f"robot2rst did not generate {args.rst_file} because {args.robot_file} does not contain any test cases"
if args.include:
msg += f" with tags matching all regexes {args.include}"
LOGGER.info(msg)
exit_code = 0
return exit_code


def entrypoint():
Expand Down

0 comments on commit 0b878ef

Please sign in to comment.