]> git.baikalelectronics.ru Git - uboot.git/commitdiff
buildman: Correct pylint errors
authorSimon Glass <sjg@chromium.org>
Fri, 11 Feb 2022 20:23:19 +0000 (13:23 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 2 Mar 2022 15:28:12 +0000 (10:28 -0500)
Fix pylint errors that can be fixed and mask those that seem to be
incorrect.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/buildman/builder.py
tools/buildman/cfgutil.py
tools/buildman/func_test.py
tools/buildman/kconfiglib.py
tools/buildman/main.py

index 754642d4a68ae6d9c12902223d41c174274d38a0..ecbfa3e361e04179710b8d39b77e82d5eefc182f 100644 (file)
@@ -1763,7 +1763,7 @@ class Builder:
             if self.num_threads:
                 self.queue.put(job)
             else:
-                results = self._single_builder.RunJob(job)
+                self._single_builder.RunJob(job)
 
         if self.num_threads:
             term = threading.Thread(target=self.queue.join)
index 4eba50868f5a5956c48158bb87957ed71bf8bfb9..ab74a8ef0622e2e217a73abbdb813a3f02a8454f 100644 (file)
@@ -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
                      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 = '\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):
     """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:
         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)
     if bad_cfgs:
         out = [f'{cfg:20}  {line}' for cfg, line in bad_cfgs]
index 6fcceb0ea569af826df3cb450ebb2752658e7ff4..fbf6706644b405c744a5f186a837a8c6b593e7c1 100644 (file)
@@ -524,12 +524,6 @@ class TestFunctional(unittest.TestCase):
         # Each commit has a config and make
         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):
         """The -f flag should force a rebuild"""
         self._RunControl('-b', TEST_BRANCH, '-m', '-o', self._output_dir)
index c67895ced6b352190c62c2984ce61b65d39dda77..b9f37567559ab3806d8124f3e2e88f7635e49ae2 100644 (file)
@@ -556,6 +556,7 @@ from os.path import dirname, exists, expandvars, islink, join, realpath
 
 VERSION = (14, 1, 0)
 
+# pylint: disable=E1101
 
 # File layout:
 #
index 01271061e6c450cbffe61f329e276bfa3def1951..3b6af240802d9a80c7663da5b0f6461b2937e3aa 100755 (executable)
@@ -30,8 +30,8 @@ from patman import terminal
 from patman import test_util
 
 def RunTests(skip_net_tests, verboose, args):
-    import func_test
-    import test
+    from buildman import func_test
+    from buildman import test
     import doctest
 
     result = unittest.TestResult()