summaryrefslogtreecommitdiff
path: root/common/mock/usb_prl_mock.c
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2020-10-30 09:19:47 -0700
committerCommit Bot <commit-bot@chromium.org>2020-10-31 00:42:20 +0000
commitad1ed0d4d0295ffe45023d0099f264e2fa436bd8 (patch)
treece23baa4adf79dd0fd77b706b2b90ab18f288220 /common/mock/usb_prl_mock.c
parentaffd2a81b625986a1fbafa6407eb2d85c7dd48a6 (diff)
downloadchrome-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_prl_mock.c')
-rw-r--r--common/mock/usb_prl_mock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/mock/usb_prl_mock.c b/common/mock/usb_prl_mock.c
index b682e67f80..75c0976362 100644
--- a/common/mock/usb_prl_mock.c
+++ b/common/mock/usb_prl_mock.c
@@ -11,6 +11,10 @@
#include "usb_prl_sm.h"
#include "mock/usb_prl_mock.h"
+#ifndef TEST_BUILD
+#error "Mocks should only be in the test build."
+#endif
+
/* Defaults should all be 0 values. */
struct extended_msg rx_emsg[CONFIG_USB_PD_PORT_MAX_COUNT];
struct extended_msg tx_emsg[CONFIG_USB_PD_PORT_MAX_COUNT];