diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-10-30 09:19:47 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-31 00:42:20 +0000 |
commit | ad1ed0d4d0295ffe45023d0099f264e2fa436bd8 (patch) | |
tree | ce23baa4adf79dd0fd77b706b2b90ab18f288220 /common/mock/usb_pd_mock.c | |
parent | affd2a81b625986a1fbafa6407eb2d85c7dd48a6 (diff) | |
download | chrome-ec-ad1ed0d4d0295ffe45023d0099f264e2fa436bd8.tar.gz |
common/mock: Make sure mocks are only in the test build
BRANCH=none
BUG=b:171370392
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I1517a7080bd4853918ffc7127d44e1955d925789
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2510455
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'common/mock/usb_pd_mock.c')
-rw-r--r-- | common/mock/usb_pd_mock.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/mock/usb_pd_mock.c b/common/mock/usb_pd_mock.c index 653c98c78e..b699fd72ec 100644 --- a/common/mock/usb_pd_mock.c +++ b/common/mock/usb_pd_mock.c @@ -11,6 +11,10 @@ #include "mock/usb_pd_mock.h" #include "memory.h" +#ifndef TEST_BUILD +#error "Mocks should only be in the test build." +#endif + struct mock_pd_port_t mock_pd_port[CONFIG_USB_PD_PORT_MAX_COUNT]; void mock_pd_reset(void) |