mirror of
https://github.com/valitydev/yandex-tank.git
synced 2024-11-06 18:35:18 +00:00
bugfixes
This commit is contained in:
parent
1d6b611e80
commit
ba4522f7d5
@ -34,17 +34,15 @@ class Plugin(AbstractPlugin):
|
||||
|
||||
def configure(self):
|
||||
self.device_id = self.get_option("device_id", None).strip()
|
||||
if not self.device_id:
|
||||
modify = ''
|
||||
else:
|
||||
if self.device_id:
|
||||
modify = '-s {device_id}'.format(device_id=self.device_id)
|
||||
for key, value in self.cmds.iteritems():
|
||||
self.cmds[key] = value % modify
|
||||
|
||||
self.logfile = self.core.mkstemp(".log", "battery_historian_")
|
||||
self.core.add_artifact_file(self.logfile)
|
||||
|
||||
def prepare_test(self):
|
||||
if self.device_id:
|
||||
try:
|
||||
out = subprocess.check_output(self.cmds['enable_full_log'], shell=True)
|
||||
logger.debug('Enabling full-log: %s', out)
|
||||
@ -54,6 +52,7 @@ class Plugin(AbstractPlugin):
|
||||
logger.error('Error trying to prepare battery historian plugin', exc_info=True)
|
||||
|
||||
def end_test(self, retcode):
|
||||
if self.device_id:
|
||||
try:
|
||||
logger.debug('dumping battery stats')
|
||||
dump = subprocess.Popen(self.cmds['dump'], stdout=subprocess.PIPE, shell=True).communicate()[0]
|
||||
|
Loading…
Reference in New Issue
Block a user