From 7671fdcaf6a788d80dbe002573f8b7d7f39d13c8 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 21 Oct 2024 23:37:12 +0100 Subject: [PATCH] bitbake: toaster/tests/functional/utils: Drop unused code from wait_until_build_cancelled The code modifying the build object requires direct database access which is potentially problematic. It was being run on a database which was being reset after changes anyway so the code effectively did nothing. Remove it as it is unneeded. (Bitbake rev: 2e3fa624eb3972aef91d877337479eeb0f3dd365) Signed-off-by: Richard Purdie --- bitbake/lib/toaster/tests/functional/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/bitbake/lib/toaster/tests/functional/utils.py b/bitbake/lib/toaster/tests/functional/utils.py index 7269fa1805..8e81c29984 100644 --- a/bitbake/lib/toaster/tests/functional/utils.py +++ b/bitbake/lib/toaster/tests/functional/utils.py @@ -48,7 +48,6 @@ def wait_until_build_cancelled(test_instance): """ timeout = 30 start_time = 0 - build = None while True: try: if start_time > timeout: @@ -64,11 +63,7 @@ def wait_until_build_cancelled(test_instance): if 'failed' in str(build_state).lower(): break if 'cancelling' in str(build_state).lower(): - # Change build state to cancelled - if not build: # get build object only once - build = Build.objects.last() - build.outcome = Build.CANCELLED - build.save() + pass if 'cancelled' in str(build_state).lower(): break except NoSuchElementException: