diff mbox series

binman: Correct testSplNoDtb() and Tpl also

Message ID 20210424203932.362119-1-sjg@chromium.org
State Accepted
Commit 0fe44dc676855ae195e6532e0bed56f53bd3346c
Delegated to: Simon Glass
Headers show
Series binman: Correct testSplNoDtb() and Tpl also | expand

Commit Message

Simon Glass April 24, 2021, 8:39 p.m. UTC
These two tests require an ELF image so that symbol information can be
written into the SPL/TPL binary. At present they rely on other tests
having set it up first, but every test must run independently. This can
cause occasional errors in CI.

Fix this by setting up the required files, as other tests do.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/ftest.py | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini April 24, 2021, 9:42 p.m. UTC | #1
On Sun, Apr 25, 2021 at 08:39:32AM +1200, Simon Glass wrote:

> These two tests require an ELF image so that symbol information can be
> written into the SPL/TPL binary. At present they rely on other tests
> having set it up first, but every test must run independently. This can
> cause occasional errors in CI.
> 
> Fix this by setting up the required files, as other tests do.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
Simon Glass April 29, 2021, 4:03 p.m. UTC | #2
On Sun, Apr 25, 2021 at 08:39:32AM +1200, Simon Glass wrote:

> These two tests require an ELF image so that symbol information can be
> written into the SPL/TPL binary. At present they rely on other tests
> having set it up first, but every test must run independently. This can
> cause occasional errors in CI.
>
> Fix this by setting up the required files, as other tests do.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 1f94d99bcfb..f36823f51be 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -1341,6 +1341,7 @@  class TestFunctional(unittest.TestCase):
 
     def testSplNoDtb(self):
         """Test that an image with spl/u-boot-spl-nodtb.bin can be created"""
+        self._SetupSplElf()
         data = self._DoReadFile('052_u_boot_spl_nodtb.dts')
         self.assertEqual(U_BOOT_SPL_NODTB_DATA, data[:len(U_BOOT_SPL_NODTB_DATA)])
 
@@ -4296,6 +4297,7 @@  class TestFunctional(unittest.TestCase):
 
     def testTplNoDtb(self):
         """Test that an image with tpl/u-boot-tpl-nodtb.bin can be created"""
+        self._SetupTplElf()
         data = self._DoReadFile('192_u_boot_tpl_nodtb.dts')
         self.assertEqual(U_BOOT_TPL_NODTB_DATA,
                          data[:len(U_BOOT_TPL_NODTB_DATA)])