diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-05-11 11:24:57 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-11 18:33:42 +0000 |
commit | a7dcd8bee64670e98d6169bcd512cc851a7613f3 (patch) | |
tree | a45b282d7f60a95c6f997bf171c4a31640ce6db7 | |
parent | c8438c23ba0e458acf099a802ebc34cc1cb81555 (diff) | |
download | chrome-ec-a7dcd8bee64670e98d6169bcd512cc851a7613f3.tar.gz |
ec: Include the pd console command in tests
Stop special casing TEST_BUILD and instead use TEST_USB_PD_CONSOLE as
the special case.
TEST_USB_PD_CONSOLE expects command_pd to be non-static, but the
DECLARE_CONSOLE_COMMAND really wants it to be static.
BRANCH=None
BUG=b:222240738
TEST=make runhosttests && zmake testall
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: Ib7b01d870af6ddbe6ba70b6f751ecadd6d23ec1e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3642537
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Al Semjonovs <asemjonovs@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Al Semjonovs <asemjonovs@google.com>
-rw-r--r-- | common/usbc/usb_pd_console.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/usbc/usb_pd_console.c b/common/usbc/usb_pd_console.c index 863c238d20..6b1ea259eb 100644 --- a/common/usbc/usb_pd_console.c +++ b/common/usbc/usb_pd_console.c @@ -13,7 +13,10 @@ #include "usb_pd.h" #include "util.h" -test_export_static int command_pd(int argc, char **argv) +#ifndef TEST_USB_PD_CONSOLE +static +#endif +int command_pd(int argc, char **argv) { int port; char *e; @@ -191,7 +194,7 @@ test_export_static int command_pd(int argc, char **argv) return EC_SUCCESS; } -#ifndef TEST_BUILD +#ifndef TEST_USB_PD_CONSOLE DECLARE_CONSOLE_COMMAND(pd, command_pd, "version" "\ndump [0|1|2|3]" |