Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 91DC2C433EF for ; Sat, 29 Jan 2022 21:16:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2298183831; Sat, 29 Jan 2022 22:15:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Xz+MbARj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7637F836AD; Sat, 29 Jan 2022 22:14:50 +0100 (CET) Received: from mail-io1-xd30.google.com (mail-io1-xd30.google.com [IPv6:2607:f8b0:4864:20::d30]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5DE07836C1 for ; Sat, 29 Jan 2022 22:14:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd30.google.com with SMTP id s18so12003776ioa.12 for ; Sat, 29 Jan 2022 13:14:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z56IqF9l505JacRfWDgOOcFUDpfBUZ8GC7g1QYF2vz4=; b=Xz+MbARj7yAdxdY6rv4Uq2lRm17hxf2QGEjK4YtNSx8mYNdSyQOQiiT2j0nnx3jnNh pR4Hl2koFSGFhZBex0chiSRPE+qvNH+XuvWnR6V2mogkjSQV3M51Z5Eb9l1/QA7XoXOL DIalb8VVO5ue1fRJG2U1ppMwAGGYbwo5U803k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z56IqF9l505JacRfWDgOOcFUDpfBUZ8GC7g1QYF2vz4=; b=wkVzY25yaCGW/qd7OZLFHz+0Ern0Eo9KmFmlGfESj+bajEqQPSK0CfZ7NyHWhq4vnL gug0hWVaEr9uVIZfHkygfgjOY+kUauDWa4BRx4z7m74d7ta8I/oGgpC57JjORTiBovad NvRce8NdlkbuYMkPL/VjnD1u+K61BJT+7fyzm5OxmvlkG0t+BjBQSLFJy642Pm2zcmae m47br8nYtAt47icjQZb5s3BK1F1hJvPBEgMeDb3Tqxi58gLf7926b9WD6s0yQLbSjrIa OgNGhNmtAjnZiwoaG9PsOSltMsvQP2XaiDQM5ghy1jsZhrQMb5EqnNQKXUR4RGMSKMxx 04wA== X-Gm-Message-State: AOAM531RSlgx+GPQOwIHKS5iR+8EcbPE/yjBqMVxBGuKA24Wim8zFgNh Z9GHgH7E7beiWEPOSyLEfV2+nfwi39jXgw== X-Google-Smtp-Source: ABdhPJwj424mqRj3n9ayOqePjz2NU1MQ6Af8Rb8lDFdCHMXB/WmeJ/ruZ6xdIF8dHF8Dn6m0A7Sofg== X-Received: by 2002:a05:6602:1345:: with SMTP id i5mr8241744iov.143.1643490880999; Sat, 29 Jan 2022 13:14:40 -0800 (PST) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id c3sm17218110iow.28.2022.01.29.13.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jan 2022 13:14:40 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Tom Rini , Simon Glass , Walter Lozano Subject: [PATCH 11/17] patman: Convert camel case in test_util.py Date: Sat, 29 Jan 2022 14:14:14 -0700 Message-Id: <20220129211420.528117-12-sjg@chromium.org> X-Mailer: git-send-email 2.35.0.rc2.247.g8bbb082509-goog In-Reply-To: <20220129211420.528117-1-sjg@chromium.org> References: <20220129211420.528117-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass --- tools/binman/main.py | 6 +++--- tools/dtoc/main.py | 6 +++--- tools/dtoc/test_fdt.py | 2 +- tools/patman/main.py | 2 +- tools/patman/test_util.py | 6 +++--- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/binman/main.py b/tools/binman/main.py index 03462e7bb8b..ab25b48b5fb 100755 --- a/tools/binman/main.py +++ b/tools/binman/main.py @@ -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) diff --git a/tools/dtoc/main.py b/tools/dtoc/main.py index 6f9b526bd74..0a5bd4b88e6 100755 --- a/tools/dtoc/main.py +++ b/tools/dtoc/main.py @@ -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=[], test_class_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) diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py index 5a4e9e08145..c789822afae 100755 --- a/tools/dtoc/test_fdt.py +++ b/tools/dtoc/test_fdt.py @@ -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) diff --git a/tools/patman/main.py b/tools/patman/main.py index c75e8c4f51d..11cf72835a9 100755 --- a/tools/patman/main.py +++ b/tools/patman/main.py @@ -152,7 +152,7 @@ if args.cmd == 'test': suite = doctest.DocTestSuite(module) suite.run(result) - 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': diff --git a/tools/patman/test_util.py b/tools/patman/test_util.py index 5d51a7743a0..bbb210ac9a4 100644 --- a/tools/patman/test_util.py +++ b/tools/patman/test_util.py @@ -22,7 +22,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 @@ -101,7 +101,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: @@ -138,7 +138,7 @@ def ReportResult(toolname:str, test_name: str, result: unittest.TestResult): return 0 -def RunTestSuites(result, debug, verbosity, test_preserve_dirs, processes, +def run_test_suites(result, debug, verbosity, test_preserve_dirs, processes, test_name, toolpath, test_class_list): """Run a series of test suites and collect the results -- 2.35.0.rc2.247.g8bbb082509-goog