import command
import commit
import terminal
+import test_util
import toolchain
use_network = True
def testToolchainDownload(self):
"""Test that we can download toolchains"""
if use_network:
- url = self.toolchains.LocateArchUrl('arm')
+ with test_util.capture_sys_output() as (stdout, stderr):
+ url = self.toolchains.LocateArchUrl('arm')
self.assertRegexpMatches(url, 'https://www.kernel.org/pub/tools/'
'crosstool/files/bin/x86_64/.*/'
'x86_64-gcc-.*-nolibc_arm-.*linux-gnueabi.tar.xz')
def test_phandle_bad(self):
"""Test a node containing an invalid phandle fails"""
- dtb_file = get_dtb_file('dtoc_test_phandle_bad.dts')
+ dtb_file = get_dtb_file('dtoc_test_phandle_bad.dts',
+ capture_stderr=True)
output = tools.GetOutputFilename('output')
with self.assertRaises(ValueError) as e:
dtb_platdata.run_steps(['struct'], dtb_file, False, output)
def test_phandle_bad2(self):
"""Test a phandle target missing its #*-cells property"""
- dtb_file = get_dtb_file('dtoc_test_phandle_bad2.dts')
+ dtb_file = get_dtb_file('dtoc_test_phandle_bad2.dts',
+ capture_stderr=True)
output = tools.GetOutputFilename('output')
with self.assertRaises(ValueError) as e:
dtb_platdata.run_steps(['struct'], dtb_file, False, output)