Skip to content

Conversation

bridadan
Copy link
Contributor

@bridadan bridadan commented Aug 1, 2016

This PR is derived from #2318. This attempts to fix an issue that occurs in earlier version of Python when generating XML test reports.

The TCP and UDP echo test cases generate random ASCII sequences to be echoed back by the host PC. In the case where a test report needs to be generated, this causes the following error:

(UnicodeDecodeError) exporter_testcase_junit:'unicodeescape' codec can't decode bytes in position 5349-5350: truncated \uXXXX escape

This PR avoids this issue by limiting the range of random ASCII characters to just '0' - '9'. This should be sufficiently random but use safer characters that shouldn't cause issues when saving to XML files.

FYI @sg-

sg- and others added 2 commits July 29, 2016 16:10
Having the echo tests generate any random character
caused issues serializing the test output into an
xml file. This change limits the characters generated
by the device to '0' - '9'.
@bridadan
Copy link
Contributor Author

bridadan commented Aug 1, 2016

/morph test

@mbed-bot
Copy link

mbed-bot commented Aug 2, 2016

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 576

All builds and test passed!

@sg- sg- merged commit 8c3c98b into ARMmbed:master Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants