From: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
To: toaster@lists.yoctoproject.org
Cc: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Subject: [Toaster] bitbake: toaster: fix pytest build test execution and test discovery
Date: Thu, 30 Nov 2023 08:59:43 -0500 [thread overview]
Message-ID: <20231130135943.3775-1-alexander.lussier-cullen@savoirfairelinux.com> (raw)
Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
---
bitbake/lib/toaster/pytest.ini | 5 +----
bitbake/lib/toaster/tests/builds/test_core_image_min.py | 2 ++
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/bitbake/lib/toaster/pytest.ini b/bitbake/lib/toaster/pytest.ini
index f07076b7ea..071c65fcd5 100644
--- a/bitbake/lib/toaster/pytest.ini
+++ b/bitbake/lib/toaster/pytest.ini
@@ -1,9 +1,5 @@
# -- 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
@@ -17,3 +13,4 @@ addopts = --create-db --html="Toaster Tests Report.html" --self-contained-html
# https://pypi.org/project/pytest-env/
env =
TOASTER_BUILDSERVER=1
+ DJANGO_SETTINGS_MODULE=toastermain.settings_test
diff --git a/bitbake/lib/toaster/tests/builds/test_core_image_min.py b/bitbake/lib/toaster/tests/builds/test_core_image_min.py
index 9cdaa15f98..ca388eabe7 100644
--- a/bitbake/lib/toaster/tests/builds/test_core_image_min.py
+++ b/bitbake/lib/toaster/tests/builds/test_core_image_min.py
@@ -10,6 +10,7 @@
# Ionut Chisanovici, Paul Eggleton and Cristian Iorga
import os
+import pytest
from django.db.models import Q
@@ -21,6 +22,7 @@ from orm.models import CustomImagePackage
from tests.builds.buildtest import BuildTest
+@pytest.mark.django_db(True)
class BuildCoreImageMinimal(BuildTest):
"""Build core-image-minimal and test the results"""
--
2.34.1
next reply other threads:[~2023-11-30 14:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 13:59 Alexander Lussier-Cullen [this message]
2023-11-30 22:57 ` [Toaster] bitbake: toaster: fix pytest build test execution and test discovery Richard Purdie
2023-12-01 14:56 ` Alexander Lussier-Cullen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231130135943.3775-1-alexander.lussier-cullen@savoirfairelinux.com \
--to=alexander.lussier-cullen@savoirfairelinux.com \
--cc=toaster@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).