All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Toaster: bug-fix on custom image test cases
@ 2023-10-17 20:49 Alassane Yattara
  0 siblings, 0 replies; 2+ messages in thread
From: Alassane Yattara @ 2023-10-17 20:49 UTC (permalink / raw)
  To: toaster; +Cc: Alassane Yattara

To test custom image creation, a file for base_recipe should exists otherwise test fail,
User we need to build a base image first, that will create a file for base_recipe, which take a while.

To avoid test dependencies between test and run build, i create a tmp file for base recipe.

Signed-off-by Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
 lib/toaster/tests/browser/test_new_custom_image_page.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/toaster/tests/browser/test_new_custom_image_page.py b/lib/toaster/tests/browser/test_new_custom_image_page.py
index 6361f403..34d1bd45 100644
--- a/lib/toaster/tests/browser/test_new_custom_image_page.py
+++ b/lib/toaster/tests/browser/test_new_custom_image_page.py
@@ -48,8 +48,12 @@ class TestNewCustomImagePage(SeleniumTestCase):
         self.recipe = Recipe.objects.create(
             name='core-image-minimal',
             layer_version=layer_version,
+            file_path='/tmp/core-image-minimal.bb',
             is_image=True
         )
+        # create a tmp file for the recipe
+        with open(self.recipe.file_path, 'w') as f:
+            f.write('foo')
 
         # another project with a custom image already in it
         project2 = Project.objects.create(name='whoop', release=release)
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] Toaster: bug-fix on custom image test cases
@ 2023-10-17 20:48 Alassane Yattara
  0 siblings, 0 replies; 2+ messages in thread
From: Alassane Yattara @ 2023-10-17 20:48 UTC (permalink / raw)
  To: bitbake-devel; +Cc: Alassane Yattara

To test custom image creation, a file for base_recipe should exists otherwise test fail,
User we need to build a base image first, that will create a file for base_recipe, which take a while.

To avoid test dependencies between test and run build, i create a tmp file for base recipe.

Signed-off-by Alassane Yattara <alassane.yattara@savoirfairelinux.com>
---
 lib/toaster/tests/browser/test_new_custom_image_page.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/toaster/tests/browser/test_new_custom_image_page.py b/lib/toaster/tests/browser/test_new_custom_image_page.py
index 6361f403..34d1bd45 100644
--- a/lib/toaster/tests/browser/test_new_custom_image_page.py
+++ b/lib/toaster/tests/browser/test_new_custom_image_page.py
@@ -48,8 +48,12 @@ class TestNewCustomImagePage(SeleniumTestCase):
         self.recipe = Recipe.objects.create(
             name='core-image-minimal',
             layer_version=layer_version,
+            file_path='/tmp/core-image-minimal.bb',
             is_image=True
         )
+        # create a tmp file for the recipe
+        with open(self.recipe.file_path, 'w') as f:
+            f.write('foo')
 
         # another project with a custom image already in it
         project2 = Project.objects.create(name='whoop', release=release)
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-17 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17 20:49 [PATCH] Toaster: bug-fix on custom image test cases Alassane Yattara
  -- strict thread matches above, loose matches on Subject: below --
2023-10-17 20:48 Alassane Yattara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.