diff options
author | Simon Glass <sjg@chromium.org> | 2017-05-29 15:31:31 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-06-08 20:21:59 -0600 |
commit | 6e87ae1c0730ec99b6824c2a3dc8510813f92b98 (patch) | |
tree | 9c604a63b0fe8a2d9c6f475c98ad7ebffd7c1c81 /tools/patman/patman.py | |
parent | a44f4fb72bcb954bf38385e2953f7320b9f25aa3 (diff) |
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 <sjg@chromium.org>
Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'tools/patman/patman.py')
-rwxr-xr-x | tools/patman/patman.py | 6 |
1 files changed, 4 insertions, 2 deletions
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) |