blob: b9d48f54dc2bc5b076306d5723c486e4674080a9 [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
Simon Glassdb0e4532025-02-09 09:07:16 -07007import utils
Simon Glass02489322022-03-04 08:43:07 -07008
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')
Simon Glassddba5202025-02-09 09:07:14 -070012def test_event_dump(ubman):
Simon Glass02489322022-03-04 08:43:07 -070013 """Test that the "help" command can be executed."""
Simon Glass32701112025-02-09 09:07:17 -070014 sandbox = ubman.config.build_dir + '/u-boot'
15 out = utils.run_and_log(ubman, ['scripts/event_dump.py', sandbox])
Simon Glass02489322022-03-04 08:43:07 -070016 expect = '''.*Event type Id Source location
17-------------------- ------------------------------ ------------------------------
Tom Rini2440d042022-11-22 12:31:55 -050018EVT_FT_FIXUP bootmeth_vbe_ft_fixup .*boot/vbe_request.c:.*
19EVT_FT_FIXUP bootmeth_vbe_simple_ft_fixup .*boot/vbe_simple_os.c:.*
Patrick Rudolph158efd62024-10-23 15:19:57 +020020EVT_LAST_STAGE_INIT alloc_write_acpi_tables .*lib/acpi/acpi_table.c:.*
Heinrich Schuchardt41ae6f02025-02-15 16:22:06 +010021EVT_LAST_STAGE_INIT efi_block_device_create .*lib/efi_driver/efi_block_device.c:.*
Simon Glassaadec122023-09-20 07:29:51 -060022EVT_LAST_STAGE_INIT install_smbios_table .*lib/efi_loader/efi_smbios.c:.*
Simon Glassb8357c12023-08-21 21:16:56 -060023EVT_MISC_INIT_F sandbox_early_getopt_check .*arch/sandbox/cpu/start.c:.*
Simon Glass3bfbedd2023-08-21 21:16:48 -060024EVT_TEST h_adder_simple .*test/common/event.c:'''
Simon Glass02489322022-03-04 08:43:07 -070025 assert re.match(expect, out, re.MULTILINE) is not None