Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail in RunFunctionalTests if tests throw exceptions. #1273

Merged
merged 1 commit into from
Nov 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cmstestsuite/RunFunctionalTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ def main():
runner = TestRunner(test_list, contest_id=args.contest, workers=4)
failures = []

testing_general_failure = False

try:
# Submit and wait for all tests to complete.
runner.submit_tests()
Expand All @@ -238,13 +240,18 @@ def main():
with open("./log/cms/last.log", "rt", encoding="utf-8") as f:
print(f.read())
print("\n\n===== END OF LOG DUMP =====\n\n")
logging.error("Failure while running tests", exc_info=True)
testing_general_failure = True
finally:
# And good night!
runner.shutdown()
runner.log_elapsed_time()

combine_coverage()

if testing_general_failure:
return 1

logger.info("Executed: %s", tests)
logger.info("Failed: %s", len(failures))
if not failures:
Expand Down
Loading