This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Python 3 support: import LNT report as text
AbandonedPublic

Authored by thopre on Oct 12 2019, 3:42 PM.

Details

Summary

As per LNT documentation, all fields in the JSON that is a LNT report
file format are strings. Yet, the code responsible for adding a new ru
in LNT database reads the Flask data property holding the corresponding
LNT report file format which default to returning binary data. The code
then fail when invoking lnt.util.ImportData.import_from_string due to
using methods related to strings. This commit changes the access to the
data to using the property's getter with the as_text parameter set to
True, thereby requesting from Flask to return the data as a string.