mirror of
https://git.yoctoproject.org/poky
synced 2026-04-23 00:32:12 +02:00
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 <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user