provisioning: Support older python for tests
Call psutil's process name() function if present,
then just access the name property.
It was observed on psutil 1.2.1 (Ubuntu 14.04.5)
grep __version__ /usr/lib/python2.7/dist-packages/psutil/__init__.py
__version__ = "1.2.1"
scons TEST=1 resource/csdk/security/provisioning/
scons: *** [out/linux/x86_64/release/resource/csdk/security/provisioning/unittest/start] TypeError : 'str' object is not callable
Traceback (most recent call last):
File "/usr/lib/scons/SCons/Action.py", line 1062, in execute
result = self.execfunction(target=target, source=rsources, env=env)
File ".../resource/csdk/security/provisioning/unittest/SConscript", line 125, in run_test
kill_all()
File ".../resource/csdk/security/provisioning/unittest/SConscript", line 118, in kill_all
if proc.name() == server_bin:
TypeError: 'str' object is not callable
scons: building terminated because of errors.
Bug: https://jira.iotivity.org/browse/IOT-1745
Change-Id: I0a9376bb007c49b9b980ed8798ff8a93882015d7
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/21337
Reviewed-by: Mats Wichmann <mats@linux.com>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: George Nash <george.nash@intel.com>
(cherry picked from commit
ecccbb8206c0498008d023b73497675d2c31d38f)