From patchwork Thu Dec 14 21:05:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lussier-Cullen X-Patchwork-Id: 36267 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FF0DC4332F for ; Thu, 14 Dec 2023 21:06:22 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.40113.1702587975060947233 for ; Thu, 14 Dec 2023 13:06:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=WbTFCgr9; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alexander.lussier-cullen@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id E6F129C279C for ; Thu, 14 Dec 2023 16:06:13 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032) with ESMTP id fnNiK9tF2FRS; Thu, 14 Dec 2023 16:06:13 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 93C649C36B1; Thu, 14 Dec 2023 16:06:13 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 93C649C36B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1702587973; bh=qUTOkyk8xFQwjiidMOM0tka60IzRcBEdozWaMzIc+Gg=; h=From:To:Date:Message-Id:MIME-Version; b=WbTFCgr9y+IX8wGBknBgkiKZA3TcYuruCTnuWG8l5Hv3DmeOEMTmJNYlgDh44tPuH hITZJqx+qPTCB3wlZm3Xs+bAgC7OL/j6ZOT7Ol7I+trKRhLmBsaoDQpD2KRPokwRbq qDLP1dS6P/7BvMRHw8mZINUZy5vgxDMK4jcILhUyJ+ux6m7A7oqaaqjtk64aJqqGXM TJEumYTq44y9Sv0moyh7LV7IPPaO4QzOEVOiujY9HdqxqZFBQimhN0ZluZ2w8QHPEA Zq/12aeAxS+7FXHASevTVQE1THXIebq2BKBhVaU8hteJw9fJfSAUepchhExWkyYZMf 7dZhssWQVIUbg== X-Virus-Scanned: amavis at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026) with ESMTP id UQmdIBD9g7GB; Thu, 14 Dec 2023 16:06:13 -0500 (EST) Received: from ubuntu.home (bras-base-mtrlpq427kw-grc-24-184-147-255-35.dsl.bell.ca [184.147.255.35]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 758269C279C; Thu, 14 Dec 2023 16:06:13 -0500 (EST) From: alexander.lussier-cullen@savoirfairelinux.com To: toaster@lists.yoctoproject.org Cc: Alexander Lussier-Cullen Subject: [Toaster] toaster: fix chrome argument syntax and wait for driver exit Date: Thu, 14 Dec 2023 16:05:35 -0500 Message-Id: <20231214210535.787180-1-alexander.lussier-cullen@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 14 Dec 2023 21:06:22 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/toaster/message/6095 From: Alexander Lussier-Cullen 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. Signed-off-by: Alexander Lussier-Cullen --- bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py index 46ced5a167..2c8a778f79 100644 --- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py +++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py @@ -35,7 +35,7 @@ def create_selenium_driver(cls,browser='chrome'): if browser == 'chrome': options = webdriver.ChromeOptions() - options.add_argument('headless') + options.add_argument('--headless') options.add_argument('--disable-infobars') options.add_argument('--disable-dev-shm-usage') options.add_argument('--no-sandbox') @@ -164,6 +164,8 @@ class SeleniumTestCaseBase(unittest.TestCase): """ Clean up webdriver driver """ cls.driver.quit() + # Allow driver resources to be properly freed before proceeding with further tests + time.sleep(5) super(SeleniumTestCaseBase, cls).tearDownClass() def get(self, url):