Closed Bug 1253209 Opened 5 years ago Closed 5 years ago

./mach reftest --log-html failed to generate html report

Categories

(Testing :: Reftest, defect)

defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: shinglyu, Assigned: shinglyu)

References

Details

Attachments

(1 file, 2 obsolete files)

== Step to reproduce ==
* Run ./mach reftest --log-html log.html layout/reftests/inline/reftest.list

== Expected ==
The log.html is created

== Actual == 
The log.html failed to be created. 

== Error message ==
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 921, in _read
    callback(line.rstrip())
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozprocess/mozprocess/processhandler.py", line 841, in __call__
    e(*args, **kwargs)
  File "/home/shinglyu/workspace/mozilla-central/layout/tools/reftest/output.py", line 135, in __call__
    self.log.log_raw(data)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/structuredlog.py", line 193, in log_raw
    self._handle_log(data)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/structuredlog.py", line 210, in _handle_log
    handler(data)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/handlers/base.py", line 93, in __call__
    formatted = self.formatter(data)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/handlers/base.py", line 62, in __call__
    return self.inner(item)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/reader.py", line 68, in __call__
    return handler(data)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/formatters/html/html.py", line 94, in test_end
    self.make_result_html(data)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/formatters/html/html.py", line 125, in make_result_html
    href = 'data:text/plain;charset=utf-8;base64,%s' % base64.b64encode(content.encode('utf-8'))
AttributeError: 'int' object has no attribute 'encode'

== Note == 
I already have a patch ready. Will submit it later.
Attached patch bug-1253209-fix.patch (obsolete) — Splinter Review
int fields doesn't have encode(), cast it to str first and encode to utf-8.
Attachment #8726147 - Flags: review?(jmaher)
Comment on attachment 8726147 [details] [diff] [review]
bug-1253209-fix.patch

Review of attachment 8726147 [details] [diff] [review]:
-----------------------------------------------------------------

thanks, this was a simple fix!
Attachment #8726147 - Flags: review?(jmaher) → review+
Keywords: checkin-needed
has problems to apply:

Hunk #1 FAILED at 377
1 out of 1 hunks FAILED -- saving rejects to file dom/system/NetworkGeolocationProvider.js.rej
patch failed, unable to continue (try -v)
patch failed, rejects left in working directory
errors during apply, please fix and qrefresh filter.patch
Flags: needinfo?(slyu)
Keywords: checkin-needed
odd that this patch has a conflict in NetworkGeolocationProvider, that file isn't touched, only testing/mozbase/mozlog/mozlog/formatters/html/html.py.  Either way, a merge conflict needs to be cleaned up.
Attached patch Patch v2 (obsolete) — Splinter Review
I created a new patch based on the latest m-c. This one should apply cleanly.
Flags: needinfo?(slyu)
Attachment #8727246 - Flags: review?(jmaher)
Comment on attachment 8727246 [details] [diff] [review]
Patch v2

Sorry, attached the wrong one
Attachment #8727246 - Flags: review?(jmaher)
Attachment #8727246 - Attachment is obsolete: true
Attached patch Patch v2Splinter Review
I updated the patch, is should apply to the latest m-c cleanly
Attachment #8726147 - Attachment is obsolete: true
Attachment #8727248 - Flags: review?(jmaher)
Assignee: nobody → slyu
Comment on attachment 8727248 [details] [diff] [review]
Patch v2

Review of attachment 8727248 [details] [diff] [review]:
-----------------------------------------------------------------

as a note, you don't need to ask for a new review if I have r+'d the patch unless it has changed significantly.
Attachment #8727248 - Flags: review?(jmaher) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/a8877f97820b
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Depends on: 1258343
No longer depends on: 1255986
You need to log in before you can comment on or make changes to this bug.