diff options
author | Simon Glass <sjg@chromium.org> | 2014-09-05 19:00:13 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2014-09-09 16:38:28 -0600 |
commit | d4144e45b4245c60f50d456293cad2f53373efcd (patch) | |
tree | 9f7e1454f8e6a69a8d3edb1c2c4a97349cca60df /tools/buildman/buildman.py | |
parent | 82012dd284257ce785b1e3996a9a2519e8a4b303 (diff) |
buildman: Add a functional test
Buildman currently lacks testing in many areas, including its use of git,
make and many command-line flags.
Add a functional test which covers some of these areas. So far it does
a fake 'build' of all boards for the current source tree.
This version reads the real ~/.buildman and boards.cfg files. Future work
will improve this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/buildman.py')
-rwxr-xr-x | tools/buildman/buildman.py | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/tools/buildman/buildman.py b/tools/buildman/buildman.py index 70c2142901..6771c862d3 100755 --- a/tools/buildman/buildman.py +++ b/tools/buildman/buildman.py @@ -30,27 +30,20 @@ import terminal import toolchain def RunTests(): + import func_test import test import doctest result = unittest.TestResult() - for module in ['toolchain']: + for module in ['toolchain', 'gitutil']: suite = doctest.DocTestSuite(module) suite.run(result) - # TODO: Surely we can just 'print' result? - print result - for test, err in result.errors: - print err - for test, err in result.failures: - print err - sys.argv = [sys.argv[0]] - suite = unittest.TestLoader().loadTestsFromTestCase(test.TestBuild) - result = unittest.TestResult() - suite.run(result) + for module in (test.TestBuild, func_test.TestFunctional): + suite = unittest.TestLoader().loadTestsFromTestCase(module) + suite.run(result) - # TODO: Surely we can just 'print' result? print result for test, err in result.errors: print err |