blob: b4d2db03deb85d800c75ff1cb3e774ae20665d2a [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
Simon Glassdb0e4532025-02-09 09:07:16 -07005import utils
Simon Glassc405fc42016-07-04 11:58:41 -06006
Simon Glass2a4b03f2021-03-07 17:34:41 -07007@pytest.mark.boardspec('sandbox_spl')
Patrick Delaunayae84ff12019-05-21 19:19:11 +02008@pytest.mark.buildconfigspec('spl_of_platdata')
Simon Glassddba5202025-02-09 09:07:14 -07009def test_spl_devicetree(ubman):
Patrick Delaunayae84ff12019-05-21 19:19:11 +020010 """Test content of spl device-tree"""
Simon Glassddba5202025-02-09 09:07:14 -070011 cons = ubman
Patrick Delaunayae84ff12019-05-21 19:19:11 +020012 dtb = cons.config.build_dir + '/spl/u-boot-spl.dtb'
13 fdtgrep = cons.config.build_dir + '/tools/fdtgrep'
Simon Glassdb0e4532025-02-09 09:07:16 -070014 output = utils.run_and_log(cons, [fdtgrep, '-l', dtb])
Patrick Delaunayae84ff12019-05-21 19:19:11 +020015
Simon Glassfc1aa352023-02-13 08:56:34 -070016 assert "bootph-all" not in output
17 assert "bootph-some-ram" not in output
18 assert "bootph-pre-ram" not in output
19 assert "bootph-pre-sram" not in output
Patrick Delaunayae84ff12019-05-21 19:19:11 +020020
Patrick Delaunayae84ff12019-05-21 19:19:11 +020021 assert "spl-test5" not in output
22 assert "spl-test6" not in output
23 assert "spl-test7" in output