mirror of
https://git.yoctoproject.org/poky
synced 2026-09-14 21:49:33 +02:00
oeqa/runtime/parselogs: inline single-caller functions
There's no need to have one-liner functions to get the MACHINE or WORKDIR when they're only called once. (From OE-Core rev: 9478a665641f55cdc14f12a4409121ef95883d74) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
1ef74b08ca
commit
e5829e1e8b
@@ -223,12 +223,6 @@ class ParseLogsTest(OERuntimeTestCase):
|
|||||||
cls.log_locations = log_locations
|
cls.log_locations = log_locations
|
||||||
cls.msg = ''
|
cls.msg = ''
|
||||||
|
|
||||||
def getMachine(self):
|
|
||||||
return self.td.get('MACHINE', '')
|
|
||||||
|
|
||||||
def getWorkdir(self):
|
|
||||||
return self.td.get('WORKDIR', '')
|
|
||||||
|
|
||||||
# Go through the log locations provided and if it's a folder
|
# Go through the log locations provided and if it's a folder
|
||||||
# create a list with all the .log files in it, if it's a file
|
# create a list with all the .log files in it, if it's a file
|
||||||
# just add it to that list.
|
# just add it to that list.
|
||||||
@@ -251,7 +245,7 @@ class ParseLogsTest(OERuntimeTestCase):
|
|||||||
|
|
||||||
# Copy the log files to be parsed locally
|
# Copy the log files to be parsed locally
|
||||||
def transfer_logs(self, log_list):
|
def transfer_logs(self, log_list):
|
||||||
workdir = self.getWorkdir()
|
workdir = self.td.get('WORKDIR')
|
||||||
self.target_logs = workdir + '/' + 'target_logs'
|
self.target_logs = workdir + '/' + 'target_logs'
|
||||||
target_logs = self.target_logs
|
target_logs = self.target_logs
|
||||||
if os.path.exists(target_logs):
|
if os.path.exists(target_logs):
|
||||||
@@ -278,7 +272,7 @@ class ParseLogsTest(OERuntimeTestCase):
|
|||||||
grepcmd += '" ' + str(log) + " | grep -Eiv \'"
|
grepcmd += '" ' + str(log) + " | grep -Eiv \'"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
errorlist = ignore_errors[self.getMachine()]
|
errorlist = ignore_errors[self.td.get('MACHINE')]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.msg += 'No ignore list found for this machine, using default\n'
|
self.msg += 'No ignore list found for this machine, using default\n'
|
||||||
errorlist = ignore_errors['default']
|
errorlist = ignore_errors['default']
|
||||||
|
|||||||
Reference in New Issue
Block a user