Closed Bug 1253209 Opened 5 years ago Closed 5 years ago

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


(Testing :: Reftest, defect)

Not set


(firefox48 fixed)

Tracking Status
firefox48 --- fixed


(Reporter: shinglyu, Assigned: shinglyu)




(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/", line 810, in __bootstrap_inner
  File "/usr/lib/python2.7/", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozprocess/mozprocess/", line 921, in _read
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozprocess/mozprocess/", line 841, in __call__
    e(*args, **kwargs)
  File "/home/shinglyu/workspace/mozilla-central/layout/tools/reftest/", line 135, in __call__
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/", line 193, in log_raw
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/", line 210, in _handle_log
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/handlers/", line 93, in __call__
    formatted = self.formatter(data)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/handlers/", line 62, in __call__
    return self.inner(item)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/", line 68, in __call__
    return handler(data)
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/formatters/html/", line 94, in test_end
  File "/home/shinglyu/workspace/mozilla-central/testing/mozbase/mozlog/mozlog/formatters/html/", 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]

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/  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
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.