]> git.ipfire.org Git - people/ms/u-boot.git/blob - tools/buildman/buildman.py
Remove CONFIG_SYS_BOOTCOUNT_SINGLEWORD
[people/ms/u-boot.git] / tools / buildman / buildman.py
1 #!/usr/bin/env python2
2 #
3 # Copyright (c) 2012 The Chromium OS Authors.
4 #
5 # SPDX-License-Identifier: GPL-2.0+
6 #
7
8 """See README for more information"""
9
10 import multiprocessing
11 import os
12 import re
13 import sys
14 import unittest
15
16 # Bring in the patman libraries
17 our_path = os.path.dirname(os.path.realpath(__file__))
18 sys.path.insert(1, os.path.join(our_path, '../patman'))
19
20 # Our modules
21 import board
22 import bsettings
23 import builder
24 import checkpatch
25 import cmdline
26 import control
27 import doctest
28 import gitutil
29 import patchstream
30 import terminal
31 import toolchain
32
33 def RunTests(skip_net_tests):
34 import func_test
35 import test
36 import doctest
37
38 result = unittest.TestResult()
39 for module in ['toolchain', 'gitutil']:
40 suite = doctest.DocTestSuite(module)
41 suite.run(result)
42
43 sys.argv = [sys.argv[0]]
44 if skip_net_tests:
45 test.use_network = False
46 for module in (test.TestBuild, func_test.TestFunctional):
47 suite = unittest.TestLoader().loadTestsFromTestCase(module)
48 suite.run(result)
49
50 print result
51 for test, err in result.errors:
52 print err
53 for test, err in result.failures:
54 print err
55
56
57 options, args = cmdline.ParseArgs()
58
59 # Run our meagre tests
60 if options.test:
61 RunTests(options.skip_net_tests)
62
63 # Build selected commits for selected boards
64 else:
65 bsettings.Setup(options.config_file)
66 ret_code = control.DoBuildman(options, args)
67 sys.exit(ret_code)