Simon Glass | c405fc4 | 2016-07-04 11:58:41 -0600 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 2 | # Copyright (c) 2016 Google, Inc |
Simon Glass | c405fc4 | 2016-07-04 11:58:41 -0600 | [diff] [blame] | 3 | |
| 4 | import pytest |
Patrick Delaunay | ae84ff1 | 2019-05-21 19:19:11 +0200 | [diff] [blame] | 5 | import u_boot_utils as util |
Simon Glass | c405fc4 | 2016-07-04 11:58:41 -0600 | [diff] [blame] | 6 | |
Simon Glass | 2a4b03f | 2021-03-07 17:34:41 -0700 | [diff] [blame] | 7 | @pytest.mark.boardspec('sandbox_spl') |
Patrick Delaunay | ae84ff1 | 2019-05-21 19:19:11 +0200 | [diff] [blame] | 8 | @pytest.mark.buildconfigspec('spl_of_platdata') |
| 9 | def test_spl_devicetree(u_boot_console): |
| 10 | """Test content of spl device-tree""" |
| 11 | cons = u_boot_console |
| 12 | dtb = cons.config.build_dir + '/spl/u-boot-spl.dtb' |
| 13 | fdtgrep = cons.config.build_dir + '/tools/fdtgrep' |
| 14 | output = util.run_and_log(cons, [fdtgrep, '-l', dtb]) |
| 15 | |
| 16 | assert "u-boot,dm-pre-reloc" not in output |
| 17 | assert "u-boot,dm-pre-proper" not in output |
| 18 | assert "u-boot,dm-spl" not in output |
| 19 | assert "u-boot,dm-tpl" not in output |
| 20 | |
Patrick Delaunay | ae84ff1 | 2019-05-21 19:19:11 +0200 | [diff] [blame] | 21 | assert "spl-test5" not in output |
| 22 | assert "spl-test6" not in output |
| 23 | assert "spl-test7" in output |