From patchwork Sun Jun 14 16:54:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 242328 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Sun, 14 Jun 2020 10:54:04 -0600 Subject: [PATCH 1/5] patman: Rename test.py to test_checkpatch.py In-Reply-To: <20200614165409.158795-1-sjg@chromium.org> References: <20200614165409.158795-1-sjg@chromium.org> Message-ID: <20200614165409.158795-2-sjg@chromium.org> These tests check checkpatch.pl operation and can server as our tests for the U-Boot-specific updates to that script. Rename the file and update comments to indicate this. Signed-off-by: Simon Glass --- tools/patman/main.py | 4 ++-- tools/patman/{test.py => test_checkpatch.py} | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) rename tools/patman/{test.py => test_checkpatch.py} (98%) diff --git a/tools/patman/main.py b/tools/patman/main.py index 0974c84059..4a11f80db5 100755 --- a/tools/patman/main.py +++ b/tools/patman/main.py @@ -25,7 +25,7 @@ from patman import patchstream from patman import project from patman import settings from patman import terminal -from patman import test +from patman import test_checkpatch parser = OptionParser() @@ -93,7 +93,7 @@ elif options.test: sys.argv = [sys.argv[0]] result = unittest.TestResult() - for module in (test.TestPatch, func_test.TestFunctional): + for module in (test_checkpatch.TestPatch, func_test.TestFunctional): suite = unittest.TestLoader().loadTestsFromTestCase(module) suite.run(result) diff --git a/tools/patman/test.py b/tools/patman/test_checkpatch.py similarity index 98% rename from tools/patman/test.py rename to tools/patman/test_checkpatch.py index e7f709e34c..03ff576c9e 100644 --- a/tools/patman/test.py +++ b/tools/patman/test_checkpatch.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- # SPDX-License-Identifier: GPL-2.0+ # +# Tests for U-Boot-specific checkpatch.pl features +# # Copyright (c) 2011 The Chromium OS Authors. # @@ -16,10 +18,7 @@ from patman import commit class TestPatch(unittest.TestCase): - """Test this program - - TODO: Write tests for the rest of the functionality - """ + """Test the u_boot_line() function in checkpatch.pl""" def testBasic(self): """Test basic filter operation"""