diff options
| -rw-r--r-- | bitbake/lib/toaster/tests/functional/utils.py | 7 |
1 files changed, 1 insertions, 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): | |||
| 48 | """ | 48 | """ |
| 49 | timeout = 30 | 49 | timeout = 30 |
| 50 | start_time = 0 | 50 | start_time = 0 |
| 51 | build = None | ||
| 52 | while True: | 51 | while True: |
| 53 | try: | 52 | try: |
| 54 | if start_time > timeout: | 53 | if start_time > timeout: |
| @@ -64,11 +63,7 @@ def wait_until_build_cancelled(test_instance): | |||
| 64 | if 'failed' in str(build_state).lower(): | 63 | if 'failed' in str(build_state).lower(): |
| 65 | break | 64 | break |
| 66 | if 'cancelling' in str(build_state).lower(): | 65 | if 'cancelling' in str(build_state).lower(): |
| 67 | # Change build state to cancelled | 66 | pass |
| 68 | if not build: # get build object only once | ||
| 69 | build = Build.objects.last() | ||
| 70 | build.outcome = Build.CANCELLED | ||
| 71 | build.save() | ||
| 72 | if 'cancelled' in str(build_state).lower(): | 67 | if 'cancelled' in str(build_state).lower(): |
| 73 | break | 68 | break |
| 74 | except NoSuchElementException: | 69 | except NoSuchElementException: |
