summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/tests
diff options
context:
space:
mode:
authorAlexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>2023-12-01 09:48:33 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-06 22:37:03 +0000
commit637fdcc2b13dadc07db9c8b486893bc3a35d718e (patch)
tree83c3a790d773f55c25fc98595da9c4808b98e72a /bitbake/lib/toaster/tests
parent28f57b8ceea16505849f4bb030579b796077c606 (diff)
downloadpoky-637fdcc2b13dadc07db9c8b486893bc3a35d718e.tar.gz
bitbake: toaster: fix pytest build test execution and test discovery
Ensure the proper django settings are used by moving the variable to the environment assignment. Remove python file specifier as this works relative to the working directory, which can vary. The test file directory can instead be specified when executing the pytest command. Add annotations required to allow database access with pytest to the build tests. (Bitbake rev: 7f4dfaa5bd28ccf1ae0122d984ffa7e02e693960) Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> CC: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/tests')
-rw-r--r--bitbake/lib/toaster/tests/builds/test_core_image_min.py2
1 files changed, 2 insertions, 0 deletions
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 @@
10# Ionut Chisanovici, Paul Eggleton and Cristian Iorga 10# Ionut Chisanovici, Paul Eggleton and Cristian Iorga
11 11
12import os 12import os
13import pytest
13 14
14from django.db.models import Q 15from django.db.models import Q
15 16
@@ -21,6 +22,7 @@ from orm.models import CustomImagePackage
21from tests.builds.buildtest import BuildTest 22from tests.builds.buildtest import BuildTest
22 23
23 24
25@pytest.mark.django_db(True)
24class BuildCoreImageMinimal(BuildTest): 26class BuildCoreImageMinimal(BuildTest):
25 """Build core-image-minimal and test the results""" 27 """Build core-image-minimal and test the results"""
26 28