3 # Copyright (c) 2012 The Chromium OS Authors.
5 # SPDX-License-Identifier: GPL-2.0+
8 """See README for more information"""
10 import multiprocessing
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'))
33 def RunTests(skip_net_tests):
38 result = unittest.TestResult()
39 for module in ['toolchain', 'gitutil']:
40 suite = doctest.DocTestSuite(module)
43 sys.argv = [sys.argv[0]]
45 test.use_network = False
46 for module in (test.TestBuild, func_test.TestFunctional):
47 suite = unittest.TestLoader().loadTestsFromTestCase(module)
51 for test, err in result.errors:
53 for test, err in result.failures:
57 options, args = cmdline.ParseArgs()
59 # Run our meagre tests
61 RunTests(options.skip_net_tests)
63 # Build selected commits for selected boards
65 bsettings.Setup(options.config_file)
66 ret_code = control.DoBuildman(options, args)