nuxeo / FunkLoad

Functional and load testing framework for web applications, written in Python
http://funkload.nuxeo.org/
GNU General Public License v2.0
382 stars 83 forks source link

Error building differential/trend report #82

Open uray opened 11 years ago

uray commented 11 years ago

Error message is:

$ fl-build-report -d simple-bench/test_simple-20130203T232803 simple-bench/test_simple-20130203T233541 
Creating diff report ... done: 
Usage
=====
  fl-build-report [options] [<source> [<destination>]]

fl-build-report: error: Error in option "--stylesheet-path":
    AttributeError: 'str' object has no attribute 'pop'

After digging into the code, found docutils (0.10) needs the value of "--stylesheet-path" a "comma_separated_list" (line 74, docutils/writers/html4css1/init.py), but funkload only give it a string, so cause the problem, here is the patch to fix:

--- ReportRenderHtmlBase.py.orig        2013-02-04 01:08:52.000000000 +0800
+++ ReportRenderHtmlBase.py     2013-02-04 01:10:30.000000000 +0800
@@ -114,10 +114,9 @@
         """Ask docutils to convert our rst file into html."""
         from docutils.core import publish_cmdline
         html_path = os.path.join(self.report_dir, 'index.html')
-        cmdline = "-t --stylesheet-path=%s %s %s" % (self.css_path,
-                                                     self.rst_path,
-                                                     html_path)
-        cmd_argv = cmdline.split(' ')
+        cmd_argv = ['-t', '--stylesheet-path', [self.css_path],
+                                               self.rst_path,
+                                               html_path]
         publish_cmdline(writer_name='html', argv=cmd_argv)
         self.html_path = html_path