This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Fix use of field index in daily report
ClosedPublic

Authored by john.brawn on May 31 2018, 5:06 AM.

Details

Summary

Links to graph plots in the daily report make use of the field index but haven't been updated to get it via get_field_index, causing these links to be broken. Fix this by using get_field_index.

Diff Detail

Repository
rL LLVM

Event Timeline

john.brawn created this revision.May 31 2018, 5:06 AM

Hi John,

Thanks for fixing this!
Ideally, there should also be a check added to the LNT unit tests (e.g. somewhere near https://github.com/llvm-mirror/lnt/blob/master/tests/server/ui/V4Pages.py#L433).
At the moment, the "check_table_content" function there only checks text in tables, not anything in HTML tags, IIRC. (see function get_table_body_content for where everything inside HTML tags is filtered out, https://github.com/llvm-mirror/lnt/blob/master/tests/server/ui/V4Pages.py#L178).
Maybe the best way to test this is to add a helper function in tests/server/ui/V4Pages.py to extract the full content from a specific field from the table (i.e. including all HTML tags) and check against exact HTML content?

What do you think - would that be feasible and useful to implement?

marxin added a comment.Jun 1 2018, 6:17 AM

Thank you for the fix.

Maybe the best way to test this is to add a helper function in tests/server/ui/V4Pages.py to extract the full content from a specific field from the table (i.e. including all HTML tags) and check against exact HTML content?

What do you think - would that be feasible and useful to implement?

After trying some things I think it will be easier to extract just the destination of the links and check that those are correct, especially as it's just the destination of the links that was wrong.

Maybe the best way to test this is to add a helper function in tests/server/ui/V4Pages.py to extract the full content from a specific field from the table (i.e. including all HTML tags) and check against exact HTML content?

What do you think - would that be feasible and useful to implement?

After trying some things I think it will be easier to extract just the destination of the links and check that those are correct, especially as it's just the destination of the links that was wrong.

That sounds like a reasonable approach to me too.

This revision is now accepted and ready to land.Jun 4 2018, 6:06 AM
This revision was automatically updated to reflect the committed changes.