]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - tools/buildman/main.py
2 # SPDX-License-Identifier: GPL-2.0+
4 # Copyright (c) 2012 The Chromium OS Authors.
7 """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
, '..'))
21 from buildman
import board
22 from buildman
import bsettings
23 from buildman
import builder
24 from buildman
import cmdline
25 from buildman
import control
26 from buildman
import toolchain
27 from patman
import patchstream
28 from patman
import gitutil
29 from patman
import terminal
31 def RunTests(skip_net_tests
):
36 result
= unittest
.TestResult()
37 for module
in ['buildman.toolchain', 'patman.gitutil']:
38 suite
= doctest
.DocTestSuite(module
)
41 sys
.argv
= [sys
.argv
[0]]
43 test
.use_network
= False
44 for module
in (test
.TestBuild
, func_test
.TestFunctional
):
45 suite
= unittest
.TestLoader().loadTestsFromTestCase(module
)
49 for test
, err
in result
.errors
:
51 for test
, err
in result
.failures
:
55 options
, args
= cmdline
.ParseArgs()
57 # Run our meagre tests
59 RunTests(options
.skip_net_tests
)
61 # Build selected commits for selected boards
63 bsettings
.Setup(options
.config_file
)
64 ret_code
= control
.DoBuildman(options
, args
)