diff options
author | Jan Dabros <jsd@semihalf.com> | 2020-04-20 14:34:16 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-05-01 06:33:49 +0000 |
commit | a67cc5f5e8d11cd1004faf112193cf368af25f4b (patch) | |
tree | 336ea8b2cf541125b3ea0b8f8eac794fbaab5504 /tests/device/Makefile.inc | |
parent | 2d0ee36913a5e0f6c74beb5cdb9f25ea36ea9290 (diff) | |
download | coreboot-a67cc5f5e8d11cd1004faf112193cf368af25f4b.tar.xz |
tests: Add device/i2c-test test case
Add unit test for src/device/i2c.c module.
This patch is also used as an example for incorporating Cmocka mocking
feature (-wrap linker flag).
Signed-off-by: Jan Dabros <jsd@semihalf.com>
Change-Id: I2eeb565aacc724ae3b9f5c76ef4b98ef695416d6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40539
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'tests/device/Makefile.inc')
-rw-r--r-- | tests/device/Makefile.inc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/device/Makefile.inc b/tests/device/Makefile.inc new file mode 100644 index 0000000000..f23e72fa32 --- /dev/null +++ b/tests/device/Makefile.inc @@ -0,0 +1,18 @@ +## +## This file is part of the coreboot project. +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; version 2 of the License. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## + +tests-y += i2c-test + +i2c-test-srcs += tests/device/i2c-test.c +i2c-test-srcs += src/device/i2c.c +i2c-test-mocks += platform_i2c_transfer |