summaryrefslogtreecommitdiff
path: root/tools/patman/patman.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-29 21:31:31 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-09 02:21:59 (GMT)
commit6e87ae1c0730ec99b6824c2a3dc8510813f92b98 (patch)
tree9c604a63b0fe8a2d9c6f475c98ad7ebffd7c1c81 /tools/patman/patman.py
parenta44f4fb72bcb954bf38385e2953f7320b9f25aa3 (diff)
downloadu-boot-6e87ae1c0730ec99b6824c2a3dc8510813f92b98.tar.xz
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-xtools/patman/patman.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/patman/patman.py b/tools/patman/patman.py
index 63da3f3..4b3bc78 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)