[U-Boot] [PATCH] test/py: HTML awesome!

Simon Glass sjg at chromium.org
Sat Feb 6 21:29:57 CET 2016


On 3 February 2016 at 16:46, Stephen Warren <swarren at wwwdotorg.org> wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> Implement three improvements to the HTML log file:
> - Ability to expand/contract sections. All passing sections are contracted
>   at file load time so the user can concentrate on issues requiring
>   action.
> - The overall status report is copied to the top of the log for easy
>   access.
> - Add links from the status report to the test logs, for easy navigation.
>
> This all relies on Javascript and the jquery library. If the user doesn't
> have Javascript enabled, or jquery can't be downloaded, the log should
> look and behave identically to how it did before this patch.
>
> A few notes on the diff:
>
> - A few more 'with log.section("xxx")' were added, so that all stream
>   blocks are kept within a section block for consistent HTML entity
>   nesting structure. This changed indentation in a few places, making
>   the diff look slightly larger.
> - HTML entity IDs are cleaned up. We assign simple incrementing integer
>   IDs now, rather than using mangled test names which were possibly
>   invalid.
> - Sections and streams now use common CSS class names (in addition to the
>   current separate class names) to more easily share the new behaviour.
>   This also reduces the CSS file size since rules don't need to be
>   duplicated.
> - An "OK" status is logged after some external command executions so that
>   make and flash steps are auto-contracted at log file load time, assuming
>   they passed.
>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> ---
>  test/py/conftest.py                   |  61 ++++++++-------
>  test/py/multiplexed_log.css           |  41 +++++-----
>  test/py/multiplexed_log.py            | 142 +++++++++++++++++++++++++++-------
>  test/py/u_boot_console_exec_attach.py |  12 +--
>  4 files changed, 178 insertions(+), 78 deletions(-)

Acked-by: Simon Glass <sjg at chromium.org>
Tested on sandbox:
Tested-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list