blob: d55338e37e6f2fb1440f8ee98069236118e642f7 [file] [log] [blame]
Simon Glassc405fc42016-07-04 11:58:41 -06001# SPDX-License-Identifier: GPL-2.0+
Tom Rini10e47792018-05-06 17:58:06 -04002# Copyright (c) 2016 Google, Inc
Simon Glassc405fc42016-07-04 11:58:41 -06003
4import pytest
Patrick Delaunayae84ff12019-05-21 19:19:11 +02005import u_boot_utils as util
Simon Glassc405fc42016-07-04 11:58:41 -06006
Patrick Delaunayae84ff12019-05-21 19:19:11 +02007@pytest.mark.buildconfigspec('spl_of_platdata')
8def test_spl_devicetree(u_boot_console):
9 """Test content of spl device-tree"""
10 cons = u_boot_console
11 dtb = cons.config.build_dir + '/spl/u-boot-spl.dtb'
12 fdtgrep = cons.config.build_dir + '/tools/fdtgrep'
13 output = util.run_and_log(cons, [fdtgrep, '-l', dtb])
14
15 assert "u-boot,dm-pre-reloc" not in output
16 assert "u-boot,dm-pre-proper" not in output
17 assert "u-boot,dm-spl" not in output
18 assert "u-boot,dm-tpl" not in output
19
Patrick Delaunayae84ff12019-05-21 19:19:11 +020020 assert "spl-test5" not in output
21 assert "spl-test6" not in output
22 assert "spl-test7" in output