diff options
| author | Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> | 2023-12-14 16:05:35 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-15 14:37:28 +0000 |
| commit | 0fd93b86c46d96fd14a67b5ef516fdafd788efb8 (patch) | |
| tree | 0d02320f3ade52217d656ba396144996bc3fe858 | |
| parent | e63d6cb38ef63ccb64756ae225f2f38722137efd (diff) | |
| download | poky-0fd93b86c46d96fd14a67b5ef516fdafd788efb8.tar.gz | |
bitbake: toaster/tests: fix chrome argument syntax and wait for driver exit
The chrome driver sometimes fails with a page crash for a full suite
of tests, pointing to a failure in the setup of the driver due to
resource limitations.
To mitigate these crashes, add a wait between driver driven tests to
ensure resources are freed.
(Bitbake rev: 8f998e27aae694c16f788aac12558621089d0839)
Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py index b32e89d7f3..5d0489bb4e 100644 --- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py +++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | |||
| @@ -36,7 +36,7 @@ def create_selenium_driver(cls,browser='chrome'): | |||
| 36 | 36 | ||
| 37 | if browser == 'chrome': | 37 | if browser == 'chrome': |
| 38 | options = webdriver.ChromeOptions() | 38 | options = webdriver.ChromeOptions() |
| 39 | options.add_argument('headless') | 39 | options.add_argument('--headless') |
| 40 | options.add_argument('--disable-infobars') | 40 | options.add_argument('--disable-infobars') |
| 41 | options.add_argument('--disable-dev-shm-usage') | 41 | options.add_argument('--disable-dev-shm-usage') |
| 42 | options.add_argument('--no-sandbox') | 42 | options.add_argument('--no-sandbox') |
| @@ -166,6 +166,8 @@ class SeleniumTestCaseBase(unittest.TestCase): | |||
| 166 | """ Clean up webdriver driver """ | 166 | """ Clean up webdriver driver """ |
| 167 | 167 | ||
| 168 | cls.driver.quit() | 168 | cls.driver.quit() |
| 169 | # Allow driver resources to be properly freed before proceeding with further tests | ||
| 170 | time.sleep(5) | ||
| 169 | super(SeleniumTestCaseBase, cls).tearDownClass() | 171 | super(SeleniumTestCaseBase, cls).tearDownClass() |
| 170 | 172 | ||
| 171 | def get(self, url): | 173 | def get(self, url): |
