<p dir="ltr">I don't think so I'll need that results file unless you run into more problems. I'll push Monday morning unless others object.</p>
<p dir="ltr">Sent from my Nexus 6.<br>
I'm on mobile, please excuse autocorrect fail.</p>
<div class="gmail_quote">On Mar 26, 2016 15:05, "Marek Olšák" <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you very much. This fixes the Unicode error for me. For the series:<br>
<br>
Tested-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
<br>
Please let me know if you still need the problematic results file.<br>
<br>
Marek<br>
<br>
<br>
On Fri, Mar 25, 2016 at 10:28 PM, Dylan Baker <<a href="mailto:baker.dylan.c@gmail.com">baker.dylan.c@gmail.com</a>> wrote:<br>
> Things changes the behavior of Mako to provide utf-8 encoded templates<br>
> in bytes representation, and to just directly write the rendered<br>
> template that way. This gives python 2.x and 3.x identical behavior when<br>
> handling non ascii characters in test run names.<br>
><br>
> Signed-off-by: Dylan Baker <<a href="mailto:dylanx.c.baker@intel.com">dylanx.c.baker@intel.com</a>><br>
> ---<br>
>  framework/summary/html_.py | 17 ++++++++++++-----<br>
>  1 file changed, 12 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/framework/summary/html_.py b/framework/summary/html_.py<br>
> index 2c0f72f..2783cf1 100644<br>
> --- a/framework/summary/html_.py<br>
> +++ b/framework/summary/html_.py<br>
> @@ -51,9 +51,16 @@ _TEMP_DIR = os.path.join(<br>
>      tempfile.gettempdir(),<br>
>      "piglit-{}".format(getpass.getuser()),<br>
>      'version-{}'.format(sys.version.split()[0]))<br>
> +<br>
>  _TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), '../..', 'templates')<br>
> +<br>
> +# To eas the bytes/str/uincode between python 2 and python 3 the<br>
> +# output_encoding is set below. This means that in both python 2 and 3 bytes<br>
> +# are returned. This means that the files need to be opened in bytes mode<br>
> +# ('wb').<br>
>  _TEMPLATES = TemplateLookup(<br>
>      _TEMPLATE_DIR,<br>
> +    output_encoding='utf-8',<br>
>      module_directory=os.path.join(_TEMP_DIR, "html-summary"))<br>
><br>
><br>
> @@ -85,7 +92,7 @@ def _make_testrun_info(results, destination, exclude=None):<br>
>              else:<br>
>                  raise e<br>
><br>
> -        with open(os.path.join(destination, name, "index.html"), 'w') as out:<br>
> +        with open(os.path.join(destination, name, "index.html"), 'wb') as out:<br>
>              out.write(_TEMPLATES.get_template('testrun_info.mako').render(<br>
>                  name=<a href="http://each.name" rel="noreferrer" target="_blank">each.name</a>,<br>
>                  totals=each.totals['root'],<br>
> @@ -109,7 +116,7 @@ def _make_testrun_info(results, destination, exclude=None):<br>
>                  if not os.path.exists(temp_path):<br>
>                      os.makedirs(temp_path)<br>
><br>
> -                with open(html_path, 'w') as out:<br>
> +                with open(html_path, 'wb') as out:<br>
>                      out.write(_TEMPLATES.get_template(<br>
>                          'test_result.mako').render(<br>
>                              testname=key,<br>
> @@ -126,7 +133,7 @@ def _make_comparison_pages(results, destination, exclude):<br>
>      # Index.html is a bit of a special case since there is index, all, and<br>
>      # alltests, where the other pages all use the same name. ie,<br>
>      # changes.html, changes, and page=changes.<br>
> -    with open(os.path.join(destination, "index.html"), 'w') as out:<br>
> +    with open(os.path.join(destination, "index.html"), 'wb') as out:<br>
>          out.write(_TEMPLATES.get_template('index.mako').render(<br>
>              results=results,<br>
>              page='all',<br>
> @@ -135,7 +142,7 @@ def _make_comparison_pages(results, destination, exclude):<br>
><br>
>      # Generate the rest of the pages<br>
>      for page in pages:<br>
> -        with open(os.path.join(destination, page + '.html'), 'w') as out:<br>
> +        with open(os.path.join(destination, page + '.html'), 'wb') as out:<br>
>              # If there is information to display display it<br>
>              if sum(getattr(results.counts, page)) > 0:<br>
>                  out.write(_TEMPLATES.get_template('index.mako').render(<br>
> @@ -153,7 +160,7 @@ def _make_comparison_pages(results, destination, exclude):<br>
>  def _make_feature_info(results, destination):<br>
>      """Create the feature readiness page."""<br>
><br>
> -    with open(os.path.join(destination, "feature.html"), 'w') as out:<br>
> +    with open(os.path.join(destination, "feature.html"), 'wb') as out:<br>
>          out.write(_TEMPLATES.get_template('feature.mako').render(<br>
>              results=results))<br>
><br>
> --<br>
> 2.7.4<br>
><br>
</blockquote></div>