I have found that that if while running the international unit tests, and
an error occurs, such as
>>>
/data/local/tmp/v8/test/intl/assert.js:98: Error: Failure: expected <国务院>,
found <国>.
throw new Error(message);
^
Error: Failure: expected <国务院>, found <国>.
at fail (/data/local/tmp/v8/test/intl/assert.js:98:9)
at assertEquals (/data/local/tmp/v8/test/intl/assert.js:107:5)
at /data/local/tmp/v8/test/intl/break-iterator/zh-break.js:49:1
ANDROID: Error returned by test
<<<
the JUnitTestOutput reader reads this in as standard string.
>>>
tools/testrunner/local/junit_output.py:43 failureElement.text =
test_failure
<<<
However, later, when it attempts to output the JUnit file, it will crash
Traceback (most recent call last):
File "v8/tools/run-tests.py", line 463, in <module>
sys.exit(Main())
File "v8/tools/run-tests.py", line 333, in Main
code = Execute(arch, mode, args, options, suites, workspace)
File "v8/tools/run-tests.py", line 450, in Execute
exit_code = runner.Run(options.j)
File
"/home/local/ANT/cwgreene/src/silk3/master/Cloud9NativeChromiumBuild/src/v8/tools/testrunner/local/execution.py",
line 92, in Run
self.indicator.Done()
File
"/home/local/ANT/cwgreene/src/silk3/master/Cloud9NativeChromiumBuild/src/v8/tools/testrunner/local/progress.py",
line 252, in Done
self.outputter.FinishAndWrite(self.outfile)
File
"/home/local/ANT/cwgreene/src/silk3/master/Cloud9NativeChromiumBuild/src/v8/tools/testrunner/local/junit_output.py",
line 48, in FinishAndWrite
xml.ElementTree(self.root).write(file, "UTF-8")
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 821, in write
serialize(write, self._root, encoding, qnames, namespaces)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 940, in
_serialize_xml
_serialize_xml(write, e, encoding, qnames, None)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 940, in
_serialize_xml
_serialize_xml(write, e, encoding, qnames, None)
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 938, in
_serialize_xml
write(_escape_cdata(text, encoding))
File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1074, in
_escape_cdata
return text.encode(encoding, "xmlcharrefreplace")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 188:
ordinal not in range(128)
because it believes that the input was ascii. It seems that a
straightforward fix for junit would be to explictly decode the input as
unicode.
>>>
tools/testrunner/local/junit_output.py:43 failureElement.text =
test_failure.decode("utf-8")
<<<
Are there any problems with this change?
The command executed was:
python2.7 tools/run-tests.py --arch android_arm --mode debug --timeout=600
--command-prefix='python2.7 tools/android-run.py' --report --junitout
output.xml
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.