summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonghoon Shin <dhs.shin@samsung.com>2016-11-01 09:44:36 +0900
committerDonghoon Shin <dhs.shin@samsung.com>2016-11-01 09:44:36 +0900
commit6ca2b91cf4bfb96c7c55d9f9cee8126d81a07e5f (patch)
treeabee101a7922c2481191ac3874b6dcc7c1304317
parent14f58acd79177f41f3f7d6c0980bf2746530ccc1 (diff)
downloadlitmus-6ca2b91cf4bfb96c7c55d9f9cee8126d81a07e5f.tar.gz
litmus-6ca2b91cf4bfb96c7c55d9f9cee8126d81a07e5f.tar.bz2
litmus-6ca2b91cf4bfb96c7c55d9f9cee8126d81a07e5f.zip
Change usb busid detection routine
Before: cat /var/log/kern.log After: dmesg Docker environment and arm host environment does not allow to access /var/log/kern.log Change-Id: Ib2e000f02a9e7c3ef2636e71169a9e11ed978cf4
-rw-r--r--litmus/core/manager.py2
-rw-r--r--litmus/device/device.py4
-rw-r--r--litmus/device/devicestandalone.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/litmus/core/manager.py b/litmus/core/manager.py
index b0b27a4..1de68aa 100644
--- a/litmus/core/manager.py
+++ b/litmus/core/manager.py
@@ -160,7 +160,7 @@ Lightweight test manager for tizen automated testing
logging.debug('==============Acquire an available DUT==============')
candidate = [dev for dev in self._all_devices
- if dev['devicename'] == devicename]
+ if dev['devicename'] == devicename]
if candidate:
for times in range(0, max_retry_times):
diff --git a/litmus/device/device.py b/litmus/device/device.py
index 2908898..3a62151 100644
--- a/litmus/device/device.py
+++ b/litmus/device/device.py
@@ -479,7 +479,7 @@ class device(object):
"""docstring for find_usb_busid"""
pattern = 'usb (.*):.*idVendor={0}, idProduct={1}'.format(self._vid,
self._pid)
- kernlog = 'cat /var/log/kern.log | grep usb | tail -n 20'
+ kernlog = 'dmesg | grep usb | tail -n 20'
outs = check_output(kernlog, shell=True, timeout=10)
result = find_all_pattern(pattern=pattern, data=outs)
if result:
@@ -505,7 +505,7 @@ class device(object):
"""docstring for _find_usb_bus_and_device_address"""
pattern = 'usb (.*):.*idVendor={0}, idProduct={1}'.format(self._vid,
self._pid)
- kernlog = 'cat /var/log/kern.log | grep usb | tail -n 20'
+ kernlog = 'dmesg | grep usb | tail -n 20'
outs = check_output(kernlog, shell=True, timeout=10)
result = find_all_pattern(pattern=pattern, data=outs)
if result:
diff --git a/litmus/device/devicestandalone.py b/litmus/device/devicestandalone.py
index a720896..4b0d61e 100644
--- a/litmus/device/devicestandalone.py
+++ b/litmus/device/devicestandalone.py
@@ -139,7 +139,7 @@ class devicestandalone(device):
self._heimdall(filenames=filenames,
busaddr=busaddr,
devaddr=devaddr,
- partition_bin_mappings=partition_bin_mappings)
+ partition_bin_mappings=partition_bin_mappings)
except (Exception, KeyboardInterrupt) as e:
self._release_global_lock()
logging.debug(e)