]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: Convert camel case in test_util.py
authorSimon Glass <sjg@chromium.org>
Sat, 29 Jan 2022 21:14:14 +0000 (14:14 -0700)
committerSimon Glass <sjg@chromium.org>
Wed, 9 Feb 2022 19:30:12 +0000 (12:30 -0700)
Convert this file to snake case and update all files which use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
tools/binman/main.py
tools/buildman/main.py
tools/dtoc/main.py
tools/dtoc/test_fdt.py
tools/patman/main.py
tools/patman/test_util.py

index 03462e7bb8b102a7505b00f45999e6493741a29f..ab25b48b5fbf6ea4129fc5279c24dce2a4d28bee 100755 (executable)
@@ -84,14 +84,14 @@ def RunTests(debug, verbosity, processes, test_preserve_dirs, args, toolpath):
 
     # Run the entry tests first ,since these need to be the first to import the
     # 'entry' module.
-    test_util.RunTestSuites(
+    test_util.run_test_suites(
         result, debug, verbosity, test_preserve_dirs, processes, test_name,
         toolpath,
         [bintool_test.TestBintool, entry_test.TestEntry, ftest.TestFunctional,
          fdt_test.TestFdt, elf_test.TestElf, image_test.TestImage,
          cbfs_util_test.TestCbfs, fip_util_test.TestFip])
 
-    return test_util.ReportResult('binman', test_name, result)
+    return test_util.report_result('binman', test_name, result)
 
 def RunTestCoverage(toolpath):
     """Run the tests and check that we get 100% coverage"""
@@ -102,7 +102,7 @@ def RunTestCoverage(toolpath):
     if toolpath:
         for path in toolpath:
             extra_args += ' --toolpath %s' % path
-    test_util.RunTestCoverage('tools/binman/binman', None,
+    test_util.run_test_coverage('tools/binman/binman', None,
             ['*test*', '*main.py', 'tools/patman/*', 'tools/dtoc/*'],
             args.build_dir, all_set, extra_args or None)
 
index c6af311a69b8b46026fcbf6811a5008979145052..01271061e6c450cbffe61f329e276bfa3def1951 100755 (executable)
@@ -41,12 +41,12 @@ def RunTests(skip_net_tests, verboose, args):
 
     # Run the entry tests first ,since these need to be the first to import the
     # 'entry' module.
-    test_util.RunTestSuites(
+    test_util.run_test_suites(
         result, False, verboose, False, None, test_name, [],
         [test.TestBuild, func_test.TestFunctional,
          'buildman.toolchain', 'patman.gitutil'])
 
-    return test_util.ReportResult('buildman', test_name, result)
+    return test_util.report_result('buildman', test_name, result)
 
 options, args = cmdline.ParseArgs()
 
index 276cfadf5a33663b4168a5ef8a31ae1302034f3a..fac9db9c786f1554d9f51af63debe78e57c8d285 100755 (executable)
@@ -55,17 +55,17 @@ def run_tests(processes, args):
 
     test_dtoc.setup()
 
-    test_util.RunTestSuites(
+    test_util.run_test_suites(
         result, debug=True, verbosity=1, test_preserve_dirs=False,
         processes=processes, test_name=test_name, toolpath=[],
         class_and_module_list=[test_dtoc.TestDtoc,test_src_scan.TestSrcScan])
 
-    return test_util.ReportResult('binman', test_name, result)
+    return test_util.report_result('binman', test_name, result)
 
 def RunTestCoverage():
     """Run the tests and check that we get 100% coverage"""
     sys.argv = [sys.argv[0]]
-    test_util.RunTestCoverage('tools/dtoc/dtoc', '/main.py',
+    test_util.run_test_coverage('tools/dtoc/dtoc', '/main.py',
             ['tools/patman/*.py', '*/fdt*', '*test*'], args.build_dir)
 
 
index 5a4e9e08145cb2bc4c66336cc727310cd3051d58..c789822afae0d01ffaf576fae57f16af1f6ea6f1 100755 (executable)
@@ -715,7 +715,7 @@ class TestFdtUtil(unittest.TestCase):
 
 def RunTestCoverage():
     """Run the tests and check that we get 100% coverage"""
-    test_util.RunTestCoverage('tools/dtoc/test_fdt.py', None,
+    test_util.run_test_coverage('tools/dtoc/test_fdt.py', None,
             ['tools/patman/*.py', '*test_fdt.py'], options.build_dir)
 
 
index 85073217b513c42eefbbfa20008e73c0fc776b14..7a6e910f4b31d1262f49bc919b9b4c37c4d71267 100755 (executable)
@@ -135,12 +135,12 @@ if args.cmd == 'test':
     from patman import func_test
 
     result = unittest.TestResult()
-    test_util.RunTestSuites(
+    test_util.run_test_suites(
         result, False, False, False, None, None, None,
         [test_checkpatch.TestPatch, func_test.TestFunctional,
          'gitutil', 'settings', 'terminal'])
 
-    sys.exit(test_util.ReportResult('patman', args.testname, result))
+    sys.exit(test_util.report_result('patman', args.testname, result))
 
 # Process commits, produce patches files, check them, email them
 elif args.cmd == 'send':
index c3f15f8a4bcde1c3d384386cbd494821854868a6..c60eb3628e23e522ea9d90dbf84be7242b68032d 100644 (file)
@@ -23,7 +23,7 @@ except:
     use_concurrent = False
 
 
-def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None,
+def run_test_coverage(prog, filter_fname, exclude_list, build_dir, required=None,
                     extra_args=None):
     """Run tests and check that we get 100% coverage
 
@@ -102,7 +102,7 @@ def capture_sys_output():
         sys.stdout, sys.stderr = old_out, old_err
 
 
-def ReportResult(toolname:str, test_name: str, result: unittest.TestResult):
+def report_result(toolname:str, test_name: str, result: unittest.TestResult):
     """Report the results from a suite of tests
 
     Args:
@@ -139,8 +139,8 @@ def ReportResult(toolname:str, test_name: str, result: unittest.TestResult):
     return 0
 
 
-def RunTestSuites(result, debug, verbosity, test_preserve_dirs, processes,
-                  test_name, toolpath, class_and_module_list):
+def run_test_suites(result, debug, verbosity, test_preserve_dirs, processes,
+                    test_name, toolpath, class_and_module_list):
     """Run a series of test suites and collect the results
 
     Args: