diff options
author | Alassane Yattara <alassane.yattara@savoirfairelinux.com> | 2023-10-17 22:58:47 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-23 11:46:36 +0100 |
commit | 01e68702fe827545f483e7db026f6e9cbb0db0d4 (patch) | |
tree | 304c46b9ce6a0cba3719572fcc1f1cb6d1b96cb7 /bitbake/lib/toaster/tests | |
parent | 2403af653308e5b043071fc57c23e72c9e8fe6e8 (diff) | |
download | poky-01e68702fe827545f483e7db026f6e9cbb0db0d4.tar.gz |
bitbake: Toaster: bug-fix on tests/views/test_views.py
- Create a tmp file for base recipe, otherwise test fail it doesn't exist
(Bitbake rev: e865f6dc7c7c4f0b447806d525cd69e72c290800)
Signed-off-by: Alassane Yattara <alassane.yattara@savoirfairelinux.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/tests')
-rw-r--r-- | bitbake/lib/toaster/tests/views/test_views.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/tests/views/test_views.py b/bitbake/lib/toaster/tests/views/test_views.py index f962e76287..06bf6c20a3 100644 --- a/bitbake/lib/toaster/tests/views/test_views.py +++ b/bitbake/lib/toaster/tests/views/test_views.py | |||
@@ -41,7 +41,15 @@ class ViewTests(TestCase): | |||
41 | def setUp(self): | 41 | def setUp(self): |
42 | 42 | ||
43 | self.project = Project.objects.first() | 43 | self.project = Project.objects.first() |
44 | |||
44 | self.recipe1 = Recipe.objects.get(pk=2) | 45 | self.recipe1 = Recipe.objects.get(pk=2) |
46 | # create a file and to recipe1 file_path | ||
47 | file_path = f"/tmp/{self.recipe1.name.strip().replace(' ', '-')}.bb" | ||
48 | with open(file_path, 'w') as f: | ||
49 | f.write('foo') | ||
50 | self.recipe1.file_path = file_path | ||
51 | self.recipe1.save() | ||
52 | |||
45 | self.customr = CustomImageRecipe.objects.first() | 53 | self.customr = CustomImageRecipe.objects.first() |
46 | self.cust_package = CustomImagePackage.objects.first() | 54 | self.cust_package = CustomImagePackage.objects.first() |
47 | self.package = Package.objects.first() | 55 | self.package = Package.objects.first() |