[U-Boot] Logging SPL output with test/py

Hi Stephen,
I'd like to get access to SPL output from a test. It seems that only the output from U-Boot proper is logged, although I cannot see why.
For background, I have a new sandbox_spl target which includes SPL code. I will likely merge it into the normal sandbox target...
It is definitely running SPL because I see the SPL console output when I use the -s flag to test.py. But it does not appear in test-log.html.
Let me know if you have any ideas...
Thanks, Simon

Hi Stephen,
On 3 July 2016 at 22:14, Simon Glass sjg@chromium.org wrote:
Hi Stephen,
I'd like to get access to SPL output from a test. It seems that only the output from U-Boot proper is logged, although I cannot see why.
For background, I have a new sandbox_spl target which includes SPL code. I will likely merge it into the normal sandbox target...
It is definitely running SPL because I see the SPL console output when I use the -s flag to test.py. But it does not appear in test-log.html.
Let me know if you have any ideas...
It turns it it was logged, but the ANSI characters were messing up the html due to a bug in sandbox SPL. Nothing to do with the test/py stuff, but confusing!
Regards, Simon

On 07/04/2016 09:40 AM, Simon Glass wrote:
Hi Stephen,
On 3 July 2016 at 22:14, Simon Glass sjg@chromium.org wrote:
Hi Stephen,
I'd like to get access to SPL output from a test. It seems that only the output from U-Boot proper is logged, although I cannot see why.
For background, I have a new sandbox_spl target which includes SPL code. I will likely merge it into the normal sandbox target...
It is definitely running SPL because I see the SPL console output when I use the -s flag to test.py. But it does not appear in test-log.html.
Let me know if you have any ideas...
It turns it it was logged, but the ANSI characters were messing up the html due to a bug in sandbox SPL. Nothing to do with the test/py stuff, but confusing!
Odd. test/py should escape (i.e. convert to a hex representation) any non-printable (or perhaps just < 32) character code. That should have left the HTML log readable. I guess that didn't work for some reason. Is it easy to reproduce? It might be worth fixing.

Hi Stephen,
On 5 July 2016 at 16:09, Stephen Warren swarren@wwwdotorg.org wrote:
On 07/04/2016 09:40 AM, Simon Glass wrote:
Hi Stephen,
On 3 July 2016 at 22:14, Simon Glass sjg@chromium.org wrote:
Hi Stephen,
I'd like to get access to SPL output from a test. It seems that only the output from U-Boot proper is logged, although I cannot see why.
For background, I have a new sandbox_spl target which includes SPL code. I will likely merge it into the normal sandbox target...
It is definitely running SPL because I see the SPL console output when I use the -s flag to test.py. But it does not appear in test-log.html.
Let me know if you have any ideas...
It turns it it was logged, but the ANSI characters were messing up the html due to a bug in sandbox SPL. Nothing to do with the test/py stuff, but confusing!
Odd. test/py should escape (i.e. convert to a hex representation) any non-printable (or perhaps just < 32) character code. That should have left the HTML log readable. I guess that didn't work for some reason. Is it easy to reproduce? It might be worth fixing.
OK, well a quick way might be to add 'colour = "red";' before the 'if' in sandbox_serial_ofdata_to_platdata(). It causes tests to fail, but the output will show the ANSI characters. I think it is doing what you say, since the escape shows up as %1b. I suppose that supporting ANSI colour codes would be too much of a pain?
Regards, Simon
participants (2)
-
Simon Glass
-
Stephen Warren