Skip to content

Patch of #2318 #2332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 2, 2016
Merged

Patch of #2318 #2332

merged 2 commits into from
Aug 2, 2016

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