summaryrefslogtreecommitdiff
path: root/test/dm/cros_ec.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/dm/cros_ec.c')
-rw-r--r--test/dm/cros_ec.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/dm/cros_ec.c b/test/dm/cros_ec.c
index 823245ca70..3d0e5dc08d 100644
--- a/test/dm/cros_ec.c
+++ b/test/dm/cros_ec.c
@@ -30,3 +30,20 @@ static int dm_test_cros_ec_hello(struct unit_test_state *uts)
return 0;
}
DM_TEST(dm_test_cros_ec_hello, UT_TESTF_SCAN_FDT);
+
+static int dm_test_cros_ec_sku_id(struct unit_test_state *uts)
+{
+ struct udevice *dev;
+
+ ut_assertok(uclass_first_device_err(UCLASS_CROS_EC, &dev));
+ ut_asserteq(1234, cros_ec_get_sku_id(dev));
+
+ /* try the command */
+ console_record_reset();
+ ut_assertok(run_command("crosec sku", 0));
+ ut_assert_nextline("1234");
+ ut_assert_console_end();
+
+ return 0;
+}
+DM_TEST(dm_test_cros_ec_sku_id, UT_TESTF_SCAN_FDT);