* [U-Boot] [PATCH v2] test/py: only check for SPL signature if SPL uses serial output
@ 2016-02-17 6:48 Heiko Schocher
2016-02-17 16:45 ` Stephen Warren
0 siblings, 1 reply; 3+ messages in thread
From: Heiko Schocher @ 2016-02-17 6:48 UTC (permalink / raw)
To: u-boot
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.
Signed-off-by: Heiko Schocher <hs@denx.de>
---
found this while trying test/py on the smartweb
board, which has SPL but no SPL serial output.
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(-)
diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py
index bc2bd76..79b8dc6 100644
--- a/test/py/u_boot_console_base.py
+++ b/test/py/u_boot_console_base.py
@@ -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 = u_boot_console.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])
--
2.5.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] test/py: only check for SPL signature if SPL uses serial output
2016-02-17 6:48 [U-Boot] [PATCH v2] test/py: only check for SPL signature if SPL uses serial output Heiko Schocher
@ 2016-02-17 16:45 ` Stephen Warren
2016-02-17 17:30 ` Heiko Schocher
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2016-02-17 16:45 UTC (permalink / raw)
To: u-boot
On 02/16/2016 11:48 PM, Heiko Schocher wrote:
> 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.
I suspect you didn't test this; it causes all tests to fail on all
platforms...
> diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py
> + bcfg = u_boot_console.config.buildconfig
I think that should be self.config.buildconfig instead; there is no
u_boot_console variable at this point in the code.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] test/py: only check for SPL signature if SPL uses serial output
2016-02-17 16:45 ` Stephen Warren
@ 2016-02-17 17:30 ` Heiko Schocher
0 siblings, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2016-02-17 17:30 UTC (permalink / raw)
To: u-boot
Hello Stephen,
Am 17.02.2016 um 17:45 schrieb Stephen Warren:
> On 02/16/2016 11:48 PM, Heiko Schocher wrote:
>> 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.
>
> I suspect you didn't test this; it causes all tests to fail on all platforms...
Damn, yes, seems I overlooked this issue, while trying to get
test/py running for the smartweb board.
>> diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py
>
>> + bcfg = u_boot_console.config.buildconfig
>
> I think that should be self.config.buildconfig instead; there is no u_boot_console variable at this
> point in the code.
fixed.
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-17 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-17 6:48 [U-Boot] [PATCH v2] test/py: only check for SPL signature if SPL uses serial output Heiko Schocher
2016-02-17 16:45 ` Stephen Warren
2016-02-17 17:30 ` Heiko Schocher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox