diff options
author | Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> | 2023-12-01 09:48:33 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-06 22:37:03 +0000 |
commit | 637fdcc2b13dadc07db9c8b486893bc3a35d718e (patch) | |
tree | 83c3a790d773f55c25fc98595da9c4808b98e72a /bitbake/lib/toaster/tests | |
parent | 28f57b8ceea16505849f4bb030579b796077c606 (diff) | |
download | poky-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.py | 2 |
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 | ||
12 | import os | 12 | import os |
13 | import pytest | ||
13 | 14 | ||
14 | from django.db.models import Q | 15 | from django.db.models import Q |
15 | 16 | ||
@@ -21,6 +22,7 @@ from orm.models import CustomImagePackage | |||
21 | from tests.builds.buildtest import BuildTest | 22 | from tests.builds.buildtest import BuildTest |
22 | 23 | ||
23 | 24 | ||
25 | @pytest.mark.django_db(True) | ||
24 | class BuildCoreImageMinimal(BuildTest): | 26 | class BuildCoreImageMinimal(BuildTest): |
25 | """Build core-image-minimal and test the results""" | 27 | """Build core-image-minimal and test the results""" |
26 | 28 | ||