From 6e87ae1c0730ec99b6824c2a3dc8510813f92b98 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 29 May 2017 15:31:31 -0600 Subject: patman: Add a functional test The existing test (patman --test) only covers basic checkpatch output. We have had some problems with unicode processing and could use test coverage for the various tags patman supports. Add a new functional test which runs most of the patman flow on a few test commits and checks that the results are correct. See the documentation in the test for a description of what it does. Signed-off-by: Simon Glass Tested-by: Philipp Tomsich --- tools/patman/patman.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tools/patman/patman.py') diff --git a/tools/patman/patman.py b/tools/patman/patman.py index 63da3f3200..4b3bc78745 100755 --- a/tools/patman/patman.py +++ b/tools/patman/patman.py @@ -82,11 +82,13 @@ if __name__ != "__main__": # Run our meagre tests elif options.test: import doctest + import func_test sys.argv = [sys.argv[0]] - suite = unittest.TestLoader().loadTestsFromTestCase(test.TestPatch) result = unittest.TestResult() - suite.run(result) + for module in (test.TestPatch, func_test.TestFunctional): + suite = unittest.TestLoader().loadTestsFromTestCase(module) + suite.run(result) for module in ['gitutil', 'settings']: suite = doctest.DocTestSuite(module) -- cgit v1.2.3