summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/summary/html_.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/framework/summary/html_.py b/framework/summary/html_.py
index f7fdc8576..14dd76fa8 100644
--- a/framework/summary/html_.py
+++ b/framework/summary/html_.py
@@ -31,6 +31,7 @@ import os
import shutil
import sys
import tempfile
+import traceback
import mako
from mako.lookup import TemplateLookup
@@ -113,13 +114,19 @@ def _make_testrun_info(results, destination, exclude=None):
if value.result not in exclude:
core.check_dir(temp_path)
- with open(html_path, 'wb') as out:
- out.write(_TEMPLATES.get_template(
- 'test_result.mako').render(
- testname=key,
- value=value,
- css=os.path.relpath(result_css, temp_path),
- index=os.path.relpath(index, temp_path)))
+ try:
+ with open(html_path, 'wb') as out:
+ out.write(_TEMPLATES.get_template(
+ 'test_result.mako').render(
+ testname=key,
+ value=value,
+ css=os.path.relpath(result_css, temp_path),
+ index=os.path.relpath(index, temp_path)))
+ except OSError as e:
+ if e.errno == errno.ENAMETOOLONG:
+ print('WARN: filename "{}" too long'.format(html_name))
+ else:
+ raise
def _make_comparison_pages(results, destination, exclude):