@classmethod
def tearDownClass(cls):
- tools._FinaliseForTest()
+ tools.FinaliseOutputDir()
def setUp(self):
self.dtb = fdt.FdtScan('tools/dtoc/dtoc_test_simple.dts')
@classmethod
def tearDownClass(cls):
- tools._FinaliseForTest()
+ tools.FinaliseOutputDir()
def setUp(self):
self.dtb = fdt.FdtScan('tools/dtoc/dtoc_test_simple.dts')
@classmethod
def tearDownClass(cls):
- tools._FinaliseForTest()
+ tools.FinaliseOutputDir()
def setUp(self):
self.dtb = fdt.FdtScan('tools/dtoc/dtoc_test_simple.dts')
self.node.SetData('empty', '123')
self.assertEqual('123', prop.bytes)
+ def testFromData(self):
+ dtb2 = fdt.Fdt.FromData(self.dtb.GetContents())
+ self.assertEqual(dtb2.GetContents(), self.dtb.GetContents())
+
+ self.node.AddEmptyProp('empty', 5)
+ self.dtb.Sync(auto_resize=True)
+ self.assertTrue(dtb2.GetContents() != self.dtb.GetContents())
+
class TestFdtUtil(unittest.TestCase):
"""Tests for the fdt_util module
def setUpClass(cls):
tools.PrepareOutputDir(None)
+ @classmethod
+ def tearDownClass(cls):
+ tools.FinaliseOutputDir()
+
def setUp(self):
self.dtb = fdt.FdtScan('tools/dtoc/dtoc_test_simple.dts')
self.node = self.dtb.GetNode('/spl-test')
parser = OptionParser()
parser.add_option('-B', '--build-dir', type='string', default='b',
help='Directory containing the build output')
+parser.add_option('-P', '--processes', type=int,
+ help='set number of processes to use for running tests')
parser.add_option('-t', '--test', action='store_true', dest='test',
default=False, help='run tests')
parser.add_option('-T', '--test-coverage', action='store_true',