import terminal
import toolchain
-def RunTests():
+def RunTests(skip_net_tests):
import func_test
import test
import doctest
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)
# Run our meagre tests
if options.test:
- RunTests()
+ RunTests(options.skip_net_tests)
# Build selected commits for selected boards
else:
default=False, help='Show a build summary')
parser.add_option('-S', '--show-sizes', action='store_true',
default=False, help='Show image size variation in summary')
+ parser.add_option('--skip-net-tests', action='store_true', default=False,
+ help='Skip tests which need the network')
parser.add_option('--step', type='int',
default=1, help='Only build every n commits (0=just first and last)')
parser.add_option('-t', '--test', action='store_true', dest='test',
import terminal
import toolchain
+use_network = True
+
settings_data = '''
# Buildman settings file
def testToolchainDownload(self):
"""Test that we can download toolchains"""
- self.assertEqual('https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_arm-unknown-linux-gnueabi.tar.xz',
- self.toolchains.LocateArchUrl('arm'))
+ if use_network:
+ self.assertEqual('https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/x86_64-gcc-4.9.0-nolibc_arm-unknown-linux-gnueabi.tar.xz',
+ self.toolchains.LocateArchUrl('arm'))
if __name__ == "__main__":