2 # SPDX-License-Identifier: GPL-2.0+
4 # Copyright (c) 2012 The Chromium OS Authors.
7 """See README for more information"""
15 # Bring in the patman libraries
16 our_path = os.path.dirname(os.path.realpath(__file__))
17 sys.path.insert(1, os.path.join(our_path, '../patman'))
32 def RunTests(skip_net_tests):
37 result = unittest.TestResult()
38 for module in ['toolchain', 'gitutil']:
39 suite = doctest.DocTestSuite(module)
42 sys.argv = [sys.argv[0]]
44 test.use_network = False
45 for module in (test.TestBuild, func_test.TestFunctional):
46 suite = unittest.TestLoader().loadTestsFromTestCase(module)
50 for test, err in result.errors:
52 for test, err in result.failures:
56 options, args = cmdline.ParseArgs()
58 # Run our meagre tests
60 RunTests(options.skip_net_tests)
62 # Build selected commits for selected boards
64 bsettings.Setup(options.config_file)
65 ret_code = control.DoBuildman(options, args)