From 1c73f0ddbc9818fbc1e35c85abb6449a3e4d2034 Mon Sep 17 00:00:00 2001 From: Gwenael Lambrouin Date: Wed, 18 May 2022 12:54:20 +0000 Subject: behave_tests: fix infinite recursion Fix bug in behave_tests that occurs when behave looks for a previous result (either non-regression or characterization) in testapi database. When the result cannot be found on the first results page, behave enters an infinite recursion. Eventually, the operating system kills the python interpreter leading to a return code equal to 137. When behave is run by xtesting run_tests command, run_tests is also killed so the error is not reported by xtesting. This is now fixed. Signed-off-by: Gwenael Lambrouin Change-Id: I6b0feafb5ebadf7d0d1df6d0ee03fd22cbe6899d --- behave_tests/features/steps/steps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/behave_tests/features/steps/steps.py b/behave_tests/features/steps/steps.py index cfb5848..512a4e5 100644 --- a/behave_tests/features/steps/steps.py +++ b/behave_tests/features/steps/steps.py @@ -623,5 +623,5 @@ def get_last_result(context, reference=None, page=None): return tagged_result if last_results["pagination"]["current_page"] < last_results["pagination"]["total_pages"]: page = last_results["pagination"]["current_page"] + 1 - return get_last_result(context, page) + return get_last_result(context, reference, page) return None -- cgit 1.2.3-korg