[Asterisk-code-review] runtests.py: Ensure unicode in self.stdout. (testsuite[master])

Corey Farrell asteriskteam at digium.com
Thu Aug 16 13:51:45 CDT 2018


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/9915


Change subject: runtests.py: Ensure unicode in self.stdout.
......................................................................

runtests.py: Ensure unicode in self.stdout.

When REF_DEBUG failed it was causing a failure when generating
asterisk-test-suite-report.xml.  Any use of u"unicode" strings forces
the the whole self.stdout variable to become unicode, this seems to
prevent the error.

I believe this error only occurs when the test itself produces no
output but fails, as is often the case when a test passes but REF_DEBUG
detects leaks.

Change-Id: I74e1565313586f5f0b324fe4f899c16416e98022
---
M runtests.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/15/9915/1

diff --git a/runtests.py b/runtests.py
index 4ac904a..3f6ef9c 100755
--- a/runtests.py
+++ b/runtests.py
@@ -110,7 +110,7 @@
         self.test_relpath = self.test_name[6:]
 
     def stdout_print(self, msg):
-        self.stdout += msg + "\n"
+        self.stdout += msg + u"\n"
         print(msg)
 
     def run(self):

-- 
To view, visit https://gerrit.asterisk.org/9915
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I74e1565313586f5f0b324fe4f899c16416e98022
Gerrit-Change-Number: 9915
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180816/ab1752f3/attachment.html>


More information about the asterisk-code-review mailing list