test_ofplatdata.py 763 B

1234567891011121314151617181920212223
  1. # SPDX-License-Identifier: GPL-2.0+
  2. # Copyright (c) 2016 Google, Inc
  3. import pytest
  4. import u_boot_utils as util
  5. @pytest.mark.boardspec('sandbox_spl')
  6. @pytest.mark.buildconfigspec('spl_of_platdata')
  7. def test_spl_devicetree(u_boot_console):
  8. """Test content of spl device-tree"""
  9. cons = u_boot_console
  10. dtb = cons.config.build_dir + '/spl/u-boot-spl.dtb'
  11. fdtgrep = cons.config.build_dir + '/tools/fdtgrep'
  12. output = util.run_and_log(cons, [fdtgrep, '-l', dtb])
  13. assert "u-boot,dm-pre-reloc" not in output
  14. assert "u-boot,dm-pre-proper" not in output
  15. assert "u-boot,dm-spl" not in output
  16. assert "u-boot,dm-tpl" not in output
  17. assert "spl-test5" not in output
  18. assert "spl-test6" not in output
  19. assert "spl-test7" in output