mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 22:14:54 +00:00
buildman: Correct pylint errors
Fix pylint errors that can be fixed and mask those that seem to be incorrect. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
32cc6ae273
commit
ac05335d85
5 changed files with 7 additions and 12 deletions
|
@ -1763,7 +1763,7 @@ class Builder:
|
||||||
if self.num_threads:
|
if self.num_threads:
|
||||||
self.queue.put(job)
|
self.queue.put(job)
|
||||||
else:
|
else:
|
||||||
results = self._single_builder.RunJob(job)
|
self._single_builder.RunJob(job)
|
||||||
|
|
||||||
if self.num_threads:
|
if self.num_threads:
|
||||||
term = threading.Thread(target=self.queue.join)
|
term = threading.Thread(target=self.queue.join)
|
||||||
|
|
|
@ -123,10 +123,10 @@ def adjust_cfg_file(fname, adjust_cfg):
|
||||||
C=val to set the value of C (val must have quotes if C is
|
C=val to set the value of C (val must have quotes if C is
|
||||||
a string Kconfig)
|
a string Kconfig)
|
||||||
"""
|
"""
|
||||||
lines = tools.ReadFile(fname, binary=False).splitlines()
|
lines = tools.read_file(fname, binary=False).splitlines()
|
||||||
out_lines = adjust_cfg_lines(lines, adjust_cfg)
|
out_lines = adjust_cfg_lines(lines, adjust_cfg)
|
||||||
out = '\n'.join(out_lines) + '\n'
|
out = '\n'.join(out_lines) + '\n'
|
||||||
tools.WriteFile(fname, out, binary=False)
|
tools.write_file(fname, out, binary=False)
|
||||||
|
|
||||||
def convert_list_to_dict(adjust_cfg_list):
|
def convert_list_to_dict(adjust_cfg_list):
|
||||||
"""Convert a list of config changes into the dict used by adjust_cfg_file()
|
"""Convert a list of config changes into the dict used by adjust_cfg_file()
|
||||||
|
@ -219,7 +219,7 @@ def check_cfg_file(fname, adjust_cfg):
|
||||||
Returns:
|
Returns:
|
||||||
str: None if OK, else an error string listing the problems
|
str: None if OK, else an error string listing the problems
|
||||||
"""
|
"""
|
||||||
lines = tools.ReadFile(fname, binary=False).splitlines()
|
lines = tools.read_file(fname, binary=False).splitlines()
|
||||||
bad_cfgs = check_cfg_lines(lines, adjust_cfg)
|
bad_cfgs = check_cfg_lines(lines, adjust_cfg)
|
||||||
if bad_cfgs:
|
if bad_cfgs:
|
||||||
out = [f'{cfg:20} {line}' for cfg, line in bad_cfgs]
|
out = [f'{cfg:20} {line}' for cfg, line in bad_cfgs]
|
||||||
|
|
|
@ -524,12 +524,6 @@ class TestFunctional(unittest.TestCase):
|
||||||
# Each commit has a config and make
|
# Each commit has a config and make
|
||||||
self.assertEqual(self._make_calls, len(boards) * self._commits * 2)
|
self.assertEqual(self._make_calls, len(boards) * self._commits * 2)
|
||||||
|
|
||||||
def testForceReconfigure(self):
|
|
||||||
"""The -f flag should force a rebuild"""
|
|
||||||
self._RunControl('-b', TEST_BRANCH, '-C', '-o', self._output_dir)
|
|
||||||
# Each commit has a config and make
|
|
||||||
self.assertEqual(self._make_calls, len(boards) * self._commits * 2)
|
|
||||||
|
|
||||||
def testMrproper(self):
|
def testMrproper(self):
|
||||||
"""The -f flag should force a rebuild"""
|
"""The -f flag should force a rebuild"""
|
||||||
self._RunControl('-b', TEST_BRANCH, '-m', '-o', self._output_dir)
|
self._RunControl('-b', TEST_BRANCH, '-m', '-o', self._output_dir)
|
||||||
|
|
|
@ -556,6 +556,7 @@ from os.path import dirname, exists, expandvars, islink, join, realpath
|
||||||
|
|
||||||
VERSION = (14, 1, 0)
|
VERSION = (14, 1, 0)
|
||||||
|
|
||||||
|
# pylint: disable=E1101
|
||||||
|
|
||||||
# File layout:
|
# File layout:
|
||||||
#
|
#
|
||||||
|
|
|
@ -30,8 +30,8 @@ from patman import terminal
|
||||||
from patman import test_util
|
from patman import test_util
|
||||||
|
|
||||||
def RunTests(skip_net_tests, verboose, args):
|
def RunTests(skip_net_tests, verboose, args):
|
||||||
import func_test
|
from buildman import func_test
|
||||||
import test
|
from buildman import test
|
||||||
import doctest
|
import doctest
|
||||||
|
|
||||||
result = unittest.TestResult()
|
result = unittest.TestResult()
|
||||||
|
|
Loading…
Add table
Reference in a new issue