summaryrefslogtreecommitdiff
path: root/tools/buildman/buildman.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-11-12 21:52:14 -0700
committerSimon Glass <sjg@chromium.org>2017-11-22 18:05:38 -0700
commitcb39a10979383921217e979b2aa0808babb877d3 (patch)
tree28b5d2abcbd3ac93bfc82c286ede6aa30debdd01 /tools/buildman/buildman.py
parent6c328f29752224f15b7f098d8676f9eeed269a85 (diff)
buildman: Allow skipping of tests which use the network
Accessing the network slows down the test and limits the environment in which it can be run. Add an option to disable network tests. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/buildman/buildman.py')
-rwxr-xr-xtools/buildman/buildman.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/buildman/buildman.py b/tools/buildman/buildman.py
index 607429df7bc..11a4f162c5f 100755
--- a/tools/buildman/buildman.py
+++ b/tools/buildman/buildman.py
@@ -30,7 +30,7 @@ import patchstream
import terminal
import toolchain
-def RunTests():
+def RunTests(skip_net_tests):
import func_test
import test
import doctest
@@ -41,6 +41,8 @@ def RunTests():
suite.run(result)
sys.argv = [sys.argv[0]]
+ if skip_net_tests:
+ test.use_network = False
for module in (test.TestBuild, func_test.TestFunctional):
suite = unittest.TestLoader().loadTestsFromTestCase(module)
suite.run(result)
@@ -56,7 +58,7 @@ options, args = cmdline.ParseArgs()
# Run our meagre tests
if options.test:
- RunTests()
+ RunTests(options.skip_net_tests)
# Build selected commits for selected boards
else: