From patchwork Thu Nov 9 15:56:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34171 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 66C39C4332F for ; Thu, 9 Nov 2023 15:56:26 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.125361.1699545385754626948 for ; Thu, 09 Nov 2023 07:56:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=JU1TWZs0; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id A9C659C34B2 for ; Thu, 9 Nov 2023 10:56:23 -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 izLcdEzIP52x; Thu, 9 Nov 2023 10:56:23 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 401889C2CF2; Thu, 9 Nov 2023 10:56:23 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 401889C2CF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1699545383; bh=HNEwh15gbBG152j7VR387hSlJFFLpMZTQmE/+2V/VmU=; h=From:To:Date:Message-Id:MIME-Version; b=JU1TWZs03naTCk9XZ4Ap5mRjK4l4rInpqtnzfQbtp1LtG35G44Xql0Fwrf4SF7kY8 HVw6nPb5g+2iJ+RjYh0cYa3JuyZ9aZpxdECVvROizk2nZUH36/rysTx+9HPw70f0qO eRtDHR1Rdc9yfhmreCCTtQezz25DvI9MUqGQF99g4ov8JRUW5Opxf3I1Zb5hAleEGI YQroBXZg8NHYvGWXYCa62ztrshwjjoGLyST3FrvcRoYkgcPcEej0RsxmNzfuW3hjOj k0feFB8bsDOl0Vvd9nGLlvrSkPrt56XQTItmZ7Ugy2gdJ0kzsdimPnfuef49fMwMvN 3QMqNmTqoNHVw== 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 47WSScRyo3AE; Thu, 9 Nov 2023 10:56:23 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 895359C27A3; Thu, 9 Nov 2023 10:56:22 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH v3 1/8] Toaster: Update toaster-requirements.txt to add pytest and some plugin's Date: Thu, 9 Nov 2023 16:56:11 +0100 Message-Id: <20231109155618.133124-1-alassane.yattara@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, 09 Nov 2023 15:56:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15463 The pytest framework makes it easy to write small, readable tests, and can scale to support complex functional testing for applications and libraries. - Pytest-html is a plugin for pytest that generates a HTML report for test results. - Pytest-django allows us to test Django project/applications with the pytest testing tool. - Pytest-env is a pytest plugin that enables us to set environment variables in a pytest.ini or pyproject.toml file - Pytest-metadata is a plugin for pytest that provides access to test session metadata, required by pytest-html plugin to provides metadata information in the HTML report like below: Python 3.10.12 Platform Linux-6.2.0-35-generic-x86_64-with-glibc2.35 Packages: - pytest: 7.4.2 - pluggy: 1.3.0 Plugins : - django: 4.5.2 - metadata: 3.0.0 - order: 1.1.0 - html: 4.0.2 - env: 1.1.0 Signed-off-by: Alassane Yattara --- toaster-requirements.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/toaster-requirements.txt b/toaster-requirements.txt index d8e48b7f..19bf6fd2 100644 --- a/toaster-requirements.txt +++ b/toaster-requirements.txt @@ -2,3 +2,8 @@ Django>4.2,<4.3 beautifulsoup4>=4.4.0 pytz django-log-viewer==1.1.7 +pytest==7.4.2 +pytest-django==4.5.2 +pytest-env==1.1.0 +pytest-html==4.0.2 +pytest-metadata==3.0.0 From patchwork Thu Nov 9 15:56:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34172 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 6C327C4167D for ; Thu, 9 Nov 2023 15:56:26 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.125362.1699545386077188329 for ; Thu, 09 Nov 2023 07:56:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=VRej1zAA; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 742729C34C3 for ; Thu, 9 Nov 2023 10:56:24 -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 yULjVC3SC8Fn; Thu, 9 Nov 2023 10:56:24 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 1044B9C2CF2; Thu, 9 Nov 2023 10:56:24 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 1044B9C2CF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1699545384; bh=+m/KNy2AMqWB1h1tnjZcHiD38duvHCRhaP6gbInNBKI=; h=From:To:Date:Message-Id:MIME-Version; b=VRej1zAAsLN5zr7lp7SZPFyoLgPLMiLwmfkm3a/aYotftJE5d2ol1jCRTYzQbQ9CV bfxy1hMaikp4JIKKAvzntaGYEpf87luHVF0uwtm4BpMY6+wSOuVXCS3dF903O3mJI7 B3z3kubuxUDJDJ02K8EzOKz0l7MFGvCAfq16U2QHmUJILL9JrP7g4zxMeKOL9vrjP6 ElckzG1cnOu/G0QRhyy1LCU5zeeZq7IcnRR5w0f9LmgUTC1G0hPCja4fFnAsbXN3dq JNwmm5lF9cE9omOqK5YaOww27DUWIJoNSV7N+O4eNHl1I/a1wbcw/mNTZr1aKKEyZW Lw3dCsAVH+SIQ== 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 cRb3z5WgBgka; Thu, 9 Nov 2023 10:56:24 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 7BC239C27A3; Thu, 9 Nov 2023 10:56:23 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH v3 2/8] Toaster: Update orm.models to catch error ProcessLookupError Date: Thu, 9 Nov 2023 16:56:12 +0100 Message-Id: <20231109155618.133124-2-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> References: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> 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, 09 Nov 2023 15:56:26 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15464 - catch error ProcessLookupError and logs it Signed-off-by: Alassane Yattara --- lib/toaster/orm/models.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/toaster/orm/models.py b/lib/toaster/orm/models.py index 0d503a51..1098ad3f 100644 --- a/lib/toaster/orm/models.py +++ b/lib/toaster/orm/models.py @@ -1389,9 +1389,6 @@ class Machine(models.Model): return "Machine " + self.name + "(" + self.description + ")" - - - class BitbakeVersion(models.Model): name = models.CharField(max_length=32, unique = True) @@ -1853,6 +1850,8 @@ def signal_runbuilds(): os.kill(int(pidf.read()), SIGUSR1) except FileNotFoundError: logger.info("Stopping existing runbuilds: no current process found") + except ProcessLookupError: + logger.warning("Stopping existing runbuilds: process lookup not found") class Distro(models.Model): search_allowed_fields = ["name", "description", "layer_version__layer__name"] From patchwork Thu Nov 9 15:56:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34174 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 6AB5FC4332F for ; Thu, 9 Nov 2023 15:56:36 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.125363.1699545386416657226 for ; Thu, 09 Nov 2023 07:56:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=XTwT+PDg; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 68AEB9C34C9 for ; Thu, 9 Nov 2023 10:56:25 -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 pKjvIAlt6D33; Thu, 9 Nov 2023 10:56:25 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id DFA3E9C2CF2; Thu, 9 Nov 2023 10:56:24 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com DFA3E9C2CF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1699545384; bh=GesLj5+Tfp6+cElUD4N1oiRTqPVAwnFMvCqk+qYl7BU=; h=From:To:Date:Message-Id:MIME-Version; b=XTwT+PDgsxY7HOqHr67a5Tt/gtbucG3+NS/uLP44AYjzzxEuh9YmL8jdr01fFbjXn Wc7PZRq3jL1OvmLXWlm+52PW2YRw6tPqF1R454eXlHnQWX+OdU0LcBCieqfkmqRPB2 lLm5J0eJVrD+GadhcufBKl7Vb3cLEVKsicijlxAi2cZe1qSceGcTxoJS5Qr/cmt/lv tmLBBBCTnaOFSXSkBlAoCmsV5nUIsq+U0pfDucSSr3mfKJL9w/EYAJG3vU62Y7gD4E 5I37DO9wsS66BNMjSHD6XMdtAt2Pq1j92ZSX2EUVBYUGWavUQ5bt3ylBSlxK8QeH8T z5B+1E1bDJAcQ== 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 luavEeMHKq9j; Thu, 9 Nov 2023 10:56:24 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 443059C27A3; Thu, 9 Nov 2023 10:56:24 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH v3 3/8] Toaster: Bug-fix pytest and Failed: Database access not allowed Date: Thu, 9 Nov 2023 16:56:13 +0100 Message-Id: <20231109155618.133124-3-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> References: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> 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, 09 Nov 2023 15:56:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15465 Remove load and create build environment from tests/functional/functional_helpers - Testcases in the FunctionalTestCase do not require a build process, - Also marked setUpClass or class with pytest django_db, db ... not working, as declared above of file functional_helpers.py, The database access process runs as an external process, separate from the test case process and outside the context of pytest. Signed-off-by: Alassane Yattara --- lib/toaster/tests/functional/functional_helpers.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/toaster/tests/functional/functional_helpers.py b/lib/toaster/tests/functional/functional_helpers.py index c3191f66..b80d403b 100644 --- a/lib/toaster/tests/functional/functional_helpers.py +++ b/lib/toaster/tests/functional/functional_helpers.py @@ -15,8 +15,6 @@ import time import re from tests.browser.selenium_helpers_base import SeleniumTestCaseBase -from tests.builds.buildtest import load_build_environment -from bldcontrol.models import BuildEnvironment from selenium.webdriver.common.by import By from selenium.common.exceptions import NoSuchElementException @@ -33,10 +31,6 @@ class SeleniumFunctionalTestCase(SeleniumTestCaseBase): raise RuntimeError("Please initialise django with the tests settings: " \ "DJANGO_SETTINGS_MODULE='toastermain.settings_test'") - if BuildEnvironment.objects.count() == 0: - BuildEnvironment.objects.create(betype=BuildEnvironment.TYPE_LOCAL) - load_build_environment() - # start toaster cmd = "bash -c 'source toaster start'" p = subprocess.Popen( From patchwork Thu Nov 9 15:56:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34178 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 7F2D4C4167B for ; Thu, 9 Nov 2023 15:56:36 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.125364.1699545387034909572 for ; Thu, 09 Nov 2023 07:56:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=WzobM6SW; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 60F9C9C34B2 for ; Thu, 9 Nov 2023 10:56:26 -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 e85gA6b3vIuZ; Thu, 9 Nov 2023 10:56:25 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id DF3139C2CF2; Thu, 9 Nov 2023 10:56:25 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com DF3139C2CF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1699545385; bh=wIHbE11BWKitYZkfAFNEA6bXcaZDEe9cTiCXpyD4qwk=; h=From:To:Date:Message-Id:MIME-Version; b=WzobM6SWqivxIR9DYsC8BVlg3wgPQpI/FmAug7vS1XgWQt9SIYELMS0VM8mQxNBZO 4JNIJcuKXaZ5eEyTrYwIeqcRZ/XeSkQCxnqME2pJRO34N/b1h5JIpHFrqju09HBarO 4BhstmqT8TqwOVUXssbe9RGN4NyIOYNd6PizKladw+hfV1mnO8p6G8h9lFDWE+eRYh SWjsoAT0LTogWXNUcadWh33vBpPTvLeHGcPayN7znoUa8qGU4M4oB+CluVH2k+oxoJ l63ofPprmopCy7Tl2Badf79vQqeEC45r2GLCi1yUzYTn6dfKzL3d4+jKd6AXLCap7c rYiIhC7menJdg== 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 rdS0jzclFU0i; Thu, 9 Nov 2023 10:56:25 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 23A0B9C27A3; Thu, 9 Nov 2023 10:56:25 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH v3 4/8] Toaster: fixed pytest error: Database access not allowed, use the "django_db" Date: Thu, 9 Nov 2023 16:56:14 +0100 Message-Id: <20231109155618.133124-4-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> References: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> 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, 09 Nov 2023 15:56:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15466 Pytest failed on functional/test_functional_basic because database access not allowed - we should use "django_db" fixture to allowed db access Note: Pytest-django takes a conservative approach to enabling database access. By default your tests will fail if they try to access the database. Only if you explicitly request database access will this be allowed. https://pytest-django.readthedocs.io/en/latest/helpers.html#pytest-mark-django-db-request-database-access Signed-off-by: Alassane Yattara --- lib/toaster/tests/functional/test_functional_basic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/toaster/tests/functional/test_functional_basic.py b/lib/toaster/tests/functional/test_functional_basic.py index b0def544..7e9be91c 100644 --- a/lib/toaster/tests/functional/test_functional_basic.py +++ b/lib/toaster/tests/functional/test_functional_basic.py @@ -8,6 +8,7 @@ # import re, time +import pytest from django.urls import reverse from tests.functional.functional_helpers import SeleniumFunctionalTestCase from orm.models import Project @@ -16,6 +17,7 @@ from selenium.webdriver.common.by import By class FuntionalTestBasic(SeleniumFunctionalTestCase): # testcase (1514) + @pytest.mark.django_db def test_create_slenium_project(self): project_name = 'selenium-project' self.get(reverse('newproject')) From patchwork Thu Nov 9 15:56:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34176 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 891C9C001B2 for ; Thu, 9 Nov 2023 15:56:36 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.125366.1699545388401935171 for ; Thu, 09 Nov 2023 07:56:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=NSHh7IOm; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 4FA969C34B2 for ; Thu, 9 Nov 2023 10:56:27 -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 hIjRw5a_BoUN; Thu, 9 Nov 2023 10:56:27 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id E5B959C2CF2; Thu, 9 Nov 2023 10:56:26 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com E5B959C2CF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1699545386; bh=p2J+od2B1eMImjzJ6UqaVnL/r0kbwNU9wZ1YSW48g4U=; h=From:To:Date:Message-Id:MIME-Version; b=NSHh7IOmEvjSuCrLHRqODTPBD+ED6M4LY1RxvizCxOf73i3Cau0McZftPO60vhOF4 OVp/IKvncJWx0wgcqNVzecmV4Hp1pzRgIlSmDifbmxv07TKFK4JoTNR3cVHpZPz0u9 o1cMoXPA6nZlxaCF7LlvsMUdOi2oaHlQqEcVR3h/w/HrVc3H2BAPNH2JQgojeqIWej 3x7KRNoPJG432K4OqNjlURhHwhIDLtR8YfTjZ16sj93Djt1yZHQgObkzty+1ereb46 /tLM+92fmoUG1bRRJ7vzFKeoQeadUTPUcBhFVv1ndcFS7Mdy5z/Znr1vFTFeGHAcGs xyhUpXuwWDKaA== 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 m4xBrg9WCmqc; Thu, 9 Nov 2023 10:56:26 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 1E4C29C27A3; Thu, 9 Nov 2023 10:56:25 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH v3 5/8] Toaster: Bug-fix django.db.utils.IntegrityError: Problem installing fixture Date: Thu, 9 Nov 2023 16:56:15 +0100 Message-Id: <20231109155618.133124-5-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> References: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> 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, 09 Nov 2023 15:56:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15467 toastergui-unittest-data.xml fixture contains a release objects with name="master" or an release with same name seem existing - Change release name and fix bitbakeversion instead of bitbake_version Signed-off-by: Alassane Yattara --- lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml b/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml index 1d522f88..df106934 100644 --- a/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml +++ b/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml @@ -19,9 +19,9 @@ poky_distro2 description - master + foo_master master project - 1 + 1 a test project From patchwork Thu Nov 9 15:56:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34177 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 9771AC04E85 for ; Thu, 9 Nov 2023 15:56:36 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.125084.1699545389098939479 for ; Thu, 09 Nov 2023 07:56:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=Hqcyphuv; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 770609C34C3 for ; Thu, 9 Nov 2023 10:56:28 -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 gyNNBwvwxIl4; Thu, 9 Nov 2023 10:56:28 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 094A49C347B; Thu, 9 Nov 2023 10:56:28 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 094A49C347B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1699545388; bh=9ZmjA4jVXRKl7D0tU2mh3T4CRmbXyy0ig+56aOGFxaw=; h=From:To:Date:Message-Id:MIME-Version; b=HqcyphuvDW7gXM5Vfm0dd7/jBcarqdT3GTPkQnvGWlITl7fJXPfTld5okqvL3cx3Z E4opX9icvemLxSJgCOntJJUHD/3AYtxbszD6th6pg0sGRQDPP7veq6fYzpMb9XR3Kq rGyeoMdY2yCIPnlCz8Df9YE5okMkFnHlrHh3rO2Osrx61C1Y4+nFvDSpeEIwGdvHAG mvzeazJLctO63Yoo+w01Vw3vpwlhPwb6IfOfV4jGQZ7Z53V4eNHmiwuQGcl13LYDXP shos3tvauyrpF/GttlEYfR4p73gcr6ft7PabWtidtOAQagJuSdX32DfT1DNXGHqLsJ cK0Iyz0S5yAig== 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 Dcgm_ZhcIWrS; Thu, 9 Nov 2023 10:56:27 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 2F8069C27A3; Thu, 9 Nov 2023 10:56:27 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH v3 6/8] Toaster: Move toaster tests requirements in bitbake/lib/toaster/toaster-tests-requirements Date: Thu, 9 Nov 2023 16:56:16 +0100 Message-Id: <20231109155618.133124-6-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> References: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> 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, 09 Nov 2023 15:56:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15468 To make difference between bitbake and toaster python requirements, a dedicated requirements file is created for toaster in root of toaster dir. Signed-off-by: Alassane Yattara --- lib/toaster/tests/toaster-tests-requirements.txt | 5 +++++ toaster-requirements.txt | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/toaster/tests/toaster-tests-requirements.txt b/lib/toaster/tests/toaster-tests-requirements.txt index f30ac070..7109c625 100644 --- a/lib/toaster/tests/toaster-tests-requirements.txt +++ b/lib/toaster/tests/toaster-tests-requirements.txt @@ -1 +1,6 @@ selenium>=4.13.0 +pytest==7.4.2 +pytest-django==4.5.2 +pytest-env==1.1.0 +pytest-html==4.0.2 +pytest-metadata==3.0.0 diff --git a/toaster-requirements.txt b/toaster-requirements.txt index 19bf6fd2..d8e48b7f 100644 --- a/toaster-requirements.txt +++ b/toaster-requirements.txt @@ -2,8 +2,3 @@ Django>4.2,<4.3 beautifulsoup4>=4.4.0 pytz django-log-viewer==1.1.7 -pytest==7.4.2 -pytest-django==4.5.2 -pytest-env==1.1.0 -pytest-html==4.0.2 -pytest-metadata==3.0.0 From patchwork Thu Nov 9 15:56:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34175 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 7B11EC41535 for ; Thu, 9 Nov 2023 15:56:36 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web11.125367.1699545391177236370 for ; Thu, 09 Nov 2023 07:56:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=KT3edaGj; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 84DE59C34C3 for ; Thu, 9 Nov 2023 10:56:29 -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 ayUxm0eWHtpJ; Thu, 9 Nov 2023 10:56:29 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id C910C9C347B; Thu, 9 Nov 2023 10:56:28 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com C910C9C347B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1699545388; bh=+5uZZBBn17ErJhYtUSTuu9jVZ2vwwTzGT4O4Jw8pWWc=; h=From:To:Date:Message-Id:MIME-Version; b=KT3edaGjbTTcMtMLuzKERZykWL2+8p1sI8r6jTUX2nDcvilhZ+VWaGgPZFidaHIwp mpkCnehnMz+u6qtyVfifSeoh4V7YBTHlRieyFRpij/JkXaqgEEHiFFTdD1j8mxyzld q7I8Zg2CgLx2twtk03cgE5ZmLk5AmCZgP1zmcJCBmRXqkOrF1GTIwE53kAgpXSUNlO 1z/73ep1ImOvYftK1HjKvlVbfTATD5M7BmtKUfCzOZjS968249KoV5bB4OWRBJvFpu /w+y7V+l9P8uqDMyF8i/y9AMuN1QMQervJCXvhPM8FrOrcqGuU/13V86JLpWWNV3i9 zySjgrHHJUSFQ== 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 GiqFgz0berwq; Thu, 9 Nov 2023 10:56:28 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 31D2F9C27A3; Thu, 9 Nov 2023 10:56:28 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH v3 7/8] Toaster: fixed: Tests fail when executed one after the other out of sequence Date: Thu, 9 Nov 2023 16:56:17 +0100 Message-Id: <20231109155618.133124-7-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> References: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> 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, 09 Nov 2023 15:56:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15469 As mentionned in earlier commit, pytest-django takes a conservative approach to enabling database access. By default our tests will fail if they try to access the database, Only if we explicitly request database access will this be allowed, using pytest marks to tell pytest-django our test needs database access. A side effect of pytest mark, is test_case method marked is execute out of scope of its module class, which create an inconsistance sequence and make fails followings tests. The scope of the ordering is global per default, e.g. tests with lower ordinal numbers are always executed before tests with higher numbers in the same test session, regardless of the module and class they reside in. This can be changed by using the --order-scope option from module pytest-order. To fix that i added execution order to tests suite using pytest-order. Signed-off-by: Alassane Yattara --- lib/toaster/tests/functional/test_functional_basic.py | 4 +++- lib/toaster/tests/toaster-tests-requirements.txt | 1 + lib/toaster/tests/views/test_views.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/toaster/tests/functional/test_functional_basic.py b/lib/toaster/tests/functional/test_functional_basic.py index 7e9be91c..f558cce8 100644 --- a/lib/toaster/tests/functional/test_functional_basic.py +++ b/lib/toaster/tests/functional/test_functional_basic.py @@ -8,12 +8,14 @@ # import re, time -import pytest from django.urls import reverse +import pytest from tests.functional.functional_helpers import SeleniumFunctionalTestCase from orm.models import Project from selenium.webdriver.common.by import By + +@pytest.mark.order("last") class FuntionalTestBasic(SeleniumFunctionalTestCase): # testcase (1514) diff --git a/lib/toaster/tests/toaster-tests-requirements.txt b/lib/toaster/tests/toaster-tests-requirements.txt index 7109c625..71cc0834 100644 --- a/lib/toaster/tests/toaster-tests-requirements.txt +++ b/lib/toaster/tests/toaster-tests-requirements.txt @@ -4,3 +4,4 @@ pytest-django==4.5.2 pytest-env==1.1.0 pytest-html==4.0.2 pytest-metadata==3.0.0 +pytest-order==1.1.0 diff --git a/lib/toaster/tests/views/test_views.py b/lib/toaster/tests/views/test_views.py index 06bf6c20..349881eb 100644 --- a/lib/toaster/tests/views/test_views.py +++ b/lib/toaster/tests/views/test_views.py @@ -9,6 +9,7 @@ """Test cases for Toaster GUI and ReST.""" +import pytest from django.test import TestCase from django.test.client import RequestFactory from django.urls import reverse @@ -33,6 +34,7 @@ PROJECT_NAME2 = "test project 2" CLI_BUILDS_PROJECT_NAME = 'Command line builds' +@pytest.mark.order(1) class ViewTests(TestCase): """Tests to verify view APIs.""" From patchwork Thu Nov 9 15:56:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alassane Yattara X-Patchwork-Id: 34173 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 6E49CC4167D for ; Thu, 9 Nov 2023 15:56:36 +0000 (UTC) Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44]) by mx.groups.io with SMTP id smtpd.web10.125087.1699545392617890980 for ; Thu, 09 Nov 2023 07:56:32 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@savoirfairelinux.com header.s=DFC430D2-D198-11EC-948E-34200CB392D2 header.b=Wtjyl3md; spf=pass (domain: savoirfairelinux.com, ip: 208.88.110.44, mailfrom: alassane.yattara@savoirfairelinux.com) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 7D7DD9C347B for ; Thu, 9 Nov 2023 10:56:30 -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 UbFX_r4a3RsA; Thu, 9 Nov 2023 10:56:29 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id C95459C2CF2; Thu, 9 Nov 2023 10:56:29 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com C95459C2CF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2; t=1699545389; bh=BPR02CalnQGhc+d1+wUbGs41++5XFhSUW+8cTF1uJz8=; h=From:To:Date:Message-Id:MIME-Version; b=Wtjyl3mduDJkZ2fGptBztpVnkdFr4QqsWiwDVED4k9ckdO/yijkOaZ1nDnUBT/1I4 MzLdQ46TbBAsQ9qFViymMOe5GwUdtVZAmJiH3Fh+ycGiRaaBd6IQ8FdtN6bhXSTRrn 5FFic3BMfZMVFfTYRXbmi3HYFabnFQE1rA9ZaAtBSMkRPLDUBs9tJ7ZjLpF4MItWIg MwncAZagK/t5LrUNWgpMRJ9daTua6IKOqhf1ud4puisnC0VlwRNoGxHMXFK+aHesIg dS5ImWYyLRugJj637BeHaHAKG1rOpwxg+4vSVVtae10sq8VfOEi97+R/Bkn8jiWHJn MkiIVIurRhJng== 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 1c8TpUGcdv_4; Thu, 9 Nov 2023 10:56:29 -0500 (EST) Received: from jedi.. (unknown [196.127.183.75]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 128679C34B2; Thu, 9 Nov 2023 10:56:28 -0500 (EST) From: Alassane Yattara To: bitbake-devel@lists.openembedded.org Cc: Alassane Yattara Subject: [PATCH v3 8/8] Toaster: Added pytest.ini file Date: Thu, 9 Nov 2023 16:56:18 +0100 Message-Id: <20231109155618.133124-8-alassane.yattara@savoirfairelinux.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> References: <20231109155618.133124-1-alassane.yattara@savoirfairelinux.com> 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, 09 Nov 2023 15:56:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15470 The main reason for using pytest is to be able to generate a positive test report using the pytest-html plugin. Integrating Pytest with Tox is a straightforward process, this can be done using tox.ini instead of pytest.ini used to configure pytest, that is another reason for using pytest. Tox is a tool that automates testing across different virtual environments, it can help ensure application will be tested against multiple Python versions and environments. https://github.com/pytest-dev/pytest/blob/main/tox.ini Generated reports create a historical record of test results over time. This can help track the progress of the application's stability and quality Documentation and Transparency: Test reports provide us a clear and detailed documentation of the test results. They show what tests were executed, which ones passed, and which ones failed. This transparency is critical for understanding the current state of the application and its test coverage. Communication: Test reports are an effective means of communication among community to understand the testing progress and results. Debugging, Troubleshooting Historical Tracking and Regression Testing: In case of test failures, a detailed test report can be invaluable for debugging. It provides information about the specific test case that failed, the input data used, and any error messages. Signed-off-by: Alassane Yattara --- lib/toaster/pytest.ini | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/toaster/pytest.ini diff --git a/lib/toaster/pytest.ini b/lib/toaster/pytest.ini new file mode 100644 index 00000000..f07076b7 --- /dev/null +++ b/lib/toaster/pytest.ini @@ -0,0 +1,19 @@ +# -- FILE: pytest.ini (or tox.ini) +[pytest] +DJANGO_SETTINGS_MODULE = toastermain.settings_test + +python_files = db/test_*.py commands/test_*.py views/test_*.py browser/test_*.py functional/test_*.py + +# --create-db - force re creation of the test database +# https://pytest-django.readthedocs.io/en/latest/database.html#create-db-force-re-creation-of-the-test-database + +# --html=report.html --self-contained-html +# https://docs.pytest.org/en/latest/usage.html#creating-html-reports +# https://pytest-html.readthedocs.io/en/latest/user_guide.html#creating-a-self-contained-report +addopts = --create-db --html="Toaster Tests Report.html" --self-contained-html + +# Define environment variables using pytest-env +# A pytest plugin that enables you to set environment variables in the pytest.ini file. +# https://pypi.org/project/pytest-env/ +env = + TOASTER_BUILDSERVER=1