blob: 05347d87106dd8dae2dc7df83d1919f714f14ebf [file] [log] [blame]
Simon Glassb255efc2022-04-24 23:31:24 -06001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Test for bootdev functions. All start with 'bootdev'
4 *
5 * Copyright 2021 Google LLC
6 * Written by Simon Glass <sjg@chromium.org>
7 */
8
9#include <common.h>
10#include <bootstd.h>
11#include <dm.h>
12#include <test/suites.h>
13#include <test/ut.h>
14#include "bootstd_common.h"
15
16int bootstd_test_drop_bootdev_order(struct unit_test_state *uts)
17{
18 struct bootstd_priv *priv;
19 struct udevice *bootstd;
20
21 ut_assertok(uclass_first_device_err(UCLASS_BOOTSTD, &bootstd));
22 priv = dev_get_priv(bootstd);
23 priv->bootdev_order = NULL;
24
25 return 0;
26}
27
28int do_ut_bootstd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
29{
30 struct unit_test *tests = UNIT_TEST_SUITE_START(bootstd_test);
31 const int n_ents = UNIT_TEST_SUITE_COUNT(bootstd_test);
32
33 return cmd_ut_category("bootstd", "bootstd_test_",
34 tests, n_ents, argc, argv);
35}