aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dtoc/test_dtoc.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-02-03 06:01:09 -0700
committerSimon Glass <sjg@chromium.org>2021-03-22 19:23:27 +1300
commit074197aadfef2cfe437ecc1fe057ef21f4eef0da (patch)
treee3350a8c476333bca7e5a3dfd32fb8ec9f6e04c0 /tools/dtoc/test_dtoc.py
parent1712f8b2b748ec96442e36d733d421a7ebaa1168 (diff)
downloadu-boot-074197aadfef2cfe437ecc1fe057ef21f4eef0da.tar.gz
dtoc: Assign a sequence number to each node
Now that we have the alias information we can assign a sequence number to each device in the uclass. Store this in the node associated with each device. This requires renaming the sandbox test drivers to have the right name. Note that test coverage is broken with this patch, but fixed in the next one. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/dtoc/test_dtoc.py')
-rwxr-xr-xtools/dtoc/test_dtoc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/dtoc/test_dtoc.py b/tools/dtoc/test_dtoc.py
index 706cc39b3d5..b4c0a042a9f 100755
--- a/tools/dtoc/test_dtoc.py
+++ b/tools/dtoc/test_dtoc.py
@@ -1092,3 +1092,9 @@ U_BOOT_DRVINFO(spl_test2) = {
plat = self.run_test(['struct'], dtb_file, output)
self.assertEqual("Could not find uclass for alias 'other1'",
stdout.getvalue().strip())
+
+ def test_sequence(self):
+ """Test assignment of sequence numnbers"""
+ dtb_file = get_dtb_file('dtoc_test_inst.dts')
+ output = tools.GetOutputFilename('output')
+ plat = self.run_test(['struct'], dtb_file, output)