mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-13 20:36:02 +01:00
At present there is a confusing array of functions that handle the device tree fix-ups needed for booting an OS. We should be able to switch to using events to clean this up. As a first step, create a new event type and call it from the standard place. Note that this event uses the ofnode interface only, since this can support live tree which is more efficient when making lots of updates. Signed-off-by: Simon Glass <sjg@chromium.org>
22 lines
938 B
Python
22 lines
938 B
Python
# SPDX-License-Identifier: GPL-2.0+
|
|
# Copyright 2021 Google LLC
|
|
# Written by Simon Glass <sjg@chromium.org>
|
|
|
|
import pytest
|
|
import re
|
|
import u_boot_utils as util
|
|
|
|
# This is only a partial test - coverting 64-bit sandbox. It does not test
|
|
# big-endian images, nor 32-bit images
|
|
@pytest.mark.boardspec('sandbox')
|
|
def test_event_dump(u_boot_console):
|
|
"""Test that the "help" command can be executed."""
|
|
cons = u_boot_console
|
|
sandbox = cons.config.build_dir + '/u-boot'
|
|
out = util.run_and_log(cons, ['scripts/event_dump.py', sandbox])
|
|
expect = '''.*Event type Id Source location
|
|
-------------------- ------------------------------ ------------------------------
|
|
EVT_FT_FIXUP bootmeth_vbe_simple_ft_fixup boot/vbe_simple.c:.*
|
|
EVT_MISC_INIT_F sandbox_misc_init_f .*arch/sandbox/cpu/start.c:'''
|
|
assert re.match(expect, out, re.MULTILINE) is not None
|