<p>Corey Farrell <strong>uploaded patch set #9</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/8854">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Begin work on python3 compatability.<br><br>* Use explicit relative import syntax.<br>* Correct syntax for print and except.<br>* Fix incorrect usage of IOError in astcdr.py - IOError is not a tuple.<br>* Use items, values instead of iteritems, itervalues.<br>* Use OrderedDict from collections if available (python 2.7+).<br>* Do not unpack tuples from argument list, save tuple to variable then<br>  unpack within code.<br>* Use exception handler to import Python3 version of urlencode if the<br>  Python2 version fails to import.<br>* Remove unused import unittest from opensslversion.<br>* Move executable tests to separate files to resolve issues with<br>  relative imports:<br>  - buildoptions<br>  - cdr<br>  - cel<br>  - channel_test_condition<br>  - config<br>  - lock_test_condition<br>  - sip_dialog_test_condition (disabled)<br>  - sippversion<br>* Modify utils_socket test to use new harness_shared module.<br>* Remove unused executable flag and shebang from phones.py.<br>* Update self_test script to run tests from new location.<br>* Remove ability to use config.py to display a config file.<br>* Allow PYTHON environmental variable to tell run-local to use a<br>  specific python binary.<br>* Execute test_runner.py using python -m syntax.  This avoids conflicts<br>  between needing to use relative imports for modules but not being<br>  allowed to use them in executable scripts.<br>* Encode self.realbase for use with md5 function.<br>* Remove executable flag and shebang from test_runner.py.  Remove<br>  redundant appending of sys.path.<br>* Modify output for running test and status to print the name of the<br>  test instead of the command used to run the test.<br>* Use key= sorter argument to compare sizes of tmp filesystems.  This<br>  may cause us to use /var/tmp instead of /tmp even if /var/tmp has only<br>  a few kilobytes more space but python3 does not support cmp= argument<br>  to sorter.<br>* Decode binary to utf-8<br>  - CLI output<br>  - runtest.py subprocess output<br>  - XML printed to stdout<br>  - SyncAMI data<br>  - SIPp runtime and version output<br>* Update test_runner.load_and_parse_module to check for the module in<br>  lib/python/asterisk, make required adjustments if found.<br>* Update __strip_illegal_xml_chars to work with unicode version of<br>  str.translate which does not support second argument.<br>* Update import statements from all *.py modules within tests/ to use<br>  absolute names for asterisk modules.  This is required for python2 to<br>  continue functioning with the new way that test_runner must be executed.<br>  No attempt has been made to fix python3 compatibility issues in these<br>  modules.<br><br>Some tests may pass using python3.  Doing so requires using an updated<br>starpy and no python sources within tests/ have been updated.  Unit<br>tests from lib/python can be run against python2 and python3 using<br>./self_test.<br><br>The goal of this is for all tests to continue functioning using python2.<br>Some tests may work under python3 but individual tests will need to be<br>addressed separately.  For tests which do not contain a run-test script<br>the version of python used to execute ./runtests.py will be used:<br>./runtests.py -t tests/manager/originate<br>python2 ./runtests.py -t tests/manager/originate<br>python3 ./runtests.py -t tests/manager/originate<br><br>These commands will be python, python2 and python3 respectively.  The<br>first example where no interpreter is specified uses the shebang from<br>./runtests.py.  The interpreter used by ./run-local can be controlled<br>by setting PYTHON environmental variable:<br>PYTHON=python3 ./run-local run -t tests/manager/originate<br><br>Change-Id: If76c2d3e11e4ab4552d0df7841287c8bb2de7918<br>---<br>M lib/python/asterisk/ami.py<br>M lib/python/asterisk/apptest.py<br>M lib/python/asterisk/ari.py<br>M lib/python/asterisk/astconfigparser.py<br>M lib/python/asterisk/astcsv.py<br>M lib/python/asterisk/astdicts.py<br>M lib/python/asterisk/asterisk.py<br>M lib/python/asterisk/bridge_test_case.py<br>M lib/python/asterisk/buildoptions.py<br>M lib/python/asterisk/cdr.py<br>M lib/python/asterisk/cel.py<br>M lib/python/asterisk/channel_test_condition.py<br>M lib/python/asterisk/confbridge.py<br>M lib/python/asterisk/config.py<br>M lib/python/asterisk/fd_test_condition.py<br>M lib/python/asterisk/lock_test_condition.py<br>M lib/python/asterisk/matcher.py<br>M lib/python/asterisk/matcher_listener.py<br>M lib/python/asterisk/opensslversion.py<br>M lib/python/asterisk/originate.py<br>M lib/python/asterisk/pcap.py<br>M lib/python/asterisk/phones.py<br>M lib/python/asterisk/pjsua_mod.py<br>M lib/python/asterisk/pluggable_modules.py<br>M lib/python/asterisk/pluggable_registry.py<br>M lib/python/asterisk/realtime_converter.py<br>M lib/python/asterisk/realtime_odbc_module.py<br>M lib/python/asterisk/realtime_test_module.py<br>A lib/python/asterisk/self_test/harness_shared.py<br>A lib/python/asterisk/self_test/locks-backtrace.txt<br>A lib/python/asterisk/self_test/locks-fail.txt<br>A lib/python/asterisk/self_test/locks-large-multiple-object.txt<br>A lib/python/asterisk/self_test/locks-multiple-objects-no-backtrace.txt<br>A lib/python/asterisk/self_test/locks-pass.txt<br>A lib/python/asterisk/self_test/locks-single-object-no-held-info.txt<br>A lib/python/asterisk/self_test/locks-single-object.txt<br>A lib/python/asterisk/self_test/test_buildoptions.py<br>A lib/python/asterisk/self_test/test_cdr.py<br>A lib/python/asterisk/self_test/test_cel.py<br>A lib/python/asterisk/self_test/test_channel_test_condition.py<br>A lib/python/asterisk/self_test/test_config.py<br>A lib/python/asterisk/self_test/test_lock_test_condition.py<br>R lib/python/asterisk/self_test/test_matcher.py<br>A lib/python/asterisk/self_test/test_sip_dialog_test_condition.py.txt<br>A lib/python/asterisk/self_test/test_sippversion.py<br>M lib/python/asterisk/self_test/test_utils_socket.py<br>M lib/python/asterisk/sip_channel_test_condition.py<br>M lib/python/asterisk/sip_dialog_test_condition.py<br>M lib/python/asterisk/sipp.py<br>M lib/python/asterisk/sippversion.py<br>M lib/python/asterisk/syncami.py<br>M lib/python/asterisk/test_case.py<br>M lib/python/asterisk/test_conditions.py<br>M lib/python/asterisk/test_config.py<br>M lib/python/asterisk/test_runner.py<br>M lib/python/asterisk/test_suite_utils.py<br>M lib/python/asterisk/thread_test_condition.py<br>M lib/python/asterisk/voicemail.py<br>M lib/python/rlmi.py<br>M lib/python/sip_message.py<br>M run-local<br>M runtests.py<br>M self_test<br>M tests/cdr/cdr-tests.py<br>M tests/cdr/sqlite3/cdr_sqlite3.py<br>M tests/channels/SIP/tcpauthlimit/sipp_scenario.py<br>M tests/channels/pjsip/registration/inbound/nominal/contact_acl/ipv4/scenario_generator.py<br>M tests/channels/pjsip/registration/inbound/nominal/contact_acl/ipv6/scenario_generator.py<br>M tests/channels/pjsip/subscriptions/presence/verify_bodies/presence.py<br>M tests/channels/pjsip/subscriptions/rls/rls_test.py<br>M tests/channels/pjsip/transfers/attended_transfer/nominal/packet_sniffer.py<br>M tests/codecs/audio_analyzer.py<br>M tests/codecs/rtp_analyzer.py<br>M tests/hep/hep_capture_node.py<br>M tests/manager/config/ManagerConfigTest.py<br>M tests/manager/device_state_changed/ami_device_state.py<br>M tests/manager/device_state_list/ami_device_state_list.py<br>M tests/manager/exten_state_list/ami_exten_state_list.py<br>M tests/manager/presence_state_changed/ami_presence_state.py<br>M tests/manager/presence_state_list/ami_presence_state_list.py<br>M tests/pbx/manager_extensions/ami_extension_control.py<br>M tests/rest_api/external_interaction/attended_transfer/attended_transfer.py<br>M tests/rest_api/external_interaction/blind_transfer/call_transfer.py<br>M tests/rest_api/message/message_modules.py<br>M usage.py<br>85 files changed, 1,910 insertions(+), 1,841 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/54/8854/9</pre><p>To view, visit <a href="https://gerrit.asterisk.org/8854">change 8854</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/8854"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: If76c2d3e11e4ab4552d0df7841287c8bb2de7918 </div>
<div style="display:none"> Gerrit-Change-Number: 8854 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>