Skip to contentSkip to conversation

test/py: only check for SPL signature if SPL uses serial output

PATCH New Heiko Schocher 3 participants 3 messages Feb 17, 2016 – Feb 25, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 test/py: only check for SPL signature if SPL uses serial output

check for U-Boot SPL signature only if SPL really has a serial output. So check if CONFIG_SPL_SERIAL_SUPPORT is active in board config.

---
found this while trying test/py on the smartweb
board, which has SPL but no SPL serial output.

Changes in v3:
- add comments from Stephen Warren:
change incorrect "bcfg = u_boot_console.config.buildconfig" init into "bcfg = self.config.buildconfig"

Changes in v2:
- add comments from Stephen Warren:
- introduce some variables to shorten text
- do not use nested if, instead use "if a and b"
- use wrapping of 72-74 chars in commit message
- add Michal Simek to Cc

 test/py/u_boot_console_base.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
test/py/u_boot_console_base.py +7 -2
index bc2bd76..d6502c6 100644
@@ -303,8 +303,13 @@ class ConsoleBase(object):
             if not self.config.gdbserver:
                 self.p.timeout = 30000
             self.p.logfile_read = self.logstream
-            if self.config.buildconfig.get('config_spl', False) == 'y':
-                m = self.p.expect([pattern_u_boot_spl_signon] + self.bad_patterns)
+            bcfg = self.config.buildconfig
+            config_spl = bcfg.get('config_spl', 'n') == 'y'
+            config_spl_serial_support = bcfg.get('config_spl_serial_support',
+                                                 'n') == 'y'
+            if config_spl and config_spl_serial_support:
+                m = self.p.expect([pattern_u_boot_spl_signon] +
+                                  self.bad_patterns)
                 if m != 0:
                     raise Exception('Bad pattern found on console: ' +
                                     self.bad_pattern_ids[m - 1])
Signature · 1 line
2.5.0
#2 lore raw

PATCH v3 1/1 test/py: only check for SPL signature if SPL uses serial output

In reply to Heiko Schocher
Quoted 6 lines · Heiko Schocher

check for U-Boot SPL signature only if SPL really has a serial output. So check if CONFIG_SPL_SERIAL_SUPPORT is active in board config.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160225/448bf3cc/attachment.sig>