blob: e282c67335cd8a30568e826875ebcbc1a69be9f7 [file] [log] [blame]
Simon Glass02489322022-03-04 08:43:07 -07001# SPDX-License-Identifier: GPL-2.0+
2# Copyright 2021 Google LLC
3# Written by Simon Glass <sjg@chromium.org>
4
5import pytest
6import re
7import u_boot_utils as util
8
9# This is only a partial test - coverting 64-bit sandbox. It does not test
10# big-endian images, nor 32-bit images
11@pytest.mark.boardspec('sandbox')
12def test_event_dump(u_boot_console):
13 """Test that the "help" command can be executed."""
14 cons = u_boot_console
15 sandbox = cons.config.build_dir + '/u-boot'
16 out = util.run_and_log(cons, ['scripts/event_dump.py', sandbox])
17 expect = '''.*Event type Id Source location
18-------------------- ------------------------------ ------------------------------
Tom Rini2440d042022-11-22 12:31:55 -050019EVT_FT_FIXUP bootmeth_vbe_ft_fixup .*boot/vbe_request.c:.*
20EVT_FT_FIXUP bootmeth_vbe_simple_ft_fixup .*boot/vbe_simple_os.c:.*
Simon Glassaadec122023-09-20 07:29:51 -060021EVT_LAST_STAGE_INIT install_smbios_table .*lib/efi_loader/efi_smbios.c:.*
Simon Glassb8357c12023-08-21 21:16:56 -060022EVT_MISC_INIT_F sandbox_early_getopt_check .*arch/sandbox/cpu/start.c:.*
Simon Glass3bfbedd2023-08-21 21:16:48 -060023EVT_TEST h_adder_simple .*test/common/event.c:'''
Simon Glass02489322022-03-04 08:43:07 -070024 assert re.match(expect, out, re.MULTILINE) is not None